Hi Jeremy

No Luck with that one either, also used & as the concatenation
character.

Going back to basics: http://www.google.com/uds/solutions/wizards/newsbar.html

To get a 'phrase' I need to use the ' (single quote) when delimiting
the search expression.

The wizard shows:  executeList : ["'thanet array'"]

I think that there is possible a bug with the API? I have tried just
about every combination I can think of.

What I will do though is start with a clean web pag, api key etc
rather than trying to embed this within an existing set of code (some
of which is ASP).

thanks for the advice, I'll post any findings / solution or just can't
get it to work!

Simon
On Mar 9, 11:44 am, Jeremy Geerdes <[email protected]> wrote:
> Try using +'s instead of the .'s in the ASP bit.  When I function in  
> ASP, I default to C#, but I believe VBScript requires + for  
> concatenating strings.
>
> Jeremy R. Geerdes
> Effective website design & development
> Des Moines, IA
>
> For more information or a project 
> quote:http://jgeerdes.home.mchsi.comhttp://jgeerdes.blogspot.comhttp://jgeerdes.wordpress.com
> [email protected]
>
> Unless otherwise noted, any price quotes contained within this  
> communication are given in US dollars.
>
> If you're in the Des Moines, IA, area, check out Debra Heights  
> Wesleyan Church!
>
> And check out my blog, Adventures in Web Development, 
> athttp://jgeerdes.blogspot.com
>   !
>
> On Mar 9, 2009, at 6:40 AM, Simon Mallett wrote:
>
>
>
> > Hi Jeremy
>
> > Thanks for coming back on this, Yes, I agree these should work, but
> > unfortunately
>
> > var Jvar = '<%='"'.ASPvar.'"'%>'   generates a syntax error  (ie the
> > error: Microsoft VBScript compilation error '800a03ea')
>
> > and   var Jvar = '<%="\"".ASPvar."\""%>'    stops the page on both
> > Firefox and Chrome (no error message)
>
> > NB. I'm using UTF-8
>
> > regards
>
> > Simon
>
> > On Mar 9, 11:04 am, Jeremy Geerdes <[email protected]> wrote:
> >> You're having this problem because, when you try to use the single
> >> quote inside the double quotes, JS thinks you're ending the string,
> >> but then it finds something else that it doesn't know how process.
> >> And &quot; is a string to both JS and the Google engine, so it  
> >> doesn't
> >> process as though you want to search for "foo bar."  What you need to
> >> do is this:
>
> >> var Jvar = '<%='"'.ASPvar.'"'%>'; // i.e., single, double, single  
> >> quotes
>
> >> Alternatively, you could try something like this:
>
> >> var Jvar = '<%="\"".ASPvar."\""%>'; // i.e., double, escaped double,
> >> double quotes
>
> >> Jeremy R. Geerdes
> >> Effective website design & development
> >> Des Moines, IA
>
> >> For more information or a project quote:http://jgeerdes.home.mchsi.comhttp
> >> ://jgeerdes.blogspot.comhttp://jgeerdes.wordpress.com
> >> [email protected]
>
> >> Unless otherwise noted, any price quotes contained within this
> >> communication are given in US dollars.
>
> >> If you're in the Des Moines, IA, area, check out Debra Heights
> >> Wesleyan Church!
>
> >> And check out my blog, Adventures in Web Development, 
> >> athttp://jgeerdes.blogspot.com
> >>   !
>
> >> On Mar 9, 2009, at 5:36 AM, Simon Mallett wrote:
>
> >>> Hi, I've been through the existing messages and they almost answer  
> >>> my
> >>> question, but..
>
> >>> I'm using the Wizard generated code as closely as possible, all  
> >>> works
> >>> fine, I can pass a variable, but I want to include quotes so that I
> >>> can do aphrasesearch.
>
> >>> An example of Jvar below might be Kentish Flats  (I want "Kentish
> >>> Flats")
>
> >>> See:
> >>>      var newsBar;
> >>>      var Jvar = '<%= ASPvar %>'
>
> >>>      var options = {
> >>>        largeResultSet : false,
> >>>        title : Jvar,
> >>>        horizontal : false,
> >>>        autoExecuteList : {
> >>>          executeList : [Jvar]
> >>>        }
>
> >>> The above works fine, but I get a lot of fairly unrelated listings..
>
> >>> But if I use eg: var Jvar = '<%= "'" & ASPvar & "'" %>'   (ie  
> >>> double,
> >>> single, double quotes) I get a js error
>
> >>> or:
> >>>     var Jvar = '<%= "&quot;" & ASPvar & "&quot;"%>'
>
> >>>     executeList : ["&quot;"+Jvar+"&quot;"]
>
> >>> The Quote is included as part of the search so I get a list of  
> >>> results
> >>> with a " in them
>
> >>> Thanks
>
> >>> Simon
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google AJAX APIs" 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-AJAX-Search-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to