Solved

Limit on arguments passed to window.location.href

Posted on 1998-07-07
7
583 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
Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

 

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

Transaction Monitoring Vs. Real User Monitoring

Synthetic Transaction Monitoring Vs. Real User Monitoring: When To Use Each Approach? In this article, we will discuss two major monitoring approaches: Synthetic Transaction and Real User Monitoring.

Question has a verified solution.

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

I've been trying to accomplish this for a while and it just struck me yesterday how to accomplish this task. I have done searches all over the internet looking for ways to email pages from my applications and finally I have done it!!! Every single s…
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…

724 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