JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old January 8th, 2005, 01:07 PM
nuLime nuLime is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2004
Posts: 7 nuLime User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 m 15 sec
Reputation Power: 0
Question Copy values from one form to another in different window

I am trying to figure how I can transfer data from a form located in one window to a form located in another window. Both windows are already open. The first window contains the form named 'form1' with the values filled in. A new window named 'second_window' is opened and on it is an HTML page with an empty form named 'form2'. The text input element named 'your_name' in form 'form1' is filled with the value 'John Doe'. I need to get that value in 'your_name' on 'form1' to the text input element in 'form2' named 'realName'.

How could I go about accomplishing the above?

I have been searching the internet on how to do this for weeks but have not found anything that explains it. Any help would be appreciated.

Thanks!

Reply With Quote
  #2  
Old January 12th, 2005, 10:09 AM
MadCowDzz's Avatar
MadCowDzz MadCowDzz is offline
I'm Internet Famous
Dev Articles Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2003
Location: Toronto, Canada
Posts: 2,890 MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Week 16 h 14 m 9 sec
Reputation Power: 8
Are both windows children of a main window?
Or is one window a child of the other?

Reply With Quote
  #3  
Old January 12th, 2005, 10:26 AM
nuLime nuLime is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2004
Posts: 7 nuLime User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 m 15 sec
Reputation Power: 0
The first window is a parent and the other is a child. The first window has an <a href> link with target="NewFormWindow".

Reply With Quote
  #4  
Old January 12th, 2005, 04:26 PM
Anibal Anibal is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Posts: 176 Anibal User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 4 h 20 m 48 sec
Reputation Power: 4
Hey Mate!. Javascript is not really my line of work, so this is only a desperate intent to help you. If the second window is a child of the first, you can address the second window realName field from inside the first window as follows: SWindow.document.form2.realName.value

So, you could do:

Swindow = window.open(<page with form2>)

SWindow.document.form2.realName.value = document.form1.your_name.value

I'm not so sure about SWindow.document. Perhaps it is SWindow.form2 directly. Anyway, I think this should work. If not, sorry.

Good Luck

Anibal.

Reply With Quote
  #5  
Old January 13th, 2005, 09:44 AM
MadCowDzz's Avatar
MadCowDzz MadCowDzz is offline
I'm Internet Famous
Dev Articles Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2003
Location: Toronto, Canada
Posts: 2,890 MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Week 16 h 14 m 9 sec
Reputation Power: 8
You might want to look into the solution I presented in this thread:
http://forums.devarticles.com/showp...124&postcount=2

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingJavaScript Development > Copy values from one form to another in different window


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT