473,789 Members | 2,876 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Removing a part using innerHtml='' ?

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=javasc ript>
function msgbox_onloadal ertmb(){
alert('hello2') ;
document.getEle mentById('div_m sgbox_onloadale rtmb').innerHTM L='';
}
</script>

</div>

<script language=javasc ript>
msgbox_onloadal ertmb();
</script>
Nov 23 '05 #1
2 1051
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=javasc ript>
function msgbox_onloadal ertmb(){
alert('hello2') ;
window.msgbox_o nloadalertmb = 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**@hellobasi c.com> wrote in message
news:43******** **************@ text.nova.plane t.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=javasc ript>
function msgbox_onloadal ertmb(){
alert('hello2') ;
document.getEle mentById('div_m sgbox_onloadale rtmb').innerHTM L='';
}
</script>

</div>

<script language=javasc ript>
msgbox_onloadal ertmb();
</script>

Nov 23 '05 #2
Thanks, i'll abandon this :)
"Bruce Barker" <br************ ******@safeco.c om> schreef in bericht
news:%2******** ********@TK2MSF TNGP15.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=javasc ript>
function msgbox_onloadal ertmb(){
alert('hello2') ;
window.msgbox_o nloadalertmb = 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**@hellobasi c.com> wrote in message
news:43******** **************@ text.nova.plane t.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=javasc ript>
function msgbox_onloadal ertmb(){
alert('hello2') ;
document.getEle mentById('div_m sgbox_onloadale rtmb').innerHTM L='';
}
</script>

</div>

<script language=javasc ript>
msgbox_onloadal ertmb();
</script>


Nov 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2512
by: Asad Khan | last post by:
I have an HTML file that has a call to a Javascript function in it as follows: <!-- bunch of stuff --> <script type="text/javascript">doXMLFromString()</script> <!-- bunch of stuff --> Now I make a copy of this HTML file by creating a new window and writing var body = document.body.innerHTML;
2
2699
by: Raja Kannan | last post by:
Is there a way to remove text portion from the HTML keeping the HTML Tags using the browser, say javascript RegEx or something ? I have seen lot of examples removing HTML tags to get the text but how the reverse of it ? any sample code or any suggestion would be appreciated.
16
2060
by: graham.reeds | last post by:
I am updating a website that uses a countdown script embedded on the page. When the page is served the var's are set to how long the countdown has left in minutes and seconds, but the rest of the script is left untouched. However I want to take the script out of the page and have it as a seperate file that can be cached, reducing serving costs - the page gets hit a couple of thousand times per day, sometimes as high a 5K, so any...
0
9511
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10408
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10139
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9983
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9020
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6768
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4092
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3697
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2909
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.