dcsimg
www.webdeveloper.com
Results 1 to 2 of 2

Thread: Re-defining a varible

  1. #1
    Join Date
    May 2007
    Posts
    2

    Re-defining a varible

    I'm working on a periodic table of elements as a project
    these are the important pieces of code


    var numb; <- global variable, i think

    function read()
    {

    str = "Element - "
    str += xmlObj.childNodes(numb).firstChild.text
    str +="\n"
    str += "Atomic Number - "
    str += xmlObj.childNodes(numb).getAttribute("Atomic_Number")
    str +="\n"
    str += "Weight - "
    str += xmlObj.childNodes(numb).getAttribute("Weight")
    str +="\n"
    str += "Type - "
    str += xmlObj.childNodes(numb).getAttribute("Type")
    alert(str);
    }

    </script>
    </head>



    <TD ALIGN=center><span style="cursor: pointer; text-decoration: underline";
    var numb = 1; onclick="read()">
    H
    </span> </TD>

    http://www.personal.psu.edu/mbs5023/...20of%20hi.html

    this site only works in IE

    I'm attempting to re-define the variable numb to some number, something from 1-150

  2. #2
    Join Date
    May 2007
    Posts
    2

    resolved

    <TD ALIGN=center><span style="cursor: pointer; text-decoration: underline"; onclick="numb=1; read();">H</span> </TD>

    resolved

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