vbalajittl
asked on
how to use Ajax
Hi,
I need help. Please find the attached on which I want a solution as either a sample example or suggest a solution.
Regards,
Kalpana
Expert-Exchange.docx
I need help. Please find the attached on which I want a solution as either a sample example or suggest a solution.
Regards,
Kalpana
Expert-Exchange.docx
I don't see a question so what do you have that is not working?
From the word doc for everyone's benefit:
My main issue is how use ajax in strusts 1.2 in JSP, to attach the list of category A,B,C,D coming from serverside to client on change event/on click event. Can you please share with some sample example in struts 1.2. Or suggest some better option to achieve my target.
Screen design
http://blog.djakapm.com/2010/11/30/how-to-write-simple-response-for-ajax-request-using-jquery-and-struts/
http://venur.blogspot.in/2006/01/struts-and-ajax-by-example-1.html
if you have already started the development then in that case where you have struck in your requirement,
http://venur.blogspot.in/2006/01/struts-and-ajax-by-example-1.html
if you have already started the development then in that case where you have struck in your requirement,
ASKER
I have 4 drop down list and their data is dependent on lower to first. i.e. items in 4th drop down list is dependent on 3...items in 2nd drop down are dependent on what is selected in 1st drop down list.
I am using Jquery on fist drop down list on click event calling with dropdown list id.
$("#SELECT1").click(functi on(){})
or
$("#SELECT1").change(funct ion(){})
both are not working.
Note: all 4 drop down have same styleclass so can't use class here in above code.
Regards,
Kalpana
I am using Jquery on fist drop down list on click event calling with dropdown list id.
$("#SELECT1").click(functi
or
$("#SELECT1").change(funct
both are not working.
Note: all 4 drop down have same styleclass so can't use class here in above code.
Regards,
Kalpana
can you send html source code?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi,
I used above code and got my solution for first dropdown List. I have to use this on change event so modified the code like as below
$( "#SELECT1" ).live( "change", function() {
alert( "click!" );
});
and its working as per my requirement. Thanks. Will use the same for rest 3 and update you. thanks once again for quick response.
Regards,
Kalpana
I used above code and got my solution for first dropdown List. I have to use this on change event so modified the code like as below
$( "#SELECT1" ).live( "change", function() {
alert( "click!" );
});
and its working as per my requirement. Thanks. Will use the same for rest 3 and update you. thanks once again for quick response.
Regards,
Kalpana
ASKER
Now am facing new issue. In below code m not able to get the selected value of the drop down 1.
$( "#SELECT1" ).live( "change", function() {
alert("Value1 is "+$('#SELECT1').val()); //line 1
alert("Value2 is "+$('#SELECT1 :selected).val()); //line 2
alert("Value3 is "+$('#SELECT1 option:selected).val()); //line 3
});
No value is returned vai line 1,2,3. Pls help
Regards,
Kalpana
$( "#SELECT1" ).live( "change", function() {
alert("Value1 is "+$('#SELECT1').val()); //line 1
alert("Value2 is "+$('#SELECT1 :selected).val()); //line 2
alert("Value3 is "+$('#SELECT1 option:selected).val()); //line 3
});
No value is returned vai line 1,2,3. Pls help
Regards,
Kalpana
ASKER
Now am facing new issue. In below code m not able to get the selected value of the drop down 1.
$( "#SELECT1" ).live( "change", function() {
alert("Value1 is "+$('#SELECT1').val()); //line 1
alert("Value2 is "+$('#SELECT1 :selected).val()); //line 2
alert("Value3 is "+$('#SELECT1 option:selected).val()); //line 3
});
No value is returned vai line 1,2,3. Pls help
Regards,
Kalpana
$( "#SELECT1" ).live( "change", function() {
alert("Value1 is "+$('#SELECT1').val()); //line 1
alert("Value2 is "+$('#SELECT1 :selected).val()); //line 2
alert("Value3 is "+$('#SELECT1 option:selected).val()); //line 3
});
No value is returned vai line 1,2,3. Pls help
Regards,
Kalpana
ASKER
I've requested that this question be closed as follows:
Accepted answer: 0 points for vbalajittl's comment #a39684839
for the following reason:
I modified the solution as per my requirement.
Accepted answer: 0 points for vbalajittl's comment #a39684839
for the following reason:
I modified the solution as per my requirement.
ASKER
Need to be updated as per my requirements and I modified this and got the solution. thank you very much.
Regards,
Kalpana
Regards,
Kalpana