#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Location
    Reading, UK
    Posts
    31
    Rep Power
    14
    Help!! I urgently need (by EoD tomorrow) need to find out how to invoke pop up alert windows. I've never really used perl but am doing for a contract. I've managed to get the rest of the stuff I need working but I can't find out about alert windows anywhere. You know what I mean, those annoying little boxes that pop up and tell you when something has gone wrong.

    Can anybody tell me how I would do the following:

    I have a fill out form and I need a alert window to appear when the user hasn't entered a mandatory field. On pressing ok I need the form page to still be displayed with the already entered text.

    Any help would be REALLY appreciated.

    Thanks.

    Nick Gushlow.
    Email: nickg@dynamicweb.co.uk
  2. #2
  3. SwollenMember
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Location
    the master control
    Posts
    264
    Rep Power
    14
    Is the form HTML? If so, then just use javascript...here is an example of a function that will check if the field is empty or not:
    function check_null(form) {
    if(form.CompSearch.value < 1)
    {alert('Enter a part to search for!');
    document.Searcher.CompSearch.focus();
    return false}
    else
    return true
    }
    Note: you might want to change form.CompSearch.value < 1
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Location
    Reading, UK
    Posts
    31
    Rep Power
    14
    Yeah the form is HTML, and the data collection is Perl. I hadn't thought of using Javascript, which I suppose was a bit narrow-minded of me, thanks.
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Aug 2000
    Location
    Indiana
    Posts
    614
    Rep Power
    15
    Yes, especially since that can't be done in perl.

IMN logo majestic logo threadwatch logo seochat tools logo