Mark Otto Posted June 6, 2004 Share Posted June 6, 2004 If it is possible, how can I? Is it Javascript or CSS that I could use? Any help would be a appreciated. Thanks :) Link to comment https://www.neowin.net/forum/topic/174764-target-a-div/ Share on other sites More sharing options...
0 sandman45654 Posted June 6, 2004 Share Posted June 6, 2004 I don't know if this is exactly what your looking for but it might do the trick. <div><iframe name="test" src="about:mozilla"></iframe></div> <a href="http://www.yahoo.com" target="test">test</a> Link to comment https://www.neowin.net/forum/topic/174764-target-a-div/#findComment-2227076 Share on other sites More sharing options...
0 Mark Otto Posted June 6, 2004 Author Share Posted June 6, 2004 no, it can't be an iframe. iframes are messy to make everything look purdy. i am using css controlled dropdowns, which get screwed and slowed down upon hovering over an iframe. is there any other way? i was sure there was... Link to comment https://www.neowin.net/forum/topic/174764-target-a-div/#findComment-2227201 Share on other sites More sharing options...
0 gigapixels Veteran Posted June 6, 2004 Veteran Share Posted June 6, 2004 Do you have PHP? You can use includes then... It will of course have to reload the page everytime, but that's how my site works, and usually you don't even notice it. Besides, if you can, the average user won't care... Link to comment https://www.neowin.net/forum/topic/174764-target-a-div/#findComment-2227709 Share on other sites More sharing options...
0 Dented Posted June 6, 2004 Share Posted June 6, 2004 it might be possible using javascript. I know you can address the tag from javascript if you set an id with the getElementById method. eg: <html> <head> <script> function changeText() { document.getElementById('text').innerHTML = 'Another test text'; } </script> </head> <body> <div ID="text">Test text</div> <br><br> <a href="javaScript:changeText()">Change the text</a> </body> </html> Link to comment https://www.neowin.net/forum/topic/174764-target-a-div/#findComment-2231069 Share on other sites More sharing options...
0 still_idiot Posted June 9, 2004 Share Posted June 9, 2004 Are you talking about where you click a link, and it goes to another portion of the same page.. If so.. <html> <head> <title>Page Anchors</title> </head> <body> <div> <p><a href="#anchor">Go to the anchor named "anchor"</a></p> </div> <br /> <div> <a name="anchor"> </a> <p>The above link should have brought you here</p> </div> </body> </html> Link to comment https://www.neowin.net/forum/topic/174764-target-a-div/#findComment-2246649 Share on other sites More sharing options...
0 gigapixels Veteran Posted June 9, 2004 Veteran Share Posted June 9, 2004 still_idiot said: Are you talking about where you click a link, and it goes to another portion of the same page..If so.. <html> <head> <title>Page Anchors</title> </head> <body> <div> <p><a href="#anchor">Go to the anchor named "anchor"</a></p> </div> <br /> <div> <a name="anchor"> </a> <p>The above link should have brought you here</p> </div> </body> </html> Nah, he's saying he wants to have content show up in a DIV. Like a frame or iframe. I like this style much better. Problem is, I only know how to with PHP Link to comment https://www.neowin.net/forum/topic/174764-target-a-div/#findComment-2247257 Share on other sites More sharing options...
Question
Mark Otto
If it is possible, how can I? Is it Javascript or CSS that I could use? Any help would be a appreciated. Thanks :)
Link to comment
https://www.neowin.net/forum/topic/174764-target-a-div/Share on other sites
6 answers to this question
Recommended Posts