updateField action event type

  • Nobody/Anonymous


    can i change the the event that fires the updateField action from click to change of input field? can the action be triggered by an input field was already assigned to the autocomplete tag?

    netanelwe AT gmail.com

    • Darren Spurgeon

      Darren Spurgeon - 2005-09-25

      You should be able to do this.  Try setting the eventType property on the updateField tag.  Acceptable values for this property include the standard JavaScript events minus the 'on' prefix.  For instance, try "click", "mouseover", "focus", etc.


      • Alex Kayser

        Alex Kayser - 2007-01-23

        I need use the onChange event, no button. Than, I make this:

        <input type="text" id="mph" id="action"/>

          parser="new ResponseXmlParser()"
          postFunction="resetProgress" />

        But don't work... When is the error??

        • Nobody/Anonymous

          How come no one has ever posted a solution to this problem????

          • earlofsiberia

            earlofsiberia - 2007-09-28

            The updateField tag only appears to be working with onclick eventtype.

            I have managed to mimic a button click using javascript. Here is the code:

            **Note that you have to do this differently for IE and DOM compliant browsers e.g. Firefox:

            function mimicClick() {
            if(chckBrowser()=='msie') //check the browser type
            document.Form.action.click(); // Only works with IE (where 'action; is your button name)
            simulateClick(); // If not IE call the simulate click method


            function simulateClick() {
              var evt = document.createEvent("MouseEvents");
              evt.initMouseEvent("click", true, true, window,
                0, 0, 0, 0, 0, false, false, false, false, 0, null);
              var el = document.getElementById("action");
              el.click && el.click();


            <input id="action" name="action" type="button" value="Calculate"/>

            <ajax:updateField baseUrl="<%=servletURL %>" source="rrp"
                target="psd,lct" action="action"
                parser="new ResponseXmlParser()" eventType="click" />

        • Nobody/Anonymous

          Any Resolution for this ?

    • Nobody/Anonymous

           I am also having same kind of issue. Searching through the message log found this one. I am trying to use "blur" event type so that once textbox looses focus, i want to fill the other relevant fields. Even thought i specified "eventtype", it is still responding to "onClick" on the "action" that was defined. Here "action" is the field1. Please suggest.


    • Nobody/Anonymous

          I found the problem/feature. In ajaxtags1.1.js for the updateField actionType is hardcoded to "Click" which is causing this problem. I changed it to "blur" and everything is solved.
          Is there any reference documentation on the javascript like how to debug or where to start and follow up if i want to debug and change whereever required to my needs.


      • Darren Spurgeon

        Darren Spurgeon - 2005-10-13

        Very true.  That bit of hardcoding is a bug--we should be delegating to the eventType property set on the JSP tag.  I'll make sure a fix gets into the next release.

        As to debugging JavaScript, I use Firefox's JavaScript Debugger extension, also known as the Venkman extension.  For IE, there is a script debugger distributed by Microsoft: http://msdn.microsoft.com/library/en-us/sdbug/Html/sdbug_1.asp

        We always encourage people to debug as much as possible before posting to the forums.  When you do post, it's best to indicate the browser and version along with any JS errors and code line numbers.  Relevant code (no need to post the entire page) is important, too, because we can see if there are any mismatches between JSP-HTML or HTML-JavaScript.


    • Yogesh

      Yogesh - 2009-06-15

      please tell me anyone how to use
      parser="new ResponseXmlParser()"

      what it required to convert to ResponseXmlParser



Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks