cool ill use yours, i came up with this...

var myVar = document.referrer.split('/');  //make a list based on
forward slashes
var recid = (myVar[myVar.length -1]);   //get the last one in the list

yours is clearly better

now i need to pipe my 'var file' into the query string...query.setQuery
('where B = "1802-2005-020-3"');

how do i format correctly?....query.setQuery('where B = ' +
recid); .....i get an error when i do that, seems like i need to do
like .quote or something



On Nov 24, 1:13 pm, "Michael Geary" <[EMAIL PROTECTED]> wrote:
> From your previous message, it sounded like you want to get everything after
> the last / in the URL, is that right? You could do it like this:
>
>   var file = url.match('/([^/]+)$')[1];
>
> A test case:
>
>   var url = 'http://www.region3dfg.org/lands/1802-2005-020-3';
>   var file = url.match('/([^/]+)$')[1];
>   alert( file );  // alerts "1802-2005-020-3"
>
> -Mike
>
> > From: Region 3 DFG
> > anybody have a slim piece of code to parse out the end of the URL?
> > when i find one ill post it here
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"iGoogle Developer Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Gadgets-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to