button not working in netscape

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
noguru
Forum Commoner
Posts: 61
Joined: Thu Jun 06, 2002 4:03 am
Location: Just north of the City Of Gold, Land of Milk and Honey

button not working in netscape

Post by noguru »

Any reason why this piece of wonderful coding is not working in netscape 6, but works wonderfully in IE5 or higher??

Code: Select all

<input name="next" type="image" src="login.gif" width="45"   onClick="window.location.href='nextpage.php?id=1'">
Even when I change the type to type="button" and onclick to onclick="nextpage.htm", still nothing happens, although onclick="alert('netscape is great')" does give you the message.
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

Any reason why this started life in the PHP forum and not the client-side forum?

Mac
User avatar
mikeq
Forum Regular
Posts: 512
Joined: Fri May 03, 2002 3:33 am
Location: Edinburgh, Scotland

Post by mikeq »

Is it within <form></form> tags?
User avatar
Takuma
Forum Regular
Posts: 931
Joined: Sun Aug 04, 2002 10:24 am
Location: UK
Contact:

Post by Takuma »

If it is in <form> tag and you only have a button in it use the following code.

Code: Select all

<form onSubmit="location.href='nextpage.php?id=1'">
  <input type="submit" value="Go!">
</form>
or try it without putting window. So like

Code: Select all

location.href='whatever'
User avatar
noguru
Forum Commoner
Posts: 61
Joined: Thu Jun 06, 2002 4:03 am
Location: Just north of the City Of Gold, Land of Milk and Honey

Post by noguru »

Thnx it's working now.

I had to replace my nice login image button with a dull-looking submit button and change the style a bit to look decent. It's a pity it can't work in Netscape...
User avatar
mikeq
Forum Regular
Posts: 512
Joined: Fri May 03, 2002 3:33 am
Location: Edinburgh, Scotland

Post by mikeq »

It will be to do with the DOM (Document Object Model), basically how you refer to objects etc within the browser window.

Don't know the answer but do a search on Google perhaps or go onto developer.netscape.com.
violdary
Forum Newbie
Posts: 1
Joined: Wed Aug 26, 2009 6:15 am

Re: button not working in netscape

Post by violdary »

How can I make netscape navigator stop remembering what tabs I had open ? if there is a power failure ,netscape remembers what pages I had open,and I don't know how to stop that.
___________________
keyword research ~ keyword tool ~ keyword tracking ~ affiliate elite
Last edited by violdary on Fri Sep 04, 2009 1:03 am, edited 1 time in total.
User avatar
kaszu
Forum Regular
Posts: 749
Joined: Wed Jul 19, 2006 7:29 am

Re: button not working in netscape

Post by kaszu »

Off topic, but why are you using netscape? Noone is using it anymore.
Post Reply