Append a string to search query after clicking submit/search button

4 posts, 0 answers
  1. nasekt
    nasekt avatar
    40 posts
    Member since:
    Aug 2014

    Posted 22 Sep 2014 Link to this post

    In this case, Let's take Google Search as example:

    if (oSession.uriContains("&q="))  {
    var str = oSession.fullUrl;
    var sAppend = "test1+test2+test3";
    if (!oSession.uriContains(sAppend))
    {
    oSession.fullUrl = str.replace( "&q=","&q="+sAppend);
    }
    }

    For those who are confused, It says, If &q= is present in the URI, replace/append &q= with &q=test1+test2+test3

    Problem: It appends test1+test2+test3 instantly, when it sees &q= in the URL.

    Basically, how do I make it wait until I click the submit/search button

    Thank you.
  2. Eric Lawrence
    Admin
    Eric Lawrence avatar
    833 posts

    Posted 23 Sep 2014 Link to this post

    Fiddler is a proxy; it sees the traffic that crosses the network. Fiddler doesn't know anything about "submit" buttons-- if the button results in different network traffic, Fiddler will see that. If it doesn't change the network traffic, then Fiddler will not see it.

    Regards,
    Eric Lawrence
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. nasekt
    nasekt avatar
    40 posts
    Member since:
    Aug 2014

    Posted 23 Sep 2014 in reply to Eric Lawrence Link to this post

    Can I inject  Javascript code  object.onclick=function(){myScript}; into google's  HTML page ?
  4. Eric Lawrence
    Admin
    Eric Lawrence avatar
    833 posts

    Posted 23 Sep 2014 Link to this post

    You can inject anything you want into the page.

    Regards,
    Eric Lawrence
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top