/    Sign up×
Community /Pin to ProfileBookmark

Reload problem

Hi,

I have a front page which starts with a welcome message.
Mouseover the welcome and the main menu drops down.

I want to the viewer to be able to return to the front page
and have the menu already dropped down and available.

Sounds straightforward, but the reload function is stopping the
dropdown function from running. Not getting any error messages either.

Any ideas?

Drop the menu (reveals links progressively):

[CODE]showMBR() {
onD(‘MBR’); setTimeout(‘onV(‘enq’)’,400); setTimeout(‘onV(‘browse’)’,800);
setTimeout(‘onV(‘notes’)’,1200);
setTimeout(‘onV(‘bones’)’,3600); return false;
}[/CODE]

Reloading:

[CODE]function reLoad() {
window.location.reload(true); // or just .reload()
}[/CODE]

Putting them together:

[code=html]onclick=”reload(); setTimeout(‘showMBR()’, 400)”[/code]

?

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@mityaDec 21.2009 — Since you didn't post HTML, I'll assume you mean a <select> tag when you say drop-down. If so, the only way you can force it to open without an actual click to it is via dispatchEvent, e.g.

[CODE]<script>
window.onload = function() {
var selObj = document.getElementById('someID');
var evObj = document.createEvent('MouseEvents');
evObj.initEvent( 'mousedown', true, true );
selObj.dispatchEvent(evObj);
}
</script>

<select id="someID">
<option>one</option>
<option>two</option>
<option>three</option>
</select>[/CODE]
Copy linkTweet thisAlerts:
@ctozauthorDec 21.2009 — Actually, no, it's a straight <a> tag which sits near the top left corner of the page, except in the opening pane:

<a class="nav" id="homelink" title="home" href="javascript://" onfocus="blur()" onclick="reLoad();showMBR();">&#26131</a>
×

Success!

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