473,387 Members | 1,495 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

pass data between ASP and JSP pages

My problem is to allow ASP to interact with JSP, and I pass JavaScript
object in my approach,
but I wonder if it will work in network, not just in local machine.

For testing purposes, the following are page1.html and page2.html that use
Array JavaScript object
to pass data back and forth. page1.html is able to
transfer data to page2.html, but page2.html has trouble to transfer data
back to page1.html.

I am now using
args["fname"] = document.InputForm.fname.value;
window.returnValue = args;

to pass data back to page1.html, but still not working. Any ideas??
Please advise the correct approach to my problem! Thanks!

----------------------------------------------------------------------------
--------------------
//page1.html
<html>
<head>
<script type="text/javascript">
function openwindow()
{
var args = new Array();
args["fname"] = document.InputForm.fname.value;
var sReturn = window.showModalDialog("page2.html", args,
"dialogHeight:700px; dialogWidth:500px;");
alert("window.returnValue = " + window.returnValue);
}
</script>
</head>
<body>
<H2>Page 1</H2>
<form name="InputForm">
<P>name: <input type="text" name="fname">
<P><input type="button" value="validate" onclick="openwindow()">
</form>
</body>
</html>

----------------------------------------------------------------------------
--------------------
//page2.html
<html>
<head>
<script type="text/javascript">
var args = window.dialogArguments;
function window_onload()
{
document.InputForm.fname.value = args["fname"];
}
function OK()
{
args["fname"] = document.InputForm.fname.value;
alert("args = " + args); //empty!!
window.returnValue = args;
window.close();
}
</script>
</head>
<H2>Page 2</H2>
<body onload="window_onload()">
<form name="InputForm">
<P>name: <input type="text" name="fname">
<P><input type="button" value="validate" onClick="OK()">
</form>
</body>
</html>
Jul 19 '05 #1
0 2416

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

Similar topics

5
by: John | last post by:
I would like to pass array variables between URLs but I don't know how. I know its possible with sessions, but sessions can become useless if cookies are disabled. I have unsuccessfully tried...
1
by: WeAreGoing! | last post by:
Hello. I need to transfer an MD5 digest number between two pages on different domains. I know this is generally not possible, but I have full access on one domain and can insert Javascript at...
3
by: Dthmtlgod | last post by:
I want to pass the value to two frames and two pages after hitting the submit button If my form I have this <form method="get" action="search2.asp" target="fSearch2"> I want to pass crPN to...
3
by: Peter | last post by:
I have a webform on this form is a User Control and another webform in IFRAME On the User Control there is a save button. I want to click this button and somehow tell the webpage in IFRAME that...
7
by: bonnie.tangyn | last post by:
Hello All Could anyone give me some suggestions on passing a long string between ASP pages? I have three asp pages - h_email content.asp, h_process_email.asp and h_preview_email.asp In the...
4
by: igotyourdotnet | last post by:
Is there a way to pass data from page to page without the use of a Session Variable or queryString? I need to pass drop down box selections from page to page and have the drop downs on the page be...
3
by: Aussie Rules | last post by:
Hi, I have a few aspx (.net2) form. The first form allows the user to enter into text box, and select values from drop downs The second form needs to use these values to process some data....
5
by: =?Utf-8?B?YzY3NjIyOA==?= | last post by:
Hi all, Is there an easier way to handle that? I used Javascript to handle this when our two domains are hosted on two different servers(on different networks) and our search engine marketing...
2
by: =?Utf-8?B?U3RldmVuIFRhbmc=?= | last post by:
I'm creating a XBAP application and want it take some input from webpage dynamically? what is the best way? how to do it? Best Regards Steven -- ======================= Steven Tang SYWWUYU)
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
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...

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.