Try this.  Shot in the dark.

<script>
function savedata()
{
mytopic=document.header.topic_list.options[document.header.topic_list.select
edIndex].value;

if(mytopic=='FC'){
        alert(mytopic)
        alert("Please choose topic code.");
  }
else
        return true;
}
</script>


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 17, 2001 2: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_list.select
edIndex].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