nwebie onsubmit

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • bbxrider

    nwebie onsubmit

    the onreset is working but problem somewhere in the onsubmit or the function
    it calls.
    i have abbreviated the called verfiy function for now just to get the basic
    onsubmit part working
    basically the screen just gives a flash and it also alters the initial html
    code after the form tag,
    which seems really weird to me
    this is kind of long but pretty basic i think
    need some help please

    onsubmit and reset code:
    <FORM onSubmit="
    this.firstname. optional=true;
    this.lastname.o ptional=true;
    this.addr1.opti onal=true;
    this.city.optio nal=true;
    this.state.opti onal=true;
    this.zip.min=0;
    this.zip.max=99 999;
    this.homephone. optional=true;
    this.email.opti onal=true;
    return verify(this);
    "
    onreset = "
    return confirm('do you really want to erase '+
    'everything entered and start over from scratch?');
    "[color=blue]
    >[/color]
    html code for the form, the verify function is after all the html code

    the verify function:
    <script languauge="java script">
    function verify(f)
    // verifies all the fields set for verification and messages
    {
    if confirm('this will return true(ok) or false(cancel)' {
    return true;
    else
    return false;
    }
    var msg;
    var empFld = "";l
    var errors = ""
    ............... lots more verification code here once i can at least get a
    confirm to display
    }


  • bbxrider

    #2
    Re: nwebie onsubmit

    can't seem to get anything to run concerning submit????

    since the first post i've tried the alternative to the 'standard' submit :
    <input type="button" value="submit" onClick="verify (this.form)">

    the code so far in 'verify()' is only a confirm() but that won't even come
    up
    function verify(f)
    // verifies all the fields set for verification and messages
    {
    confirm('return true=ok or false=cancel');
    return true;
    }

    "bbxrider" <bbxrider1@comc ast.net> wrote in message
    news:YxGUa.1560 37$H17.55379@sc crnsc02...[color=blue]
    > the onreset is working but problem somewhere in the onsubmit or the[/color]
    function[color=blue]
    > it calls.
    > i have abbreviated the called verfiy function for now just to get the[/color]
    basic[color=blue]
    > onsubmit part working
    > basically the screen just gives a flash and it also alters the initial[/color]
    html[color=blue]
    > code after the form tag,
    > which seems really weird to me
    > this is kind of long but pretty basic i think
    > need some help please
    >
    > onsubmit and reset code:
    > <FORM onSubmit="
    > this.firstname. optional=true;
    > this.lastname.o ptional=true;
    > this.addr1.opti onal=true;
    > this.city.optio nal=true;
    > this.state.opti onal=true;
    > this.zip.min=0;
    > this.zip.max=99 999;
    > this.homephone. optional=true;
    > this.email.opti onal=true;
    > return verify(this);
    > "
    > onreset = "
    > return confirm('do you really want to erase '+
    > 'everything entered and start over from scratch?');
    > "[color=green]
    > >[/color]
    > html code for the form, the verify function is after all the html code
    >
    > the verify function:
    > <script languauge="java script">
    > function verify(f)
    > // verifies all the fields set for verification and messages
    > {
    > if confirm('this will return true(ok) or false(cancel)' {
    > return true;
    > else
    > return false;
    > }
    > var msg;
    > var empFld = "";l
    > var errors = ""
    > ..............l ots more verification code here once i can at least get a
    > confirm to display
    > }
    >
    >[/color]


    Comment

    Working...