Displaying Image and Text on a frame thru a link...

liunx

Guest
Hi,<br />
With reference to webpage <!-- m --><a class="postlink" href="http://www.geocities.com/ranganathkashyap/bangalore/phototours/lalbagh/">http://www.geocities.com/ranganathkashy ... s/lalbagh/</a><!-- m --> for every link clicked on the left frame, i've designed the right frame to display different images. is it possible, without creating separate html files to contain each image, to also display some text along with the image in the right frame on the click of the links on the left frame?<br />
<br />
These are the two things i don't want to do: -<br />
1) Create separate htmls<br />
2) Edit the image to embed the text in it.<br />
<br />
regards,<br />
Kashyap<!--content-->Use php or other server side script to generate the pages that display the text and images. You could most likely do the same thing with javascript.<!--content-->Originally posted by kevin <br />
Use php or other server side script to generate the pages that display the text and images. You could most likely do the same thing with javascript. <br />
<br />
How? :D<!--content-->Originally posted by kevin <br />
Use php or other server side script to generate the pages that display the text and images. You could most likely do the same thing with javascript. <br />
OK! I discovered a very simple workaround (JavaScript) for this yesterday. And it is working fine ;o)<br />
I did something like this...<br />
In the index (frameset) page, the name of the right frame is 'mainFrame'<br />
Whenever a link is clicked on the left frame, i call a JavaScript like<br />
<br />
<a href=http://www.htmlforums.com/archive/index.php/"javascript:loadImage(imageSource, imageDesc)">Link Text</a><br />
<br />
which invokes...<br />
<br />
<script language="JavaScript"><br />
function loadImage(source, desc) {<br />
parent.mainFrame.document.clear();<br />
parent.mainFrame.document.write("<BODY><IMG SRC=http://www.htmlforums.com/archive/index.php/"+source+"><BR>"+desc+"</BODY>");<br />
}<br />
</script><!--content-->
 
Back
Top