By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,485 Members | 1,031 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,485 IT Pros & Developers. It's quick & easy.

HUGE limitation in window.open() and navigate() Explorer of course!@#%%!$

P: n/a
Here I really need a guru... ;^(

I found out today with a big disappointment that :

window.open("url", ...)
and also
navigate("url")

limit the max length of the url string to something like 2080
characters. That on Explorer only; Netscape and Mozilla work perfectly
until I break the Apache URL length limit, that I would anyway be able
to reconfigure.

So far it was not an issue but today our DB has become quite large and
its browsing is based on a main-window/popup-window interaction.
This limitation is now breaking my CGIs that handle the two windows by
passing each other a lot of information.

Is there a way to circumvent this Explore limitation or I need to look
for a completely new approach?

Using cookies is not really an option because, as far as I know,
people out there are still (and even more and more) scared of letting
cookis coming in on their browsers)...

Compressing the string is also not an issue because it will make it
work for another couple of months/year but it will reach the limit
again.
What if the main window writes the needed parameters into a file with
a special/unique name and passes to the popup window just the
name/pointer to the file pertaining to that particular session and
viceversa?

Could this be a solution? Or am I going to crash against another wall?


Thanks and regards to all,
from a sad programmer.

nIc

PS: viva Netscape , viva Mozilla - I HATE Explorer even more.
And don't tell it's a security issue... we all know how secure
is Explorer - Ha Ha Ha Ha Ha .... ;^)
______________________________

Nicola Pedrozzi
IT Manager
Oval engineering sagl
Via Daro 6a
CH-6500 Bellinzona

ni****@oval.ch
ni****@swissgalaxy.ch
Tel: +41 91 825 42 85
Fax: +41 91 826 12 34

http://www.oval.ch
http://www.immogalaxy.ch

Jul 20 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
In article <c2**********@rex.ip-plus.net>, ni****@swissgalaxy.ch
enlightened us with...

What if the main window writes the needed parameters into a file with
a special/unique name and passes to the popup window just the
name/pointer to the file pertaining to that particular session and
viceversa?

Why don't you just use sessions?
Or, faux sessions...
A DB stores the "session" data and the url gets a key to the record in
the DB. No cookies needed if you use the url for that. This also allows
the "session" to never time out. It also means stuff is bookmarkable and
different people can use it. Kinda like preferences.

Of course, you'd need to rewrite your server side scripts, but there
should be no limits* to what you store this way.
*aside from DB limits and making sure page doesn't take a year to
generate, etc
--
--
~kaeli~
Who is General Failure and why is he reading my hard disk?
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 20 '05 #2

P: n/a

"Nicola Pedrozzi" <ni****@swissgalaxy.ch> wrote in message
news:c2**********@rex.ip-plus.net...
Here I really need a guru... ;^(

I found out today with a big disappointment that :

window.open("url", ...)
and also
navigate("url")

limit the max length of the url string to something like 2080
characters. That on Explorer only; Netscape and Mozilla work perfectly
until I break the Apache URL length limit, that I would anyway be able
to reconfigure.


For IE (I do not know if this works in Mozilla)

If all of the data you are passing exists on the first window then you don't
need to pass any information to the new window through the URL.

Simply open the new window and in the onload event of the new window gain a
reference back to the original window using the window.opener property. Once
you have a reference to the window object of the original window you can
access any information you want.

Example create 2 files (test.html and test2.html):

test.html

<html>
<head>
<script type="text/javascript">
function init(){
window.open("test2.html")
}
var test2= "Hello";
</script>
</head>
<body onload="init()">
</body>
</html>

test2.html

<html>
<head>
<script type="text/javascript">
function init(){
alert(window.opener.test2)
}
</script>
</head>
<body onload="init()">
</body>
</html>

Regards
Mike


Jul 20 '05 #3

P: n/a
Mike wrote:
"Nicola Pedrozzi" <ni****@swissgalaxy.ch> wrote in message
news:c2**********@rex.ip-plus.net...
Here I really need a guru... ;^(

I found out today with a big disappointment that :

window.open("url", ...)
and also
navigate("url")

limit the max length of the url string to something like 2080
characters. That on Explorer only; Netscape and Mozilla work perfectly
until I break the Apache URL length limit, that I would anyway be able
to reconfigure.

For IE (I do not know if this works in Mozilla)

If all of the data you are passing exists on the first window then you don't
need to pass any information to the new window through the URL.

Simply open the new window and in the onload event of the new window gain a
reference back to the original window using the window.opener property. Once
you have a reference to the window object of the original window you can
access any information you want.

...


Thank you guys.

I'm opting for keeping a "session id file" to store my results.
The idea of kaeli was elegant but we don't want to open the DB for
writing trough the WEB server.

The solution proposed by Mike is a non-solution; I actually don't need
to pass parameters that are going to be used into the HTML of the second
page (subwin), I need to pass them to a CGI script building the HTML...
(that was window.open(/cgi-bin/myscript?param=............).
Thanks to all again,
nIc
______________________________

Nicola Pedrozzi
IT Manager
Oval engineering sagl
Via Daro 6a
CH-6500 Bellinzona

ni****@oval.ch
ni****@swissgalaxy.ch
Tel: +41 91 825 42 85
Fax: +41 91 826 12 34

http://www.oval.ch
http://www.immogalaxy.ch

Jul 20 '05 #4

P: n/a
> Thank you guys.

I'm opting for keeping a "session id file" to store my results.
The idea of kaeli was elegant but we don't want to open the DB for
writing trough the WEB server.

The solution proposed by Mike is a non-solution; I actually don't need
to pass parameters that are going to be used into the HTML of the second
page (subwin), I need to pass them to a CGI script building the HTML...
(that was window.open(/cgi-bin/myscript?param=............).

I have no idea what a "session id file" is and I do not understand why you
need to send all of these parameters to the client only to have them sent
back up to the server. But another solution would be to send the information
down and place into a hidden input field. Then set the form taget to
"_blank" and submit the form. Or if you are using window.open to restrict
certain features of the browser, simply open up a window with a blank HTML
page and then submit the form setting the target to the name of the newly
opened window.

Anyway there are plenty of options to skin this cat all of them are better
than massive URLs.
Jul 20 '05 #5

P: n/a
Mike wrote:
Thank you guys.

I'm opting for keeping a "session id file" to store my results.
The idea of kaeli was elegant but we don't want to open the DB for
writing trough the WEB server.

The solution proposed by Mike is a non-solution; I actually don't need
to pass parameters that are going to be used into the HTML of the second
page (subwin), I need to pass them to a CGI script building the HTML...
(that was window.open(/cgi-bin/myscript?param=............).


I have no idea what a "session id file" is and I do not understand why you
need to send all of these parameters to the client only to have them sent
back up to the server. But another solution would be to send the information
down and place into a hidden input field. Then set the form taget to
"_blank" and submit the form. Or if you are using window.open to restrict
certain features of the browser, simply open up a window with a blank HTML
page and then submit the form setting the target to the name of the newly
opened window.

Anyway there are plenty of options to skin this cat all of them are better
than massive URLs.


Hi Mike,
is the way I want to show up the DB query results that forced me to do
this way.

Here it is:

First cgi show a query form that calls a
second cgi that do the query and startup a
third cgi that is the main-window for viewing result that calls a
fourth cgi (that is in the popup window) needed to show/handle the
results in short.

third and fourth scripts need to pass each other some parameters to
keep in sink, one of them is the result list gotten with the search.

To get an idea, have a look at http://www.immogalaxy.ch our real-estate
DB specialized for Ticino/Switzerland objects.
This version of the site is still using the window.open solution.
The next version, due out around end of this month, is already using the
new scheme and is under testing.

Thanks for your time,
Bye nIc
______________________________

Nicola Pedrozzi
IT Manager
Oval engineering sagl
Via Daro 6a
CH-6500 Bellinzona

ni****@oval.ch
ni****@swissgalaxy.ch
Tel: +41 91 825 42 85
Fax: +41 91 826 12 34

http://www.oval.ch
http://www.immogalaxy.ch

Jul 20 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.