Manish
asked on
passing HTML value to JSP
Frds,
I want to pass selected value from HTML(may be Text or drop down)
to JSP code ?
Thanks in advance ...
karan
I want to pass selected value from HTML(may be Text or drop down)
to JSP code ?
Thanks in advance ...
karan
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You will have to resubmit the page and retreve the parameter.
for example:
<%
if (request.getParameter("myT extField") != null) {
%> alert('Parameter found: <%=request.getParameter("m yTextField ")%>');
<%}
%>
<form method="post" name="myform" action="#">
<input type="text" name="myTextField" onBlur="this.form.submit() ;">
</form>
/Nick
for example:
<%
if (request.getParameter("myT
%> alert('Parameter found: <%=request.getParameter("m
<%}
%>
<form method="post" name="myform" action="#">
<input type="text" name="myTextField" onBlur="this.form.submit()
</form>
/Nick
ignore my first comment on "request.getParameter("sub mit");"...
ASKER
I want to use on same page without submitting ?
Is it possible?
Is it possible?
For the same page, you can always use METHOD=get and submit to the same page.
To retrieve it, you do the same thing.
To retrieve it, you do the same thing.
<form method="get">
...
</form>
...
</form>
>>I want to use on same page without submitting ?
>>Is it possible?
I'm afraid not.
>>Is it possible?
I'm afraid not.
ASKER
But I have to remember all other selected value..
Is it possible to pass the value to javascript and use in
java code of jsp?
Is it possible to pass the value to javascript and use in
java code of jsp?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
So without sumit it is not possible?
that's right
ASKER
Thanks hongjun and Nick..
U both cleared my problem...
There should be sharing points among u...
karan
U both cleared my problem...
There should be sharing points among u...
karan
There is a feature to share points ;) not now though, it's too late since it's already accepted.
No problem.
/Nick
No problem.
/Nick
Nick, collect your points below
https://www.experts-exchange.com/questions/21154871/points-to-Nick-72.html
https://www.experts-exchange.com/questions/21154871/points-to-Nick-72.html
@ee_ai_construct
OK. I am fine with the split if the questionner replies.
hongjun
OK. I am fine with the split if the questionner replies.
hongjun
ASKER
How to share points ,Sorry I dont know?
Yeah.
Thank you guys, I appreciate it :)
/Nick
/Nick
out.println(request.getPar
hongjun