By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,983 Members | 1,468 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,983 IT Pros & Developers. It's quick & easy.

Removing a part using innerHtml='' ?

P: n/a
Can this be done?
I want to avoid the alert comming back on back and forwards navigation.
Hmm, maybe a var (boolean)?

(Don't mention the js execution-flow itself, it is presented odd )
<div id="div_msgbox_onloadalertmb">
<script language=javascript>
function msgbox_onloadalertmb(){
alert('hello2');
document.getElementById('div_msgbox_onloadalertmb' ).innerHTML='';
}
</script>

</div>

<script language=javascript>
msgbox_onloadalertmb();
</script>
Nov 23 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
once parsed, the script is part of the scripts collection, not a child of
the div. just replace the function def with a nop.

<script language=javascript>
function msgbox_onloadalertmb(){
alert('hello2');
window.msgbox_onloadalertmb = new function() {};
}

this of course will not do what you want though. the original rendered page
is stored in the cache, not the results after the script runs.

-- bruce (sqlwork.com)
"Edwin Knoppert" <ne**@hellobasic.com> wrote in message
news:43**********************@text.nova.planet.nl. ..
Can this be done?
I want to avoid the alert comming back on back and forwards navigation.
Hmm, maybe a var (boolean)?

(Don't mention the js execution-flow itself, it is presented odd )
<div id="div_msgbox_onloadalertmb">
<script language=javascript>
function msgbox_onloadalertmb(){
alert('hello2');
document.getElementById('div_msgbox_onloadalertmb' ).innerHTML='';
}
</script>

</div>

<script language=javascript>
msgbox_onloadalertmb();
</script>

Nov 23 '05 #2

P: n/a
Thanks, i'll abandon this :)
"Bruce Barker" <br******************@safeco.com> schreef in bericht
news:%2****************@TK2MSFTNGP15.phx.gbl...
once parsed, the script is part of the scripts collection, not a child of
the div. just replace the function def with a nop.

<script language=javascript>
function msgbox_onloadalertmb(){
alert('hello2');
window.msgbox_onloadalertmb = new function() {};
}

this of course will not do what you want though. the original rendered
page is stored in the cache, not the results after the script runs.

-- bruce (sqlwork.com)
"Edwin Knoppert" <ne**@hellobasic.com> wrote in message
news:43**********************@text.nova.planet.nl. ..
Can this be done?
I want to avoid the alert comming back on back and forwards navigation.
Hmm, maybe a var (boolean)?

(Don't mention the js execution-flow itself, it is presented odd )
<div id="div_msgbox_onloadalertmb">
<script language=javascript>
function msgbox_onloadalertmb(){
alert('hello2');
document.getElementById('div_msgbox_onloadalertmb' ).innerHTML='';
}
</script>

</div>

<script language=javascript>
msgbox_onloadalertmb();
</script>


Nov 23 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.