pop up blockers

O

optimistx

How to transfer data between two windows without server programming ?

It seems to be easy to pile numerous div:s on one page thus not needing to
open new windows. All the 'quasi windows' can be accessed easily with any
script.

If we open a new window with javascript code, we get the handle to the new
window and can communicate with its javascript contents easily (the same
origin policy, all are 'my pages', the same server).

If the user clicks the link and opens another window, my javascript program
does not get the window handle. Or is there a simple way?

One could send data by appending to the url, after ?-mark, but there is a
limitation of length. I might need to send some kilobytes. Sending by
post -request might be simple enough, once (the original page must not alter
its state).

Constructing frames is also a way, but when they are necessary for something
else, at least for the time being, so I would like to avoid them. Cookies?
No, they are in use for something else.

Asking the users to adjust parameters for their pop up blockers is too
complicated.

Am I really forgetting a simple idea to solve this? Something to be done at
the same time as the user clicks the link with <a href="newpage.htm"
target="_blank">newpage</a> ? The user clicks the link and the two windows
should be able to communicate (at least the originally open window should be
able to send say 10 kb of data to the new window).

Sorry if this question is too easy :)
 
S

Stevo

optimistx said:
How to transfer data between two windows without server programming ?

It seems to be easy to pile numerous div:s on one page thus not needing
to open new windows. All the 'quasi windows' can be accessed easily
with any script.

If we open a new window with javascript code, we get the handle to the
new window and can communicate with its javascript contents easily (the
same origin policy, all are 'my pages', the same server).

If the user clicks the link and opens another window, my javascript
program does not get the window handle. Or is there a simple way?

One could send data by appending to the url, after ?-mark, but there is
a limitation of length. I might need to send some kilobytes. Sending by
post -request might be simple enough, once (the original page must not
alter its state).

Constructing frames is also a way, but when they are necessary for
something else, at least for the time being, so I would like to avoid
them. Cookies? No, they are in use for something else.

Asking the users to adjust parameters for their pop up blockers is too
complicated.

Am I really forgetting a simple idea to solve this? Something to be done
at the same time as the user clicks the link with <a href="newpage.htm"
target="_blank">newpage</a> ? The user clicks the link and the two
windows should be able to communicate (at least the originally open
window should be able to send say 10 kb of data to the new window).

Sorry if this question is too easy :)

You could use session cookies and implement a whole communications
protocol. For example, window A writes "Communication-Start" into a
session cookie and waits for window B to delete that session cookie and
replace it with one with "Communication-Start-Acknowledge". Then window
A can write it's first packet of data into a session cookie and wait for
window B to acknowledge it (after it's performed a checksum on it
perhaps). I've never done this, but if faced with the problem you are, I
might certainly bring it up as an idea in a brainstorming meeting to see
how it's received.
 
O

optimistx

Stevo said:
...

You could use session cookies and implement a whole communications
protocol. For example, window A writes "Communication-Start" into a
session cookie and waits for window B to delete that session cookie
and replace it with one with "Communication-Start-Acknowledge". Then
window A can write it's first packet of data into a session cookie
and wait for window B to acknowledge it (after it's performed a
checksum on it perhaps). I've never done this, but if faced with the
problem you are, I might certainly bring it up as an idea in a
brainstorming meeting to see how it's received.

Thanks that you answered, especially when now you are the only one.
Thus I might with some probability assume that there is no other
straightforward method to solve this.
I am already using cookies for the purpose so your idea is
practical :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top