473,378 Members | 1,099 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,378 software developers and data experts.

2 ASP pages communicate with JavaScript object in 2 machines

I wrote 2 ASP pages that communicate with JavaScript objects. page1.asp and
page2.asp are put in separate servers in separated machines. If I put in
single machine, it is fine. Now it has Runtime error: 'params.test' is null
or not an object. Any ideas??

//page1.asp
<HTML>
<HEAD>
<script type="text/javascript">
function openwindow()
{ var outparams = new Array();
outparams["test"] = "ee";
alert("asp page1 param = " + outparams["test"]);
var sReturn = window.showModalDialog("page2.asp", outparams,
"dialogHeight:700px; dialogWidth:500px;");
}
</script>
</HEAD>
<BODY>
<P><INPUT type=button value="Validate Address" name=btnValidate
onclick="openwindow()">
</BODY>
</HTML>

//page2.asp
<HTML>
<HEAD>
<script type="text/javascript">
function window_onload()
{
var outparams = window.dialogArguments;
alert("asp page2 param = " + outparams["test"]);
}
</script>
</HEAD>
<BODY onload="window_onload()">
</BODY>
</HTML>


Jul 19 '05 #1
1 1267
Matt wrote:
I wrote 2 ASP pages that communicate with JavaScript objects.
page1.asp and page2.asp are put in separate servers in separated
machines. If I put in single machine, it is fine. Now it has Runtime
error: 'params.test' is null or not an object. Any ideas??

//page1.asp
<HTML>
<HEAD>
<script type="text/javascript">
function openwindow()
{ var outparams = new Array();
outparams["test"] = "ee";
alert("asp page1 param = " + outparams["test"]);
var sReturn = window.showModalDialog("page2.asp", outparams,
"dialogHeight:700px; dialogWidth:500px;");
}
</script>
</HEAD>
<BODY>
<P><INPUT type=button value="Validate Address" name=btnValidate
onclick="openwindow()">
</BODY>
</HTML>

//page2.asp
<HTML>
<HEAD>
<script type="text/javascript">
function window_onload()
{
var outparams = window.dialogArguments;
alert("asp page2 param = " + outparams["test"]);
}
</script>
</HEAD>
<BODY onload="window_onload()">
</BODY>
</HTML>

This is all client-side code - nothing to do with asp (yes, yes - I know
you've given your pages ".asp" extensions, but the fact is, this code sould
run just as well if you gave your pages ".htm" extensions). In the future
please post client-side questions in a javascript or jscript group.

Unfortunately, I cannot answer your question becasue I do not see a line
referencing 'params.test' in your code. Please include that line when you
post to the relevant newsgroup.

Bob Barrows

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Jul 19 '05 #2

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

Similar topics

1
by: bscofield | last post by:
Hi, I'm a db app. developer and I am re-writing some helps in javascript & HTML. The Javascript is for form flow and design and HTML just to display the helps. I use a seperate app. development...
17
by: Ian | last post by:
Hi there, Can anybody tell me where I can find a standards documents like you have in c#. I am trying to write javascript and would like to know what standards are i.e. Where to put the...
3
by: Lyle Fairfield | last post by:
In a recent thread there has been discussion about Data Access Pages. It has been suggested that they are not permitted on many or most secure sites. Perhaps, that it is so, although I know of no...
4
by: rajesh | last post by:
here is my coding can any one help me to communicate b\w applet and jsp,... "appleeet.jsp" ------------ <%@ page language="java" %> <jsp:plugin type="applet" code="sample2.class"
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.