RE: Passing paramters between windows
by "Brett Errington" <brett(at)opensearch.com>
|
Date: |
Sun, 5 May 2002 21:55:37 +0800 |
To: |
<hwg-techniques(at)hwg.org> |
In-Reply-To: |
hilma |
|
todo: View
Thread,
Original
|
|
Hi
You can do this three ways (well probabli more but these are the first
that come to mind).
1. Just simply set a variable in the parent (source) window and retrieve
it in the child window (photo window).
In Parents:
MyVariable = "something";
In Child:
Image = parent.MyVariable;
2. Tag the variables on the end of the URL string as parameters like so:
http://www.domain.com/page.html?MyVariable=Something
You can then use JavaScript to retrieve the values from the URL. You can
find instructions on this at http://imptech.net.
3. If you got access to a server side language such as ASP then you can
do the same thing as number two but instead of using JavaScript, use the
ASP to retrieve the values which is a lot easier. For example in ASP all
you do is:
MyVariable = request.querystring("MyVariable")
If you need more help let me know.
Later,
Mr Brett
"That's a pain that will surely linger, and that's no lie"
- Ed Grimely
-----Original Message-----
From: owner-hwg-techniques(at)hwg.org [mailto:owner-hwg-techniques(at)hwg.org]
On Behalf Of Hilma
Sent: Sunday, 5 May 2002 8:41 PM
To: hwg-techniques(at)hwg.org
Subject: Passing paramters between windows
Having spent hours trawling through books and help sites, i'm about to
give
up - i hope someone here can help, and forgive me asking this.
I want to pass, and use, a value to an exiting window.
I can open a new window, and i can open an exisiting window and pass
some
information in - but then i lose the style and content of the window
(that
is already there) - although the address is the same as my original
window,
i've lost what was there before i started.
I've seen ways to pass values to a target window and ways to grab values
from the source window (using a form) - but i cannot figure out how to
do
what i want.
Which is:
My site has a number of thumbnail images, on various different pages.
When clicked on, i don;t want to just open up a new window to give the
full-size photo;
I want to open up my existing "SinglePhoto.htm" window (which already
has
my style, logo, structure defined) -
and add a new title (that is a parameter from my source window) , and
insert
a named image (that is also parameter from my source window).
i.e. I have a single-photo page with a template, which i want to use
every
time my viewer opts to see a full-size image;
and into this template, I want to embed a named "image/myPhoto.jpg", and
give it a title and/or heading, also defined in the source window.
I've found lots of pieces to this jigsaw (but i'm not sure they're all
from
the same picture) - but i cannot put them all together.
Many thanks for any help!
Hilma
--x----
HWG hwg-techniques mailing list archives,
maintained by Webmasters @ IWA