/    Sign up×
Community /Pin to ProfileBookmark

redirected in firefox link to frame

hi
in EI i put this next folo script

<BODY onload=”javascript:document.links[0].click();”>

and the first link in the html jamp to the frame named “menu”

<a href=”4tree.asp” TARGET=”menu”></a>

and it works good

the problem is in firefox it d’ont work in firefox
can u plise help my
tanks a lot
erez

to post a comment
JavaScript

13 Comments(s)

Copy linkTweet thisAlerts:
@David_HarrisonJan 15.2006 — This will do it, but if you want to use it on multiple pages you can put the JavaScript into a separate file to save the user downloading it each time.

The reason the code your posted doesn't work in Firefox (or any other decent browser) is because it's IE only code.

Just so you know, the code uses JavaScript (obviously) so therefore it won't work for users who have JavaScript disabled or cannot enable it, these users account for approximately 10% of users on the web ([url=http://www.thecounter.com/stats/2005/December/javas.php]stats[/url]).
Copy linkTweet thisAlerts:
@erez222authorJan 15.2006 — hi david tanks for u'r times bat i dident gut u

in my firefox the java script is enabled and stil it dont work

so ther is any solotion to solv that ishu or that problem in firefox

tanks

erez
Copy linkTweet thisAlerts:
@David_HarrisonJan 15.2006 — Ah, very sorry, I forgot to attach the actual code. I've attached it to this post.

[upl-file uuid=04fbd5da-2567-4b0d-b59a-ac3157931cef size=905B]simulate_click.txt[/upl-file]
Copy linkTweet thisAlerts:
@erez222authorJan 15.2006 — hi david

sorry it stil dont work and i check it

i insert u'r script and

in the link that i send i put sum like this

<a href="4tree.asp?key=<%=menu%>;" TARGET="menu"></a>

and in IE i gut the "key" and in firefox i dident gut it

?
Copy linkTweet thisAlerts:
@FangJan 15.2006 — Try changing this line: [COLOR=Green]top[/COLOR].frames[link.getAttribute("target")].location.href = link.href

FF has a similar method to IE, [URL=http://www.mozilla.org/docs/dom/domref/dom_el_ref36.html]dispatchEvent[/URL], but the method given by [B]David Harrison[/B] is easier and works better x-browser.
Copy linkTweet thisAlerts:
@erez222authorJan 15.2006 — hi

i hop i am not na'g to u but stil it wont work

hir is a link to my site project u can c at u'r self

http://www.kislev.co.il/kislevnewsite/run.asp?/kislevnewsite/services1/services.asp&desktop

in the right menu ther is menu "export1" and "export2" if u pres on "export1"

u shuld gut "10" in the right top corner and in "export2" "40"

if so then it work the link in the left frame send that no' auto

in the left frame on the right top corner ther is a link "ffffff"

this link shuld jump automatcly to the right frame

like in IE

i hop this time why solv that

tanks any a lot

erez
Copy linkTweet thisAlerts:
@David_HarrisonJan 15.2006 — Are you sure you got the link correct? That page doesn't load for me.
Copy linkTweet thisAlerts:
@erez222authorJan 15.2006 — sorry try this

www.kislev.co.il

in the menu go to "etc" at the end

then open "site map"

in site map page pres link "services"

it whil insert u to the project in a defrent why

this project is ander constaction

tanks
Copy linkTweet thisAlerts:
@erez222authorJan 16.2006 — hi david good mornig (in israel)

i back d'u find sum about in my site

by erez
Copy linkTweet thisAlerts:
@David_HarrisonJan 16.2006 — Yesterday neither of those links worked for me, but they do now, must have been a DNS issue or something.

Anyway, it should work by changing this line again:top.frames["desktop"].frames[link.getAttribute("target")].location.href = link.href
Copy linkTweet thisAlerts:
@erez222authorJan 16.2006 — hi david

ok hir is fany finx in my computer it work then i try it in ander

4 computer in my compony and it not work

i asck my administrator and he try and gut this err

Error: top.frames.desktop has no properties

Source File: http://www.kislev.co.il/kislevnewsite/services1/content.asp?key=15&menu=40

Line: 31

wy in my computer it work and in ader it dont, u can try olso ?

tanks erez

by
Copy linkTweet thisAlerts:
@David_HarrisonJan 16.2006 — It won't work outside of the frameset, the following code might be a tad better though:parent.frames[link.getAttribute("target")].location.href = link.hrefThis will work even if you don't have it in a nested frameset like your site is.
Copy linkTweet thisAlerts:
@erez222authorJan 16.2006 — ok you are great

it's working and it's working good

thank you very much for your support

I invite you to check my web site again and to see how the menu is working

as it should have in the first place.

I remind you press export1 & export2

thanks again

Erez
×

Success!

Help @erez222 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,
)...