do not want to send all query string parameter
do not want to send all query string parameter

Hi,
Currently when ajax is fired, it will send all query parameter to the server, instead I want to send only those parameters which are used by the user. for example if user search for filter, I want to send only that parameter.
Is there anyway , where we can achieve this ??
any help would be great
Regards,
Dinker
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
You can use
ajax.data
to manipulate the data object sent to the server, including removing items.Allan
Hi allan,
Javascript code below:
So as you can see all these columns parameter is coming, I dont want to send all these parameter.
can you please help me to disable all these parameters ??
Two options:
delete
to remove the items you don't want.d
, just extend an empty object and then select the items you want to use fromd
in the extending object.Allan
yeah that will be excellent Allan :)
can you please show me the code snippets, since I am new here.
Many thanks
Hi Allan,
I have found it, thanks for your help :)
Hi,
I have one more question since here "data" can also be used as function can I do this stuff ?? this is basically to send my parameters to ajax using datatables.
You can do anything you want since its just a regular function.
Allan
Hi Allan,
I am appending 2 parameters but why this is coming in my url "&_=1455195488296" & how can I avoid this.
url : https://xxxx/catalog?blLocale=enUS&name=sdfgwe&_=1455195488296
That is the jQuery anti cache parameter. Set
cache: true
if you want to avoid that.Allan