Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Passing values between components
Sujay0825
I am new to LiveSite. I am creating a form where each item(like a textbox, dropdown etc..) are seperate components placed in the same page. I do have a submit button component, which has a submit button. When this button is clicked, a jsp psge is called. now my requirement is that all values from the page(i.e tha value in the textbox, for example) must be passed to the jsp.
Can anyone give me an idea as to how I can do this?
Find more posts tagged with
Comments
Rick Poulin
The problem with your approach is that there's no good place to put your <form> tag. The only suggestion I can think of is to use Javascript to catch the submit event, collect all parameter values, and then either populate hidden fields in your submit component OR do the form submission via AJAX.
sheikh1
In addition to Rick's suggestion you can also use external java class which are designed to be used for interpage communication if not inter component. There is an example with component guide there which uses a form to submit values (similar approach as taking one html field as one component), the next page reads it and sends an email. Though the actual email sending code is throwing exceptions to me.
Here is the URL for the feedback form example
http://hostname:1776/Component+Guide/Marketing/Form+Builder/Feedback+Form.page?
Rick Poulin
I've only glanced at it, but that sample page is basically an implementation of what I said above. There's no server-side interaction between components here. That wouldn't help you anyway, because the data is only entered by the user after the page has been rendered. You need a client-side process to collect the disparate data points back into a single collection, and Javascript is the only real way to do that. That is why the sample feedback form *requires* those JS includes. If you don't have them there, I expect the submit either submits nothing or fails outright.
sagarshah
Hi I am new to livesite.i am also facing same issue..could you please help me..how to pass the values in component after crating textbox.