How to update the value of a hidden filed using ajax?

 I was trying to do something like the following 

listYears.add(new AjaxFormComponentUpdatingBehavior("onchange") {

            protected void onUpdate(AjaxRequestTarget target) 

            {
                

                HiddenField field = (HiddenField) get("hiddenDateCheck" );

                field.setConvertedInput("blahblah blan");

                   target.addComponent(hiddenField2);

                  }  

            });

 

Two problems….one is the value is never changed when I view the source of
the html and two,  I can no longer use document.getElementById in my
javascript because I had to set the outputMarkupId = true for the hidden
field which overrides the setattribute modifier on “ID”



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-update-the-value-of-a-Hidden-Field-using-Ajax-tp3760600p3760600.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to