Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

variable & ID

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hello,

I want to use Javascript variables containing some HTML and then use them to Show and Hide their content. How can I do that?
I was using the DIV tags to make it, and changed the visibility property to show and hide their content but I couldn't generate an ID using Javascript. Is this possible? It will be something like that:
<DIV ID=generateid()> .... </DIV> , I tried to do it but it doesn't works, is there a way to do it?
 
i dont think that is possible. i know that in ie5+ you can create divs and other html elements dynamically usig javascript, but i dont think you can assign them an id with javascript, unless you document.write() them. adam@aauser.com
 
Ok, thanks.
The only problem is that if I document.write them I won't be able to change their visibility to make some Show/Hide effects. Am I right?
 
of course you can show/hide layers that were document.written. adam@aauser.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top