Prompt validation

Results 1 to 2 of 2

Thread: Prompt validation

  1. #1
    Join Date
    Dec 1969

    Default Prompt validation

    Trying to work out the logic in a problem i am faced with. Your help would be greatly appreciated. I have a function that is checking for multiple conditions. At a point in my function if a condition is true i have prompt box that opens and ask for a phone number. At this point i want to validate the phone number. if it is good then continue with the script else continue to open the prompt. Can this be done with a seperate function or will i have to write the code in the same function to continue to stay in this function? I am not sure if you can jump out of a function and then jump back in where it left off.

  2. #2
    Join Date
    Dec 1969

    Default That is the whole point of a...

    ...function (or sub routine) - you call it and it comes back to where you called it from:<BR><BR>function One() {<BR>&nbsp;&nbsp;alert("Function One - Step 1");<BR>&nbsp;&nbsp;Two();<BR>&nbsp;&nbsp;alert("F unction One - Step 2");<BR>}<BR><BR>function Two() {<BR>&nbsp;&nbsp;alert("Function Two");<BR>}<BR><BR>Guess what happens? :-)<BR><BR>Oliver.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts