javascript not responding

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

    javascript not responding

    Hi,

    I got a little problem with executing a javascript. I have a simple html
    page with a textfield and a button. When I hit the button a javascript will
    check the value of the textfield. If it's a right value, a new page will be
    opened otherwise I get an error message.

    That works but now I want to execute the script also if I hit enter after
    typing in the textbox. The webpage will be loaded but the script won't be
    executed. Even stranger, if I add a second textbox to the page it suddenly
    works?! That's fine but I want to get rid off that second box, it has to
    work with one.

    Greetings,
    Rick


  • Stuart Palmer

    #2
    Re: javascript not responding

    Use the forms onSubmit property to run the function that does the
    validation.

    Stu

    "Rick" <aso3rick@hotma il.com> wrote in message
    news:3fa90236$0 $58705$e4fe514c @news.xs4all.nl ...[color=blue]
    > Hi,
    >
    > I got a little problem with executing a javascript. I have a simple html
    > page with a textfield and a button. When I hit the button a javascript[/color]
    will[color=blue]
    > check the value of the textfield. If it's a right value, a new page will[/color]
    be[color=blue]
    > opened otherwise I get an error message.
    >
    > That works but now I want to execute the script also if I hit enter after
    > typing in the textbox. The webpage will be loaded but the script won't be
    > executed. Even stranger, if I add a second textbox to the page it suddenly
    > works?! That's fine but I want to get rid off that second box, it has to
    > work with one.
    >
    > Greetings,
    > Rick
    >
    >[/color]


    Comment

    Working...