PDA

View Full Version : Need to use data from one *.js to another *.js



malli1988
24 May 2015, 10:28 PM
Hi,
I have two js files,1st on displaying the screen with submit button.After clicking on submit i want to open new page and i want input values from the form(screen) to this new page.I want to utilize those input values to display report in new page.Can you suggest on this ?

thanks!

tristan.lee
26 May 2015, 11:43 AM
Are you posting this form? Opening a new window? I'm not sure I understand the end goal and how you're wishing to utilize Javascript to handle this.

malli1988
27 May 2015, 1:34 AM
yes am opening a new window(page) on Submit.I want input values which i entered in form into new page.I am working with extJS.

tristan.lee
27 May 2015, 6:50 AM
Is this a new browser window or a new Ext.Window?

If this is a new browser window, do you have a server-side solution in place to which you can POST the form values? If not, and you plan to handle this purely in Javascript, you may want to check out this thread: http://stackoverflow.com/questions/14693758/passing-form-data-to-another-html-page#answer-14693871 You will need to submit the form using the GET method, and then on the opening page, parse the URI's query string to get the values.