Results 1 to 2 of 2

Thread: window.location.href

  1. #1
    Join Date
    Dec 1969

    Default window.location.href

    Hi Guys,<BR><BR>I have a simple javaScript that works in IE and is doing something wierd in Netscape.<BR><BR>The script is:<BR><BR>function goThere() <BR> {<BR> url = "";<BR> window.location.href = url;<BR> }<BR><BR>and in my HTML (within a form) I have:<BR><BR>&#060;button id="but1" class="small" onClick="goThere()"&#062;Back&#060;/button&#062;<BR><BR>In IE the window goes to my default page.<BR><BR>In NS it goes to the page that the submit button of the form it is contained in goes to. <BR><BR>I want to keep the button within the form for layout reasons. <BR><BR>What am I doing wrong?<BR><BR>Thanks<BR>Don

  2. #2
    Join Date
    Dec 1969

    Default RE: window.location.href

    Just a guess I&#039;m afraid, but what happens is you use an INPUT rather than a BUTTON?<BR><BR>&#060;input type=button id="but1" class="small" onClick="goThere()" value="Back"&#062;<BR><BR>Gavin

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts