/    Sign up×
Community /Pin to ProfileBookmark

javascript: top.location=”

javascript: top.location=’ ‘

I am using this tag in combo onclick event but this is not working in IE what is the reason what should i use so that i can get the same functionality in all the browsers.

Luv,
Deeppak ?

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@deeppakauthorMay 13.2006 — <select name="select2" size="1">

<option value="none" selected="selected">Select a page and go</option>

<option value="alertsText.htm" onclick="goToPage2()">Text Alerts</option>

<option value="alertsImages.htm" onclick="goToPage2()">Alerts with images</option>

<option value="alerts.htm" onclick="goToPage2()">Message Boxes</option>

</select>

<head>

function goToPage2()

{

PageIndex2=document.TourForm.select2.selectedIndex

if (document.TourForm.select2.options[PageIndex2].value != "none")

{

location = document.TourForm.select2.options[PageIndex2].value

}

}

</head>


Second approach
------------------------



<select name="select2" size="1">

<option value="none" selected="selected">Select a page and go</option>

<option value="alertsText.htm" onclick='javascript: top.location=''alertsText.htm"'>Text Alerts</option>

<option value="alertsImages.htm" onclick='javascript: top.location=''alertsImages.htm"'>Alerts with images</option>

<option value="alerts.htm" onclick='javascript: top.location=''alerts.htm"'>Message Boxes</option>

</select>
Copy linkTweet thisAlerts:
@felgallMay 13.2006 — The javascript: labels in the second approach are not needed as Javascript already knows that it is Javascript when the onclick event handler is triggered.
Copy linkTweet thisAlerts:
@deeppakauthorMay 15.2006 — hey thanx for the suggestion but i am still stuck what about the solution to my post.

Cheers,

Deeppak
×

Success!

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