i have a jsp page which initializes itself from a database...it has a series of checkboxes that are being created from the database values...now once the user selects the boxes required by him i have designed a function dat reads the values from the checked fields n stores them in an array of variables...i want to pass this variable to another page....pls help...need this work done by tomo mrng.........thnx in advanced
k2cool_87
0
Newbie Poster
Recommended Answers
Jump to PostIf you share with us how you
designed a function dat reads the values from the checked fields n stores them in an array of variables
we may share with you how to pass it to next page
Jump to PostAFAIK you cannot pass values assigned to variables in Javascript to your Server Side JSP pages without putting the actual values inside some form fields viz. the "input" element (eg hidden fields, text fields etc) or "select" element etc.
Either that our you can pass them as part of the …
Jump to PostHi,
You can pass formdata to another jsp through attribute action="ur.jsp"...<form name=f id=f method=post action=ur.jsp> <input type=checkbox1 value=y /> <input type=checkbox2 value=y /> </form>
then in "ur.jsp" .. write code something like this..
----------------------String c1 = request.getParameter("checkbox1"); String c2 = request.getParameter("checkbox2");
--------
…
Jump to PostAs already stephen said you cannot pass JavaScript stored variables to another JSP.
PS: Would be nice if you start using full sentence English, as the above is against forum rules
All 13 Replies
peter_budo
2,532
Code tags enforcer
Team Colleague
Featured Poster
k2cool_87
0
Newbie Poster
stephen84s
550
Nearly a Posting Virtuoso
Featured Poster
sawant_nitesh
0
Light Poster
k2cool_87
0
Newbie Poster
peter_budo
2,532
Code tags enforcer
Team Colleague
Featured Poster
k2cool_87
0
Newbie Poster
sawant_nitesh
0
Light Poster
k2cool_87
0
Newbie Poster
peter_budo
2,532
Code tags enforcer
Team Colleague
Featured Poster
k2cool_87
0
Newbie Poster
peter_budo
2,532
Code tags enforcer
Team Colleague
Featured Poster
k2cool_87
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.