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 sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mac/PC compatibility with JS menu

Status
Not open for further replies.

muppetgrrl

Programmer
Jan 21, 2005
12
US
I'm using a basic flyover menu (dl'ed from Gers Versluis) and trying to make it compatible on both Mac and PC. Because it's in a frameset, I want to be able to open some sites targeted to the top. It's simple to do in PCs, but Macs don't like any of the javascript. Is there a method I'm missing?

Here's an example of the array:

Code:
Menu2_1=new Array("Amsterdam","javascript:parent.location.replace('/offices/AMintranet/index.htm');",

On PCs, parent.location works fine, but on Macs, it doesn't go anywhere. I added "replace," but of course that adds the problem of losing the current page in the history, and people want their back button on IE to work.

Is there a method that's compatible for both Macs and PCs, or am I going to have to make two menus, with less functionality for Mac users?
 
Never mind--it turns out that the MAc wanted me to create my own function and call it; it wouldn't allow me to do it within the link. All repaired. For anyone else who's interested:

Code:
function sameBrowser(URL)	{
	parent.location = URL;
 }

Menu2_1=new Array("Amsterdam","javascript:sameBrowser('/offices/AMintranet/index.htm');"

So easy, it was nearly impossible to figure out. :)
 

Macs don't like any of the javascript

Which browser on the Mac was having the problem? Surely not FF, Safari, IE, and ALL the Mac browsers available?

Dan


[tt]D'ya think I got where I am today because I dress like Peter Pan here?[/tt]
[banghead]

 
Surely not FF, Safari, IE, and ALL the Mac browsers available?

All the Mac browsers my company uses, yup! (Our standard is to use IE, so the others are moot, anyway.)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top