473,398 Members | 2,525 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,398 software developers and data experts.

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

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
5 5044
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

"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
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
> 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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: lukeo | last post by:
I'm shelling out to an .asp (or htm) page from an application. I want to show this in a window without the address bar, etc... Is there a way I can redirect this page using javascript to a page...
2
by: Richard Bell | last post by:
Newbie question ... please respond to group I'm trying to open/navigate to a url. How can I tell when the page is fully loaded? Testing suggest that window.open returns before the page is...
4
by: Dan Cruz | last post by:
Below are two files: Main.asp and Help.asp. I've stripped it down to the 'barest-of bones' so that anyone willing to help can duplicate the problem on their own systems. ***Main.asp*** looks...
4
by: Ian Sedwell | last post by:
Hi guys The following code works just fine in Netscape on MacOS and Windows. But in Explorer on MacOS and Windows it throws a type mismatch error at the point marked with the comment ³// bug out...
18
by: Wladimir Borsov | last post by:
Inside a html page (more precicesly inside a JSP page) I defined a button. When the user clicks this button a second browser window should pop up und load the passed URL. I coded <img...
10
by: aagee | last post by:
Hi all Can someone clue me in on this? I just noticed that following doesn't work as it used to: window.open(... "fullscreen=yes" ...) Used to get a window that occupied the whole screen;...
18
by: len.hartley | last post by:
Hi, I am trying to pop-up a window when the user clicks on an image. The problem is that when the user clicks on the image and the window pops up OK, but the window underneath also proceeds to...
37
by: Jan Tovgaard | last post by:
Hey everyone:) We have a critical problem, which I can see that other people also has ran into. In Internet Explorer 7 it is no longer possible to do a window.close after opening a window,...
7
by: karamorf | last post by:
Im having problems getting the window.open function to work properly in internet explorer. The code works fine in firefox, but thats not really an option (cant just force everyone to use that to be...
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: 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
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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,...
0
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...

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.