Solved

Limit on arguments passed to window.location.href

Posted on 1998-07-07
7
560 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
  • 4
  • 2
7 Comments
 

Author Comment

by:rakhras
Comment Utility
Edited text of question
0
 
LVL 28

Expert Comment

by:sybe
Comment Utility
i am not sure, you might try to use urlencode:

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


0
 

Author Comment

by:rakhras
Comment Utility
sybe,

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

ralph.
0
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 

Author Comment

by:rakhras
Comment Utility
Adjusted points to 100
0
 
LVL 75

Expert Comment

by:Michel Plungjan
Comment Utility
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
Comment Utility
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
Comment Utility
Thanks ralph!
I am glad it worked
Michel
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

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…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
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…

772 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now