Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how can i show a javascript alert while a javascript funtion is runnin

Status
Not open for further replies.

mae

Programmer
Apr 7, 2000
6
0
0
ES
How can i show a javascript alert while a javascript function is running and then the alert hides automaticaly.<br>for example an alert that shows <b>&quot;loading ....&quot;</b> while a function load a combobox and then when then combo is already loaded the alert hides.<br>PLEASE IS URGENT!
 
Can you not just create a new window using &quot;open&quot;, give it focus and then close it when the function finishes??
 
Steve's solution is right.&nbsp;&nbsp;An alert() function will stop execution of your script until the OK button is clicked. <p>nick bulka<br><a href=mailto:nick@bulka.com>nick@bulka.com</a><br><a href= > </a><br>
 
An alternative to a pop up window would be to use an image on the page, The src of the image could be changed to an image saying &quot;Loading&quot; as the function starts and changed back once the function completes.<br><br>Either this or the popup window is the elegent approach, if it possible to do what you describe it will be awkward and will almost certainly have cross-browser incompatability.
 
Dear all,<br><br>I have seen enough posts about IE & Netscape dynamic area 'how to do it' posts that I thought I would just send you all this:<br><br>It works in IE 4 and 5 and Nutscrap 4.06... Have fun with it.<br><br>&lt;HTML&gt;<br>&lt;HEAD&gt;<br>&lt;META NAME=&quot;GENERATOR&quot; Content=&quot;Microsoft Visual Studio 6.0&quot;&gt;<br>&lt;style type=&quot;text/css&quot;&gt;<br>&lt;!--<br>.xworks{<br>&nbsp;&nbsp;background-color: #336699;<br>&nbsp;&nbsp;position: absolute;<br>&nbsp;&nbsp;top: 100;<br>&nbsp;&nbsp;left: 100;<br>&nbsp;&nbsp;width: 200;<br>&nbsp;&nbsp;visibility: hidden;<br>}<br>--&gt;<br>&lt;/style&gt;<br>&lt;SCRIPT LANGUAGE=javascript&gt;<br>&lt;!--<br>function onpopdiv( popid){<br><br>&nbsp;&nbsp;var ele = null;<br>&nbsp;&nbsp;var sState = new String(&quot;&quot;);<br>&nbsp;&nbsp;if ( document.all){<br>&nbsp;&nbsp;&nbsp;&nbsp;ele = document.all( popid);<br>&nbsp;&nbsp;&nbsp;&nbsp;sState = new String(ele.style.visibility);<br>&nbsp;&nbsp;&nbsp;&nbsp;if ( sState.indexOf(&quot;hi&quot;) == 0<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;¦¦ sState.length == 0 )<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ele.style.visibility = &quot;visible&quot;;<br>&nbsp;&nbsp;&nbsp;&nbsp;else<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ele.style.visibility = &quot;hidden&quot;;<br>&nbsp;&nbsp;}else{<br> <br>&nbsp;&nbsp;&nbsp;&nbsp;ele = document.layers[ popid];<br>&nbsp;&nbsp;&nbsp;&nbsp;sState = new String(ele.visibility);<br>&nbsp;&nbsp;&nbsp;&nbsp;if ( sState.indexOf(&quot;hi&quot;) == 0)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ele.visibility = &quot;show&quot;;<br>&nbsp;&nbsp;&nbsp;&nbsp;else<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ele.visibility = &quot;hide&quot;;<br>&nbsp;&nbsp;}<br>}<br>//--&gt;<br>&lt;/SCRIPT&gt;<br>&lt;/HEAD&gt;<br>&lt;BODY&gt;<br>&lt;div id=&quot;popup&quot; class=&quot;xworks&quot;&gt;&lt;table bgcolor=#336699&gt;<br>&lt;tr&gt;&lt;td&gt;<br>Here is a crossX browser&lt;br&gt;<br>div popup tag!<br>&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;<br>&lt;/div&gt;<br>&lt;FORM action=&quot;&quot; method=POST id=form1 name=form1&gt;<br>&lt;P&gt;This is a test&lt;/P&gt;&lt;INPUT type=&quot;button&quot; value=&quot;Test&quot; <br> onclick=&quot;onpopdiv('popup')&quot; id=button1 name=button1&gt;<br>&lt;/FORM&gt;<br>&lt;pre&gt;<br>Technical contents of ISO 639:1988 (E/F)<br>&quot;Code for the representation of names of languages&quot;.<br><br>Typed by <A HREF="mailto:Keld.Simonsen@dkuug.dk">Keld.Simonsen@dkuug.dk</A> 1990-11-30&nbsp;&nbsp;&lt;ftp: ISO_639 i18n dkuug.dk&gt;<br>Minor corrections, 1992-09-08 by Keld Simonsen<br>Sundanese corrected, 1992-11-11 by Keld Simonsen<br>Telugu corrected, 1995-08-24 by Keld Simonsen<br>Hebrew, Indonesian, Yiddish corrected 1995-10-10 by Michael Everson<br>Inuktitut, Uighur, Zhuang added 1995-10-10 by Michael Everson<br>Sinhalese corrected, 1995-10-10 by Michael Everson<br>Faeroese corrected to Faroese, 1995-11-18 by Keld Simonsen<br>Sangro corrected to Sangho, 1996-07-28 by Keld Simonsen<br><br>Two-letter lower-case symbols are used.<br>The Registration Authority for ISO 639 is Infoterm, Osterreichisches<br>Normungsinstitut (ON), Postfach 130, A-1021 Vienna, Austria.<br><br>aa Afar<br>ab Abkhazian<br>af Afrikaans<br>am Amharic<br>ar Arabic<br>as Assamese<br>ay Aymara<br>az Azerbaijani<br><br>ba Bashkir<br>be Byelorussian<br>bg Bulgarian<br>bh Bihari<br>bi Bislama<br>bn Bengali; Bangla<br>bo Tibetan<br>br Breton<br>&lt;/pre&gt;<br>&lt;/body&gt;<br>&lt;/html&gt;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top