SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Apr 2006
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    xAddEventListener - submit

    hello guys

    Can anyone tell me how i can add an xAddEventListener to be a ble to submit

    for example
    out.println("xAddEventListener(xGetElementById('" + desc.getName() + "'), 'blur', JsValidations.checkMaxLength, false);");

    the above code is generating javascript for "on blur " of a particular field on the jsp

    Now i need to add the same for a submit button whereby a set of Javascripts will be generated/called

  2. #2
    SitePoint Wizard chris_fuel's Avatar
    Join Date
    May 2006
    Location
    Ventura, CA
    Posts
    2,751
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Most submit functionality exists on the 'click' event. So that's what you'd need right there. While I can't quite explain that in java, normally it's:

    HTML Code:
    <input type="submit" onclick="validate()"/>


Bookmarks

Posting Permissions

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