Bob Stone
asked on
Firefox 2 problem with this.href _self link
I am trying to use link buttons like below, they work fine in IE, but are totally broken in Firefox 2
<input type="button" value="Name" a href="link.asp" onclick="window.open(this. href, '_self')" />
How do I fix that?
<input type="button" value="Name" a href="link.asp" onclick="window.open(this.
How do I fix that?
ASKER
That doesn't work in FF2 either.
I get a 404 error and the address bar shows -> http://www.domain.com/undefined
I get a 404 error and the address bar shows -> http://www.domain.com/undefined
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Cool =o)
That worked.
That worked.
Great! I'm glad that I could help. Thank you for the grade, the points and the fun question.
bol
bol
i believe it's an issue with your href not being constructed with relative rather than an absolute urls and not specifying the http://
<input type="button" value="Name" href="www.google.com" onclick="window.open(this. href, '_self')" /> does not work in FF2
<input type="button" value="Name" href="http://www.google.com" onclick="window.open(this. href, '_self')" /> Does Work in FF2
btw
<input type="button" value="Name" onclick="document.location .href='www.google.com'; return false" /> does not work in FF2
<input type="button" value="Name" onclick="document.location .href='http://www.google.com'; return false" /> Does Work in FF2
<input type="button" value="Name" href="www.google.com" onclick="window.open(this.
<input type="button" value="Name" href="http://www.google.com" onclick="window.open(this.
btw
<input type="button" value="Name" onclick="document.location
<input type="button" value="Name" onclick="document.location
If you are changing the URL of this window I would use document.location.href instead. The "tag" you had doesn't look valid. It looks like a typo or something since it has an anchor tag in it. However in an anchor tags onclick event you could have ...
onclick="document.location
Since you aren't really "opening" a window window open isn't really needed. Let me know if you have any questions or need more information.
b0lsc0tt