Log in

View Full Version : Image Thumbnail Viewer II - put a link on a "text link"



4gotten
09-20-2009, 09:43 AM
Hi,

Here's the link: http://www.dynamicdrive.com/dynamicindex4/thumbnail2.htm

I would like to put a link on a "text link". but in href="" in this script uses to load the images to the loadarea.

what i wanted to achieve is, i want to put a url on href="".

Kindly help me to achieve this one..

THanks.

vwphillips
09-20-2009, 12:12 PM
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>
<title></title>
<script type="text/javascript">
/*<![CDATA[*/

function Swap(id,url){
document.getElementById(id).src=url;
}

/*]]>*/
</script></head>

<body>
<a href="http://www.nasa.gov/images/content/167040main_image_feature_738_ys_4.jpg" onmouseover="Swap('loadarea','http://www.vicsjavascripts.org.uk/StdImages/One.gif')" title="This is an example">Thumbnail Example 1</a><br />
<a href="http://www.nasa.gov/images/content/168177main_image_feature_749_ys_4.jpg" onmouseover="Swap('loadarea','http://www.vicsjavascripts.org.uk/StdImages/Two.gif')" >Thumbnail Example 2</a><br />

<img id="loadarea" src="http://www.vicsjavascripts.org.uk/StdImages/Blank.gif" />
</body>

</html>

4gotten
09-20-2009, 03:41 PM
First of all, thank you so much for the reply vwphillips..

I will try this one...

Thanks really thanks.

4gotten
09-20-2009, 05:31 PM
@vwphillips..
That isn't working...

what i want to happen is like this..

I want to have a link on on text link..



<a href="http://www.yahoo.com" rel="enlargeimage::mouseover" rel="enlargeimage::mouseover">Text link</a>

4gotten
09-21-2009, 07:34 AM
Up............ Please help me please

4gotten
09-21-2009, 10:00 AM
need help in here!

vwphillips
09-21-2009, 10:47 AM
what exactly is not working?

4gotten
09-21-2009, 02:47 PM
the onmouseover is not working.

I change the href="http://www.yahoo.com"


<a href="http://www.yahoo.com" onmouseover="Swap('loadarea','http://www.vicsjavascripts.org.uk/StdImages/One.gif')" title="This is an example" rel="enlargeimage::mouseover" rev="loadarea::#">Thumbnail Example 1</a>

There's no images showing when rollover the textlink...

4gotten
09-22-2009, 05:30 AM
up. help please

vwphillips
09-22-2009, 08:16 AM
remove the rel="enlargeimage::mouseover" rev="loadarea::#"


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>
<title></title>
<script type="text/javascript">
/*<![CDATA[*/

function Swap(id,url){
document.getElementById(id).src=url;
}

/*]]>*/
</script></head>

<body>
<a href="http://www.yahoo.com" onmouseover="Swap('loadarea','http://www.vicsjavascripts.org.uk/StdImages/One.gif')" title="This is an example">Thumbnail Example 1</a><br />
<a href="http://www.yahoo.com" onmouseover="Swap('loadarea','http://www.vicsjavascripts.org.uk/StdImages/Two.gif')" >Thumbnail Example 2</a><br />
<a href="http://www.yahoo.com" onmouseover="Swap('loadarea','http://www.vicsjavascripts.org.uk/StdImages/Three.gif')" title="This is an example">Thumbnail Example 1</a><br />
<img id="loadarea" src="http://www.vicsjavascripts.org.uk/StdImages/Blank.gif" />
</body>

</html>

works for me

4gotten
09-22-2009, 09:43 AM
@vwphillips

so this javascript(thumbnailviewer2.js) don't need anymore??

I thought you just edit the previous code, and just put a link on it..

vwphillips
09-23-2009, 09:49 AM
so this javascript(thumbnailviewer2.js) don't need anymore??


thats correct