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

How To: Popup Website A from Website B?

svd
Hi all,

First off, I'm developing in VB.NET 2003.

I would like to have a button on Company A's web page display Company B's
web page in a popup window. It needs to pass a serialzed class object to the
popup web page, which can be picked up in its pageload() hander. Further,
closing the popup should return a serialized class object. I'm fine with the
serialization part, just confused over the popup and passing data part.

I think this can only be accomlished using javascript and a hidden field on
each web page. I tried a number of examples, but could never get any of them
to run properly.

Any help would be greatly appreaciated.

Thanks,

Steve
Jan 13 '07 #1
3 1217
I posted the skeleton of a solution to this at
http://groups-beta.google.com/group/...61483629a4dca5

Let me know if that's any help to you. Alternatively, let me know if it
_isn't_. I was doing exactly the same thing: sending initialisation
objects to a child window, performing work from user input, then
sending js objects back to the parent.
svd wrote:
Hi all,

First off, I'm developing in VB.NET 2003.

I would like to have a button on Company A's web page display Company B's
web page in a popup window. It needs to pass a serialzed class object to the
popup web page, which can be picked up in its pageload() hander. Further,
closing the popup should return a serialized class object. I'm fine with the
serialization part, just confused over the popup and passing data part.

I think this can only be accomlished using javascript and a hidden field on
each web page. I tried a number of examples, but could never get any of them
to run properly.

Any help would be greatly appreaciated.

Thanks,

Steve
Jan 13 '07 #2
moo
Totally lost.... A cleaner example would be helpful.
Steve
Jan 14 '07 #3
Okay, an example with no fluff. The extra bits in the other example are
there to allow your two pages to vary independently of one another. I
had the situation where I had to open several windows from the first
page, and used different callback functions for those windows.

Company A:
<html>
<head>
<script type="text/javascript">
var serializedObject = {Foo:"Foo", Bar:"Bar"};
var myChild;

function getInitializationObject(){ return serializedObject; }

function receiveObject(data) {alert("received :"+data);}

function openWindow(){myChild = window.open("companyB.htm");}
</script>
</head>

<body>
<input type="button" value="Talk to Company B" onclick="openWindow()"
/>
</body>
</html>

----------------

Company B:

<html>
<head>
<script type="text/javascript">

function sendValue()
{
var result = {result:
document.getElementById("senderBox1").value};
this.opener.receiveObject(result);
}

function Handshake()
{
var initObject = this.opener.getInitializationObject();
alert("received :"+initObject);
}
</script>
</head>
<body onload="Handshake()">

<input type="text" id="senderBox1" />
<input type="button" onclick="sendValue()" value="send value" />
</body>
</html>

Jan 14 '07 #4

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

Similar topics

4
by: Davey | last post by:
I have a website which has a popup window (this only opens when the user chooses to open it). In the popup window I have a <select> control which lists a selection of "classes". Each class has a...
4
by: Davey | last post by:
I have a website which has a popup window (this only opens when the user chooses to open it). In the popup window I have a <select> control which lists a selection of "classes". Each class has a...
11
by: Alex.Svetos | last post by:
Hello, I'm trying to get a popup to keep focus when it is re-clicked. The script below is supposed to produce this exact behaviour, however it doesn't work, at least on firefox 1.0.7 and moz...
2
by: =?Utf-8?B?U3VyZXNoIFJlZGR5?= | last post by:
I am getting a strange problem with IE7 tabs. The web application I am working (developed in ASP.Net, .Net 2.0), will show a popup message with the count down timer 2 minutes before session time...
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: 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...
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.