| Changing contents of div or paragraph with a link in CSS
|
JakeFrederick

msg:1196709 | 4:37 pm on Dec 13, 2001 (gmt 0) | How can I change the contents of a div or paragraph when the user presses a link using CSS? I am trying to create an image gallery where the user presses a thumbnail and the full image displays. I don't want to use pop-up windows and I don't want to refresh the screen or use frames. Can this be done easily?
|
joshie76

msg:1196710 | 5:55 pm on Dec 13, 2001 (gmt 0) | Try this little sample, uses the innerHTML property. Won't work in NN4 but will in pretty much everything else. <html> <head> <title>Untitled</title> <script> function updateTestParagraph(string) { document.getElementById('test').innerHTML = string } var testString = "Look, DHTML wonder eh?" </script> </head> <body> <a href="javascript:updateTestParagraph(testString);" >click here</a> <p id="test"></p> </body> </html> |
|
|
rcjordan

msg:1196711 | 6:29 pm on Dec 13, 2001 (gmt 0) | DHTML can add an SSI-type injection into a div. Here's the best one I've found to date, it works on NS4, NS6, & IE4 up. [dhtmlnirvana.com...]
|
|
|