Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. DylanTz

    Split query string, +, = and &

    OK, thanks for your help Tsuji....all the best
  2. DylanTz

    Split query string, +, = and &

    OK, how can I split the value of the query string into 2 variables as so that I can make reference to them when a search is conducted. I see that query=query.replace(/\+/g," "); removes the + from the QS, as traced in the alert, but now it seems that I need to assign a variable to each section...
  3. DylanTz

    Split query string, +, = and &

    Hei there...Tsuji...How are you. Thanks Still looking at it right now, and I am just trying to figure it out, I have the values being alerted, and that these value are being passed. I think I'll get it soon. Will post a little later
  4. DylanTz

    Split query string, +, = and &

    Hi Ok, I ran the script, as it was written by tsuji... Firstly, on load, the script alerts the value "a"... with error Object expected ... When I make these changes to the script above, then the right side of the query string passes, but with the Object expected error: var t...
  5. DylanTz

    Split query string, +, = and &

    Hi Thanks for the reply, thanks a lot, I apprecite you taking the time to look at it. I'll test it later today, and post the results. Thanks
  6. DylanTz

    Split query string, +, = and &

    sorry, i want to remove the =, + and &, not from the actual URL in the browser!, but from the url so it can use in my javascript
  7. DylanTz

    Split query string, +, = and &

    Can I just clarify, I want to remove the =, + and & from the query string, i.e. srch=my+query&search...., so that I am left with "my" "query"?
  8. DylanTz

    Split query string, +, = and &

    This had no effect... function getQueryVariable(variable) { var query = window.location.search.substring(1); query=query.replace(/\+/g," "); var vars = query.split("&"); for (var i=0;i<vars.length;i++) { var pair = vars[i].split("="); if (pair[0] == variable) { return...
  9. DylanTz

    Split query string, +, = and &amp;

    Sorry, its not my script!, I found it online...., im just learning. By that you mean, duplicate the function, and change it as: - <script> function getQueryVariable(variable) { var query = window.location.search.substring(1); var vars = query.split("+"); for (var i=0;i<vars.length;i++)...
  10. DylanTz

    Split query string, +, = and &amp;

    Hi This script splits the query string, leaving only the "my+query" for use...., however, can anyone suggest how I can split the QS so that the result is "my" "query" TIA <script> function getQueryVariable(variable) { var query = window.location.search.substring(1); var vars =...

Part and Inventory Search

Back
Top