/    Sign up×
Community /Pin to ProfileBookmark

Help me out pls….

Hi

parent.document.getElementById(“Table”).onclick();

The above script works fine in firefox but in internet explorer it doesn’t work.
When i tried in IE, the session gets killed.

HELP me out pls….

Can anyone tell WHY?

Thanks in advance.

to post a comment
JavaScript

4 Comments(s)

Copy linkTweet thisAlerts:
@KorMar 10.2010 — [B][COLOR="Blue"]on[/COLOR]click[/B] is an event, not a method. In theory you be able should use
<i>
</i>element.click()

But it won't work either in some browsers, as in fact you need to [I]call a function[/I] when you use an event:
<i>
</i>[I]element[/I].onclick=function(){[COLOR="SlateGray"]...//do something with statements, functions etc. ...[/COLOR]}
Copy linkTweet thisAlerts:
@passionateauthorMar 10.2010 — Hi Kor,

But the code works perfectly in firefox.
Copy linkTweet thisAlerts:
@KorMar 10.2010 — Hi Kor,

But the code works perfectly in firefox.[/QUOTE]

So what? Don't you want to work perfectly in [I]all the browsers[/I]? Do as I said.
Copy linkTweet thisAlerts:
@Sterling_IsfineMar 10.2010 — 

Can anyone tell WHY?

[/QUOTE]
Not with the amount of code you've shown.

Presumably a parent document has an element with ID 'Table' that has an onclick handler installed.

At a guess it could be a timing problem related to the loading of different frames.
×

Success!

Help @passionate 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 6.17,
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: @nearjob,
tipped: article
amount: 1000 SATS,

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

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...