Solved

Limit on arguments passed to window.location.href

Posted on 1998-07-07
7
576 Views
Last Modified: 2008-02-01
Hi,

I'm writing some JavaScript code.
I have to pass a faily long string as an argument
to window.location.href in the form:

window.location.href = commandbar.asp?nav_btn=nav_btn_SaveRecord&LocalVersion=5&nOrginatorID=10&nSubstateID=7 etc...

This line fails in IE4 with the following error message:
"Invalid pointer"

Any ideas?
thanks,
ralph
0
Comment
Question by:rakhras
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
7 Comments
 

Author Comment

by:rakhras
ID: 1266283
Edited text of question
0
 
LVL 28

Expert Comment

by:sybe
ID: 1266284
i am not sure, you might try to use urlencode:

window.location.href=escape("commandbar.asp?......")


0
 

Author Comment

by:rakhras
ID: 1266285
sybe,

i forgot to mention that i already escape() my string.

ralph.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:rakhras
ID: 1266286
Adjusted points to 100
0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 1266287
1. if you also have No Such Interface supported errors you have a sick IE4 try http://www.ie4.mcmail.com/ for a fix

Also search for *16.dll - if you find vscrpt16.dll and
jscrpt16.dll you need to reinstall IE4.01 so you get
VBSCRIPT.DLL and JSCRIPT.DLL and the latest scripting engine (3.01?)

2. Shorten your variables, assuming the error goes away when the URL is short enough

3. (Use a hidden form and) submit it with post instead
<FORM NAME="HIDFORM" ACTION="commandbar.asp" METHOD="POST">
<INPUT NAME="nav_btn" TYPE="HIDDEN" VALUE="">
</FORM>
<SCRIPT>
document.HIDFORM.nav_btn.value = 'nav_btn_SaveRecord&LocalVersion=5&nOrginatorID=10&nSubstateID=7 etc...'
document.HIDFORM.submit();
</SCRIPT>

This is assuming you do not want to submit the original form...

Michel
0
 

Author Comment

by:rakhras
ID: 1266288
Michel,

We just finished trying a variation of your third suggestion
(i.e. using post and submit) and it worked fine.
If you want the points, you can answer the question now.

thanks,
ralph

0
 
LVL 75

Accepted Solution

by:
Michel Plungjan earned 100 total points
ID: 1266289
Thanks ralph!
I am glad it worked
Michel
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In this article, we'll look how to sort an Array in JavaScript, including the more advanced techniques of sorting a collection of records either ascending or descending on two or more fields. Basic Sorting of Arrays First, let's look at the …
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question