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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

full page link

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I am using a java script slide show on a page. It is the only element on the page, I want to make the image or the entire page be a link, as in clicking on the image or anywhere (even if it’s not directly on the image) on the page be a hot link ..any idea’s how this would be done?
 
Try this.

Insert a layer, make it 100% widht and height

Place 5 x 5 width/height transparent image in it. Make it 100% height and width of layer.

Place a link or on clik behaviour on the iamge.

The layer will take up the whole screen.
The iamge will take up the whole layer, and be transarent so the surfer can see everything behind it.
The whole of the screen will act a a link.

 
Or try this,

1) Put this script into HEAD

<script language=&quot;JavaScript&quot;>
<!--
function Link(theUrl)
{
window.location=theUrl;
}
//-->
</script>

2) Put this piece of code into BODY tag

<body ... onClick=&quot;Link('put_link_here')&quot;>


3) Enjoy it :) Good Luck! :)
 
Yes it is very easy.
You can always specify this within your javascript block. A typical code snippet will be like this-

<script language=&quot;javascript&quot;>
document.onClick=loadPage

function loadPage()
{
window.location.href=&quot;your desired URL&quot;;
return true;
}
</script>

-------------------------
Above script will do the needful for you.
 
Yes it is very easy.[dazed]
You can always specify this within your javascript block. A typical code snippet will be like this-

<script language=&quot;javascript&quot;>
document.onClick=loadPage

function loadPage()
{
window.location.href=&quot;your desired URL&quot;;
return true;
}
</script>

-------------------------
Above script will do the needful for you.
 
If you go for the javascript option, make sure you place a javascript sniff on the page.

If someone comes into your site with javascript off or witha high security setting, the link won't work and they'll not know why.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top