www.webdeveloper.com
Results 1 to 2 of 2

Thread: javascript function problem

  1. #1
    Join Date
    Oct 2010
    Posts
    4

    javascript function problem

    Hi

    In a function I have created a variable called id2. This variable will loop through and change to different strings eg. c1 c2 c3.

    These strings are the id's of cells in a table.

    I want to be able to collect the value in the cell by using the id2 variable in my function. How can this be done?

    alert(getElementByID("id2").value) - this will not work.

    Please help.

  2. #2
    Join Date
    Oct 2010
    Location
    Versailles, France
    Posts
    1,266
    id2 is a variable not a String : alert(getElementByID(id2).value)

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles