Have you tried putting in a return false; at the end?

C. Hatton Humphrey, Developer 
Fisher, Towne & Associates
716-839-2141 x336
[EMAIL PROTECTED]
 

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
> Behalf Of [EMAIL PROTECTED]
> Sent: Monday, December 17, 2001 3:39 PM
> To: [EMAIL PROTECTED]
> Subject: How to abort a program in JS
> 
> 
> Aprogram checks a variable's value and has to abort the process if the
> value is ''FC. The same page should be displayed to let a user to change
> the value. How to do it? My program continues excution afte an 
> alert box is
> closed
> 
> <script>
> function savedata()
> {
> <cfoutput>
> mytopic=document.header.topic_list.options[document.header.topic_l
ist.selectedIndex].value;</cfoutput>
> if(mytopic=='FC')
> alert(mytopic)
> alert("Please choose topic code.");
> }
> </script>
> 
> 
> 
> (Embedded image moved to file: pic32591.pcx)

-------------------------------------------------------------------------
This email server is running an evaluation copy of the MailShield anti-
spam software. Please contact your email administrator if you have any
questions about this message. MailShield product info: www.mailshield.com

-----------------------------------------------
To post, send email to [EMAIL PROTECTED]
To subscribe / unsubscribe: http://www.dfwcfug.org

Reply via email to