[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Limit on arguments passed to window.location.href

Posted on 1998-07-07
7
Medium Priority
?
595 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 400 total points
ID: 1266289
Thanks ralph!
I am glad it worked
Michel
0

Featured Post

Tech or Treat!

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

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

In my daily work (mainly using ASP.net), I need to write a lot of JavaScript code. One of the most repetitive tasks I do are the jQuery Ajax calls. You know: (CODE) I don't know if for you it's the same, but for me is soooo tedious to write the …
The task A number given should be formatted for easy reading by separating digits into triads. Format must be made inline via JavaScript, i.e., frameworks / functions are not welcome. So let’s take a number like this “12345678.91¿ and format i…
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…

650 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