PDA

View Full Version : Problem with Javascript Redirect in Firefox



denhamd2
10-20-2008, 10:33 AM
Hi,

I'm having a problem with getting a simple Javascript redirect to work. Basically I want it so that when the use hits the page they will straight away be redirected down to an anchor tag further down the page. My code works perfectly in IE, but not in Firefox. Here is the code I'm using:

Javascript:

<script type="text/javascript">
<!--
window.location = "#thelink"
//-->
</script>

HTML for anchor tag:

<a name="thelink"></a>


Any ideas on what I might be doing wrong?

Thanks in advance

Nile
10-20-2008, 11:40 AM
The name isn't the scroll down part. The ID is, give another attribute with thelink as the value. For example:

<a name="thelink" id="thelink"></a>

denhamd2
10-20-2008, 12:34 PM
perfect, works well, thanks for your help