Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Safari browser span problem

Status
Not open for further replies.

Niavlys

IS-IT--Management
Jun 3, 2002
197
CA
Hi all,
why in the hell this is not working in Safari (OS X).

Code:
<span onClick=window.navigate("default.asp")>


I tried window.location.href, self.navigate but still doesn't work. No errors, just doesn't work.

Thanks!
 

I believe window.navigate is a Microsoft enhancement. Try the following instead:

Code:
<span onclick="document.location='default.asp';">

or if you want to break out of a frameset:

Code:
<span onclick="window.location='default.asp';">

Hope this helps,
Dan
 
I tried window.location, document.location, window.location.href, document.location.href and nothing works.

I can't figure that out...

Thanks
 
Looks to me like you have javascript turned off. Is any other javascript related stuff working. I don't know Safari, so I wouldn't know where to check.
 

Don't take this the wrong way, but you do have a close span tag, and content in the middle, don't you? So:

Code:
<span onclick="document.location='default.asp';">link text</span>

Just a hunch ;o)

Dan
 
Here is the complete line I use in my code.

Code:
<span onMouseOver="change('Menu2','Menu2',1)" onMouseOut="change('Menu2','Menu2',0)" onClick=location.href("Customize.asp")>
<img name="Menu2" border="0" src="images/MainMenu.png"></span>

change is a javascript function to rollover images. This function works fine.
 

So if you replace your line of code as shown above with this line, exactly as-is:

Code:
<span onmouseover="change('Menu2', 'Menu2', 1);" onmouseout="change('Menu2', 'Menu2', 0);" onclick="document.location='Customize.asp';"><img name="Menu2" border="0" src="images/MainMenu.png"></span>

Does it make any difference?

I notice your quoting changes as you go along... Can't imagnie that the browser should have any difficulty in interpreting what you actually mean, but you never know!

Hope this helps,
Dan


 
I replaced my code with yours. It didn't make any difference.

The quoting has changed because the line was at first in an ASP response.Write so I needed to replace the " with '.

I'm working presently to another way of doing this using <a href> instead of span. It seems to work fine using anchors.

Thanks for your help
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top