> From: Region 3 DFG
>
> 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
I wouldn't say that the regular expression match is necessarily better - it
may be shorter but it's more complicated.
As long as we're at it, here's a variation on your code that I like:
var recid = document.referrer.split('/').pop();
> 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
Change your code to:
alert( 'where B = ' + recid );
And you will see right away what the problem is. This should fix it:
query.setQuery( 'where B = "' + recid + '"' );
-Mike
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---