Simplest way is to use a regular expression:

var location = /[?&]location=(\w+)&?/.exec( location.search );

there are also plugins to deal with the query string (a bit
overcomplicated but can be useful):
http://plugins.jquery.com/project/query-object
http://plugins.jquery.com/node/6222

cheers,
- ricardo

On Apr 20, 9:26 pm, budduke <b...@budduke.com> wrote:
> I looked through the board but can not find any info for what I am
> needing,
> for the persistant:location highlight, I need it to not look at the
> entire url string, just part of it.
> using php my links havehttp://www.myweb.com/good_link.php?location=here&page=5
> the string should only be looking for everything before the & symbol.
> I can not figure out how to do this.
> I know it is all happening in the case area of the script but can not
> figure out how to filter out everything from the & to the end of the
> string to compare with the url.
>
> thanks for any help you can send my way,
> Buddy Duke

Reply via email to