/    Sign up×
Community /Pin to ProfileBookmark

Mac’s Safari Browser Question.

I’ve been trying to develope a javascript menu that will work with mac’s new Safari broswser. My menu system works great for most things, but i’m having trouble understanding one thing.

I’m using a script that lets me create menu items with a addMenuItem comand, to which I pass the name of the item, and its location….sort of like menu.addMenuItem(“Test”, “www.google.com”); would make a menu item that said “Test” and when clicked went to Google. So far so good.

I needed now to create a frame below the menu where I could display selected links. I created a frame called bottomFrame for this. Its just a blank html file.
Now I found I could pass something like
menu.addMenuItem(“Test”, “bottomFrame.location.href=’www.google.com'”); no problem.

Variations like
bottomFrame.location and parent.bottomFrame.location have the same effect. (Anyone want to explain to me the difference between those 3? I understand what they are doing, but not sure I understand the differences if any)

Now the problem I’m having is that if I try to link .gif’s the same way, after the first one loads no others will. These .gif’s are all stored in an Images folder in the site root folder. When linking them I’d use something like
(“Test”, “bottomFrame.location.href=’images/image1.gif'”);
And they always load….or at least the first one will. As soon as one .gif loads in bottomFrame I cannot get it to switch to another. My best guess is that it is because the .gif isn’t really being opened inside of that frame, but rather is replacing it in some way….therefore the other links targeting bottomFrame no longer have a valid target.

It kills me tho because if i just create a few links using <a href=”Images/image1.gif” target=”bottomFrame”>Text</a>
I can switch between the .gif’s at will and have them load in the bottomFrame.

Why is there a difference between using <a href='”target=””) and passing a line to a jscript that says bottomFrame.location.href=”” or somethign simliar? I mean it seems like both are saying to set the bottomFrame to display the location that gets passed, so what gives? I tried to pass <a href> instead of the other thigns, but that wouldn’t work at all. Considering I dont know a whole lot about html/javascript I’ll be lucky if this means anything at all to anyone. But its worth a shot : )

to post a comment
Full-stack Developer

3 Comments(s)

Copy linkTweet thisAlerts:
@_workauthorJun 24.2003 — ok....well I've tried a few dozen different menu javascripts and different ways of getting pages to load. The only success I ever had was with using document.background= to change the background of the bottomFrame.html page into the .gif i wanted. Of course as soon as I do that, none of the other .html pages will load onto bottomFrame....sigh. Anyway one thing I'd like to try is having it so that when you select a menu item it uses the "a href" comand instead of location or soemthing. What javascript command could you use that would have the same effect as if you had clicked a link made with a href?
Copy linkTweet thisAlerts:
@FreedomFriesSep 23.2006 — Hi,

I am experiencing the same problem. Has anyone out there experienced problems with this. Essentially, the first link works... and loads the file in the other frame. But then subsequent links don't work. This only happens on Safari. And, as far as I can tell, it only happens for framesets.

I'm going to dig around. If I find an answer, I'll post here.

Conor.
Copy linkTweet thisAlerts:
@FreedomFriesSep 24.2006 — I'm trying to determine if this is related to the following issue...

http://www.hiermenuscentral.com/bulletins/10/
×

Success!

Help @_work spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.20,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...