Wrox Programmer Forums
|
Classic ASP Professional For advanced coder questions in ASP 3. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 22nd, 2004, 03:52 AM
Authorized User
 
Join Date: Nov 2003
Posts: 44
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to eapsokha
Default Send value cross form

I have two pages A and B. Each page consists of form. While filling form in page A, I need to add one more record into the select control. But I want to keep the current page. As so, I need to open page B and fill the form. Finally, when a new record inserted, then it will be added automatically to the field in page A. Please help me!!!
__________________
Mr. Sokha Eap
Webmaster
UNDP Cambodia
 
Old September 22nd, 2004, 04:06 AM
Friend of Wrox
 
Join Date: Jun 2004
Posts: 331
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to qazi_nomi
Default

For this you can be made some hidden input feilds in form of page B and assign the values of the input feilds of the Page A



Numan
--------------------------------------------------
Love is the most precious thing of this world. So find it and grab it!
 
Old September 22nd, 2004, 04:49 AM
Friend of Wrox
 
Join Date: Sep 2003
Posts: 363
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi,

  As i understand, You enter the fields in form A. And when u click the button on this page(A) open new window contains the page B. I think u r passing the values from form A to form B. Those values are passed to next form thru querystring. Fill the form in page B. Submit this form to a page where you insert record into database. At the same time generate a dynamic form in that page and fill hidden fields with the values those you want to place in form A.

After that do a small client script.

opener.document.forms("formname").item("controlnam e").value=document.forms[0].item("hiddenformfield").value;
self.close();

I think its enough.

-----------
Rajani


 
Old September 22nd, 2004, 10:15 PM
Authorized User
 
Join Date: Nov 2003
Posts: 44
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to eapsokha
Default

I want to return the filled value from page B to drop-down box in page A as an option. <SELECT><OPTION>...</OPTION></SELECT>
 
Old September 22nd, 2004, 11:29 PM
Friend of Wrox
 
Join Date: Sep 2003
Posts: 363
Thanks: 0
Thanked 1 Time in 1 Post
Default

So, do coding in page B(client side)

var opt=document.createElement("option");
opt.text=newvalue; //displayed content in the select control
opt.value=newvalue; //submitted content in the select control

opener.document.forms[0].item(selectcontrolname).add(opt);

It will add the new item to the select control


-----------
Rajani

 
Old October 20th, 2004, 07:48 AM
Friend of Wrox
 
Join Date: Oct 2004
Posts: 109
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to anubhav.kumar
Default

Thanks to rajani for this client side script.

i am handling the same problem by passing the new value through query string (say "newValue=abc") back to page A where i have explicitly added
<% if len(request.querystring("newVal"))>0 then%>
<option><%=request.querystring("newValue")%></option>"
<% end if%>

If the page A is called directly then this is a null string and 'IF Statement' fails. In case it is called by Page B then the value gets added.

Anubhav Kumar





Similar Threads
Thread Thread Starter Forum Replies Last Post
send e-mail form but.. Dejitan Classic ASP Basics 1 January 4th, 2007 06:09 AM
Internal Form won't send. PLEASE HELP! underscore10304 Dreamweaver (all versions) 1 January 27th, 2006 01:05 PM
send form values to different page hastikeyvan Dreamweaver (all versions) 24 August 29th, 2005 04:10 AM
Send Form To Customised Dll Israr .NET Framework 2.0 0 December 9th, 2004 02:00 AM
Send form data using VB ratheeshpkr Pro VB 6 8 October 18th, 2004 07:29 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.