How do I append a string to search query only once ?
Posted: Thu Sep 18, 2014 7:39 pm
The code is JScript .NET, which is basically a .NET version of Javascript.Regardless of language, Anyone with appending type of skill can answer my question
The problem is, when I keep issuing the request it keeps appending over and over again, http://i.imgur.com/nKCvgKn.png
Can you please give me an example? I'm still new to programming.
Thank you
The problem is, when I keep issuing the request it keeps appending over and over again, http://i.imgur.com/nKCvgKn.png
Code: Select all
if (oSession.uriContains("q="))
{
var str = oSession.fullUrl;
var sAppend = "+test1+test2+test3";
if (!oSession.uriContains(sAppend))
{
oSession.fullUrl = str.replace( "q=","q="+sAppend);
}
}Thank you