Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
Dynamically Creating Button Names
Old 05-16-2005, 11:32 AM Dynamically Creating Button Names
Junior Talker

Posts: 1
Trades: 0
Hello,

I have a program that uses the Javascript DOM to create/remove a list of items on a page, however I'm trying to make it Browser Compatible.

Here is the code that I'm trying to create:

document.getElementById('ColumnNo'+ LineCounter).options[LineCounter-1].selected

LineCounter is a number that I increment each time this command runs through a loop.

Example: ColumnNo1, ColumnNo2, ColumnNo3, etc.


What I want to know is how do I dynamically create a string (ColumnNo1, ColumnNo2, ColumnNo3, etc.) and use that string to call that button? The command above works in IE, but not in FireFox or Netscape.

Thanks for any help you can provide.

Michael
FaithTek is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 05-17-2005, 03:58 PM
Jared's Avatar
Skilled Talker

Posts: 52
Location: St. Anthony, ID
Trades: 0
Perhaps mess around with arrays.
Jared is offline
Reply With Quote
View Public Profile Visit Jared's homepage!
 
Reply     « Reply to Dynamically Creating Button Names
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.15592 seconds with 12 queries