473,666 Members | 2,075 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

send variables to function in new window

hi

I have a javascript function, which gets parameters from a form and then
opens a new form in another window.
The new window also has a javascript function with parameters. My question
is, how can I send the variable values from one function to another in a new
window?

Thanks,
Marco
Jul 20 '05 #1
3 6513
Marco Alting wrote:
hi

I have a javascript function, which gets parameters from a form and then
opens a new form in another window.
The new window also has a javascript function with parameters. My question
is, how can I send the variable values from one function to another in a
new window?

Thanks,
Marco


simply by adressing the window first.
You have 2 windows, named window1 and window2.

so if you have a function win2func in window2 and want to call that from
window 1 use:
window2.win2fun c("hello!");

Of course you'll have to replace "hello!" by some value from one of your
formfields.
Jul 20 '05 #2
It's not exactly what I want, I want to pass the variable from window 1 to
window 2 and use it there in a function.
"Erwin Moller"
<si************ *************** *************** @spamyourself.c om> schreef in
bericht news:3f******** *************** @news.xs4all.nl ...
Marco Alting wrote:
hi

I have a javascript function, which gets parameters from a form and then
opens a new form in another window.
The new window also has a javascript function with parameters. My question is, how can I send the variable values from one function to another in a
new window?

Thanks,
Marco


simply by adressing the window first.
You have 2 windows, named window1 and window2.

so if you have a function win2func in window2 and want to call that from
window 1 use:
window2.win2fun c("hello!");

Of course you'll have to replace "hello!" by some value from one of your
formfields.

Jul 20 '05 #3
On Fri, 12 Sep 2003 09:41:30 +0000, Marco Alting wrote:
It's not exactly what I want, I want to pass the variable from window 1 to
window 2 and use it there in a function.

You could use window.opener.

ciao

gpaolini


"Erwin Moller"
<si************ *************** *************** @spamyourself.c om> schreef in

Jul 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
3560
by: Mosher | last post by:
Hello all, is there any way to send php variables to another popup html window? I just want users to be able to click on a hyperlink like this... e.g., <a target=new href="www.mydomain.com/main.php?username=test&id=50> click here </a> ....that will popup another window. This new window should be able to use those variables. Thanks in advance.
4
3605
by: Daniel | last post by:
Hullo =) Inspired by another guy's questions here I've created an isset function that works (almost) like the one in native PHP: function isset(variablename) { return(typeof(eval("window."+variablename))!='undefined'); } I use it like if(isset('myVar') { alert(myVar); }
5
5316
by: Richard A. DeVenezia | last post by:
Dear Experts: Suppose I have global variables: x1, x2, x3 and I have a function that needs to assign a value to a new global variable x4 something like function foo () { count = 0;
3
1759
by: Chris | last post by:
Hi, I'm really begginer in javascript. I created a form in a pop-up opened with javascript. how to recover variables of the form in the main page. Thanks for your help Chris.
15
3296
by: Steve Horrillo | last post by:
I can't figure out why this script won't insert the subject in the email and why can't I control the font and size being used? I'm not sure where to post this. Let me know where if this is OT. <SCRIPT LANGUAGE="JavaScript"> <!-- Begin function isPPC() { if (navigator.appVersion.indexOf("PPC") != -1) return true; else return false;
2
9156
by: Patient Guy | last post by:
I have a library of functions representing a filesystem interface (essentially a file selection interface, to be used in opening/reading/writing/closing files). Heavily scripted HTML document #1, very application-like, must include the JS file for this library of functions. One reason is that it must call a function to name a "callback" function, and within its own script block, must define the callback function. The callback handles...
3
1823
by: Lars Netzel | last post by:
Hello! I have a button, in the click event I have this code: ---------------------------------------------------------------------------- ---------------------------- Response.Write("<script language=javascript>window.open('CrystalReports.aspx?FromDate=" & txtFromDate.Text & "&ToDate=" & txtToDate.Text & "&File=" & drpReports.SelectedValue & "');</script>")
0
3889
by: Ralstoj | last post by:
Hi I am programing in Autocad with VB Autodesk have not given users access to new note function in Autocad CIVIL3d API. I am trying to work round this by creating notes using the sendkey command in Vb. I can get the add note dialog box to come up ok but it does not have focus as I believe it is a modeless dialog box as it gets focus when you move the mouse cursor over it. What I am after is a VB eample on how to send key strokes to the...
1
1610
by: phoenix917 | last post by:
I have been working on this code for 5 days... I have read multiple tutorials and looked at various code. This is my third forum try... :) My instructor refuses to help me. I think it's because I'm a good student. They assume you know it all. :) Well, I don't and I'm getting a little frustrated and wonder if you guys can shed some light? It's an 8 ball. It works. I've tested and tested but can't find where to put the oldQuestion...
0
8356
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8871
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8783
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8552
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8640
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
4198
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4369
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2773
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1776
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.