Tech Support Guy banner
Status
Not open for further replies.
1 - 3 of 3 Posts

·
Registered
Joined
·
178 Posts
Discussion Starter · #1 ·
Hi,

You know you can make a link to direct someone to a div (e.g. one

this When the user clicks on one, they will be taken three lines down to 'this'), I was wondering if this was possible for a form using javascript.

I tried doing this:
onClick="document.location.href('#this');"
but it did not work.

Any help into doing this would be much appreciated
Thanks
 

·
Registered
Joined
·
690 Posts
Hey

You can use a very simple onclick, go to location javascript:

Code:
<div class="xxxx" onclick="GoTo('url.html')">
And then you need to call a js file, with the following:

Code:
// GoTo fuction
function GoTo(url)
{
	window.location.href = url;
}
Works cross browser.
Cheers
 
1 - 3 of 3 Posts
Status
Not open for further replies.
Top