473,722 Members | 2,240 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Pass infor between web pages in the same window

Hi,

I want to supply the previous page in current window with a string from
current page and the content in the previous one is changed
accordingly. I use <DIV> innerHTML to accomplish the DHTML and run
below JS in current page when deciding to go back.

window.history. go(-1);
document.getEle mentById('ObjA' ).innerHTML='my string';

But the "document" still refers to current page, even though I add a
document.clear( ) and location.replac e() statements right after
window.history. go(-1).

I find the archieve of this Group mentions a few solutions for a
similar problem, however they don't seems to work for my scenario.

The first solutin is to append the string to the previous URL. But my
first page was actually loaded from a HTML file and there is no CGI
program to receive the string.

The second solution is to use cookie to pass the infor. It seems the
string is to saved in the "document" object though. Since the
"document" is not updated, I won't be better off. Another problem is
this solution requires cookie to be turned on in the browser.

The third one is to use frame, which is not desirable nowadays if I am
not wrong.

Any input is appreciated.

Thanks,
Zhigao

Nov 2 '05 #1
2 1235
if you were in your child document and wanted to access an element in
the parent doc you could use:

self.opener.add ToForm('test');

this passes "test" to a function called addToForm that is in the parent
document.

self.opener.doc ument.myform.el ements['myelement'].value='test';

adds "test" to a element called "myelement" in the form called "myform"

Hope that helps some.

Nov 2 '05 #2
Thanks for the reply. But I am afraid "window.ope ner" refers to the
main window of a pop-up window. What I am dealing with is, however, two
documents in one window.

Nov 4 '05 #3

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

Similar topics

0
2454
by: Matt | last post by:
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.
0
1115
by: iffy agbim | last post by:
I have a form that displays information selected from an Access Data base. A select statement is used to do this on my asp page SQLQuery = "SELECT * FROM tblopgaCOm2 WHERE billNo = '" & Request.Form("BILLNO") & "' AND area LIKE 'AUDIT'" billNo and area are the 2 fields used together to make the record we need unique. example Bill d456(billNo) can be assigned to various depts(area). as many depts as it is assigned rep the many...
7
6861
by: Andy Fish | last post by:
Hi, I have a javascript solution where page A launches page B in a second window and then they can pass data between them. That's all well and good. Now say page B wants to navigate to page C (i.e. in the same window as page B is currently in, and I want to pass information from B to C. Currently I have it that B passes the information back to A before loading C, and C then picks it up from A.
1
13007
by: TErnst | last post by:
Hello All.... What I am attempting to do is have a link/button on a page (testpopup.cfm) that opens a popup page (popupwindow.cfm). The popup page displays a resultset from a query and the selected record needs to be passed through a query string/URL parameter to the original calling page and will be available in the body onload event of the calling page. I open the popup window and display the query results, I then click on
4
4815
by: news-server.tampabay.rr.com | last post by:
Hi, Below is a stock script I found which controls a framed environment. My problem is that if a URL has a query string attached, that string does not pass through. Can someone please let me know if and hopefully how, it will be possible to carry a query string through? This first part here is in the default.asp framed page. <SCRIPT LANGUAGE="JavaScript">
23
12275
by: John | last post by:
Last year, I remember finding a web page describing how to pass the name of a file to another web page, and have that web page load that image file. Now, I can't find my record of that (it was saved on another computer that I can't get to right now), and I can't remember what search parameters I used to find it when I googled the topic. Can anyone point me the right direction? I'd like to use a method that would be accessible to the...
2
1892
by: lanem | last post by:
I want to pop open a new window from my asp.net 2.0 web page. I want it to pass or submit the current viewstate to the new window. Does anyone know how to do that? Thanks.
0
8863
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8739
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
9384
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
9238
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...
0
9088
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
8052
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6681
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
3207
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
2602
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.