Click to See Complete Forum and Search --> : New to JS. Need some HELP


j0moran
03-07-2003, 06:46 PM
Im making a webpage that uses forms, and the forms fields are filled in using JavaScript. I also use various functions in my JavaScript.
Url:
www.sharpsh0t.com/esx/users/moran/lab4.html

Now my #1 problem is every time i click on Check Browser version, it runs my function checkBrowser(), which is what its supposed to do, but when its done it reloads the whole page... Same with my userResponse() function. This is my first time using javascript and im clueless why its doing this plz help.

khalidali63
03-07-2003, 06:56 PM
That is because you have input type as Submit
<input type="Submit" value="Check browser version" onClick="userBrowser();"/>

which is wrong it should be button

replace the above line of code with the one below

<input type="Button" value="Check browser version"
onClick="userBrowser();"/>

Cheers

Khalid

j0moran
03-07-2003, 07:26 PM
ahh thx a ton man :P
rookie mistake
haha