Solved

ASP - removeKey()

Posted on 1998-08-13
6
156 Views
Last Modified: 2013-12-25
What is the syntax of the removeKey() method ?

I want to delete several variables contained in the URL and I tried like below, but it doesn't work !!!

removeKey(Request.ServerVariables("QUERY_STRING"), "COM_LIGNE", "COM_QUANT").
0
Comment
Question by:netf_ds
[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
  • 3
  • 3
6 Comments
 
LVL 28

Expert Comment

by:sybe
ID: 1858988
ServerVariables are read-only

Maybe this will work:

MyVar = Request.ServerVariables("QUERY_STRING")

removeKey(MyVar, "COM_LIGNE", "COM_QUANT")

But I could not find the removeKey function, so I am not sure
0
 

Author Comment

by:netf_ds
ID: 1858989
Sorry, but it doesn't change anything !

Microsoft VBScript runtime error '800a01c2'

Wrong number of arguments or invalid property assignment: 'removeKey'

0
 
LVL 28

Expert Comment

by:sybe
ID: 1858990
I think you must have removeKey() defined somewhere in your code. Maybe in some include, or in the global.asa

Look there for how the sub or function is defined.

Your error message suggests that you should not pass 3 parameters to the function. Try passing 2 or 4 parameters.


this is what I get when I use your code:

=======================
Microsoft VBScript compilation error '800a0414'

Cannot use parens when calling a Sub

/asp/test/removekey.asp, line 5

removeKey(Request.ServerVariables("QUERY_STRING"), "COM_LIGNE", "COM_QUANT")
===============================


0
Report: Liquid Web beats Amazon, Rackspace & More

A study by performance analyst firm Cloud Spectator finds that Liquid Web beats rivals Amazon, Rackspace and DigitalOcean when it comes to website and cloud application performance.

 

Author Comment

by:netf_ds
ID: 1858991
Oooops,

You're right sybe : removeKey was a function I didn't saw in my application and not a predifined function (that's why we both didn't find any reference !). In fact it's not really my application, someone else began it and I was asked to finish it.

OK, if you want to earn the 50 points, I think you have to return me a blank answer.
0
 
LVL 28

Accepted Solution

by:
sybe earned 50 total points
ID: 1858992
ok
0
 

Author Comment

by:netf_ds
ID: 1858993
I finaly wrote :

removeKey(removeKey(Request.ServerVariables("QUERY_STRING"), "COM_QUANT"), "COM_LIGNE")
0

Featured Post

Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

Question has a verified solution.

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

FAQ pages provide a simple way for you to supply and for customers to find answers to the most common questions about your company. Here are six reasons why your company website should have a FAQ page
Color can increase conversions, create feelings of warmth or even incite people to get behind a cause. If you want your website to really impact site visitors, then it is vital to consider the impact color has on them.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

734 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