nrao
01-27-2011, 05:23 AM
[Hi All,
iam new to jquery .i have scrip;et code in the JSP which generates grid of text boxes on a dialog and on click of savebutton i have written logic for the saveDialog .i need to capture id of the text boxes in the Java script
this is the scrip;et in jsp
<div style="border-style:solid;border-width:1px;" class="preferredAirline">
<% Vector<String> labelList = new Vector<String>();
labelList.add("P11");
labelList.add("P21");
ListIterator<String> labelListIterator = labelList.listIterator();
while(labelListIterator.hasNext())
{
String lableName = labelListIterator.next();
%>
<s:text name="<%= lableName %>" size="2" onkeyup="if(this.value.length > 2){ this.value = this.value.substr(0,2); return false;}"
onblur="this.value = this.value.toUpperCase();"
id="<%= lableName %>"/>
<%} %>
<br/>
<div style="float: right;">
<s:button name="save" value="Save" id="saveDialog"/>
</div>
And how do we get the values of the text boxes populated on to the anothe jsp we need to write a java script function
iam new to jquery .i have scrip;et code in the JSP which generates grid of text boxes on a dialog and on click of savebutton i have written logic for the saveDialog .i need to capture id of the text boxes in the Java script
this is the scrip;et in jsp
<div style="border-style:solid;border-width:1px;" class="preferredAirline">
<% Vector<String> labelList = new Vector<String>();
labelList.add("P11");
labelList.add("P21");
ListIterator<String> labelListIterator = labelList.listIterator();
while(labelListIterator.hasNext())
{
String lableName = labelListIterator.next();
%>
<s:text name="<%= lableName %>" size="2" onkeyup="if(this.value.length > 2){ this.value = this.value.substr(0,2); return false;}"
onblur="this.value = this.value.toUpperCase();"
id="<%= lableName %>"/>
<%} %>
<br/>
<div style="float: right;">
<s:button name="save" value="Save" id="saveDialog"/>
</div>
And how do we get the values of the text boxes populated on to the anothe jsp we need to write a java script function