Mmm weird, maybe its some of the other JS code in the page then - will
see if I can debug. Thanks anyway :)


On Dec 11, 4:03 pm, "T.J. Simmons" <theimmortal...@gmail.com> wrote:
> Have you tried putting the numeric value in quotes? It works fine like
> that.. here's a link so you can see.
>
> http://jsbin.com/iqiru
>
> Hope that helps.
>
> - T.J.
>
> On Dec 11, 9:59 am, youradds <andy.ne...@gmail.com> wrote:
>
> > Hi,
>
> > I'm trying to make a bit of code, which will auto-select a value from
> > a SELECT box. Here is the example code:
>
> >                         <select style="display: inline;" id="catid2" 
> > name="catid2"><option
> > value="">-- select --</option><option value="136187">Alberta</
> > option><option value="136200">British Columbia</option><option
> > value="136229">Manitoba</option><option value="136259">Newfoundland
> > and Labrador</option><option value="136247">New Brunswick</
> > option><option value="136266">Nova Scotia</option><option
> > value="136272">Ontario</option><option value="136303">Prince Edward
> > Island</option><option value="136306">Quebec</option><option
> > value="136329">Saskatchewan</option></select>
> > I've tried:
>
> > $('#catid2').val(136200)
>
> > ..as well as:
>
> > $('#catid2').val('British Columbia')
>
> > ... but neither seem to work.
>
> > Anyone got any suggestions?
>
> > TIA!
>
> > Andy
>
>

Reply via email to