/    Sign up×
Community /Pin to ProfileBookmark

Both functions don’t work

Im creating a menu which expands and some of the links I wish to open in a pop up window.

[code] <script type=”text/javascript”>
<!–
window.onload=montre;
function montre(id) {
var d = document.getElementById(id);
for (var i = 1; i<=10; i++) {
if (document.getElementById(‘smenu’+i)) {document.getElementById(‘smenu’+i).style.display=’none’;}
}
if (d) {d.style.display=’block’;}
}
//–>
function launchWin(loc){
window.open(loc, “”, “resizable,scrollbars,width=800,height=600,status=1”);
}
</script>
[/code]

[code=html]
<dd id=”smenu2″ onmouseover=”javascript:montre(‘smenu2’);” onmouseout=”javascript:montre();”>
<ul>
<li><a href=”javascript:LaunchWin(‘/matchreport/8.htm’)”>Most Recent</a></li>
<li><a href=”#”>Archive</a></li>
</ul>
</dd>
[/code]

Only problem being it doesn’t like the pop up window bit, as they don’t open. Any help would be much appreciated.

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@KorJun 17.2005 — 
window.onload=montre;

function montre(id) {
[/quote]

1. You have not passed any parameter to function...

2. And use

<a href="#" onclick="LaunchWin('/matchreport/8.htm');return false">

or

<a href="javascript:void(LaunchWin('/matchreport/8.htm'))">
×

Success!

Help @seafordcrownfc 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.2,
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: @meenaratha,
tipped: article
amount: 1000 SATS,

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

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