[jQuery] Re: JQuery variable usage with single/double quote problem

2009-03-31 Thread LinkGuru
Apologies. A couple of silly errors. 1) its dllViewSelector not ddlViewSelector (I do cut and paste a lot to save such mistakes, normally - honest). And (thanks James), there was a missing underscore. Thanks for all the other contributions to this including Michael Geary's sensible advice. It's th

[jQuery] Re: JQuery variable usage with single/double quote problem

2009-03-31 Thread Ricardo
The quotes in the attr selector are not required, try: $('select[name=ddlViewSelector_'+idCurrent+'] option:selected').text (); On Mar 31, 2:47 pm, LinkGuru wrote: > Can anyone help on this one? . > > The following statement is proven to work: > > p_viewSelector=$("select[name='dllViewSe

[jQuery] Re: JQuery variable usage with single/double quote problem

2009-03-31 Thread Michael Geary
> jquery variables, quotes, string contenation etc. jQuery doesn't *have* variables, quotes, or string concatenation. Those are part of JavaScript, not jQuery. I'm not being nitpicky. If you keep this fact in mind it will make it much easier to troubleshoot. You could spend days throwing thing

[jQuery] Re: JQuery variable usage with single/double quote problem

2009-03-31 Thread James
Is it your missing underscore in: curSelector="ddlViewSelector"+idCurrent; ? But essentially what you're doing looks right. var idCurrent = 'Search_0'; var p_viewSelector = $("select[name='dllViewSelector_"+idCurrent+"'] option:selected").text(); On Mar 31, 7:47 am, LinkGuru wrote: > Can anyo