[jQuery] Re: AJAX and dynamically created dropdowns

2007-10-22 Thread Mika Tuupola



On Oct 20, 2007, at 5:20 PM, Karl Swedberg wrote:

One other Firefox add-on that allows you to see the *generated*  
source is "Web Developer" toolbar:

http://chrispederick.com/work/web-developer/
Click on the "View Source" menu, and then choose "View Generated  
Source."


Web Developer, along with Firebug, is a must-have extension. Also,  
look closely at that page ... Chris Pederick is using jQuery!


FireBugs HTML view also shows generated source.

--
Mika Tuupola
http://www.appelsiini.net/





[jQuery] Re: AJAX and dynamically created dropdowns

2007-10-22 Thread Mika Tuupola



On Oct 19, 2007, at 8:31 PM, Yaz wrote:


I have a script that basically just reads some data from an xml file,
then the data gets loaded into a  dropdown, by dynamically
creating  tags.


I had problem with IE and selects earlier. Found out that it needs  
both .val() and .append() calls. Maybe this is same problem. Check  
some example code at:


http://pastie.caboo.se/108819

--
Mika Tuupola
http://www.appelsiini.net/





[jQuery] Re: AJAX and dynamically created dropdowns

2007-10-20 Thread Karl Swedberg
One other Firefox add-on that allows you to see the *generated*  
source is "Web Developer" toolbar:

http://chrispederick.com/work/web-developer/
Click on the "View Source" menu, and then choose "View Generated  
Source."


Web Developer, along with Firebug, is a must-have extension. Also,  
look closely at that page ... Chris Pederick is using jQuery!



--Karl
_
Karl Swedberg
www.englishrules.com
www.learningjquery.com



On Oct 19, 2007, at 5:13 PM, Brook Davies wrote:



You'll never see it in the 'view source' if its dynamically added.  
If you

use the Inspect function of firefox you can see the dynamically added
content. I think the IE developer toolbar does the same thing.

Make sure that you are setting the length of the selects option  
array and

setting a text/value pair for each entry in the drop down.

When you say 'no results', what do you mean? No results when you  
submit the

form?

Brook

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery- 
[EMAIL PROTECTED] On

Behalf Of Yaz
Sent: October 19, 2007 11:59 AM
To: jQuery (English)
Subject: [jQuery] Re: AJAX and dynamically created dropdowns


With the select plugin I get the same results.
Added the form tag. Still no results.

Btw, I noticed that even though in Firefox the dropdown does get
populated, at view source there is no list of schools

Thanks for the suggestion guys.

-yaz

On Oct 19, 2:31 pm, Jack Killpatrick <[EMAIL PROTECTED]> wrote:

FWIW, I've never had any problems with id and name being the same on
controls in IE. I don't see a  tag on the page, maybe that's  
the

issue?

You might also want to try this:

http://www.texotela.co.uk/code/jquery/select/

- Jack

Chris Jordan wrote:

Could it be because you're name and id are identical?








Perhaps IE doesn't like this?



Just a guess.



Chris


On 10/19/07, *Yaz* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>  
wrote:



Hello everyone,



I have a script that basically just reads some data from an xml

file,
then the data gets loaded into a  dropdown, by  
dynamically

creating  tags.



Here's the working sample:
   http://yazmedia.com/sandbox/


View source for the code. XML:http://yazmedia.com/sandbox/ 
data.html



It works fine in Firefox, but in IE 7 or 6 it doesn't. I tried
using a
function "addOption()" that I found online, to see if at  
least I was
doing something wrong in my code, but still neither option  
works.



Anything that could shed a little light into this would be much
appreciated.



-yaz



--
http://cjordan.us








[jQuery] Re: AJAX and dynamically created dropdowns

2007-10-20 Thread Brook Davies

You'll never see it in the 'view source' if its dynamically added. If you
use the Inspect function of firefox you can see the dynamically added
content. I think the IE developer toolbar does the same thing.

Make sure that you are setting the length of the selects option array and
setting a text/value pair for each entry in the drop down.

When you say 'no results', what do you mean? No results when you submit the
form?

Brook

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Yaz
Sent: October 19, 2007 11:59 AM
To: jQuery (English)
Subject: [jQuery] Re: AJAX and dynamically created dropdowns


With the select plugin I get the same results.
Added the form tag. Still no results.

Btw, I noticed that even though in Firefox the dropdown does get
populated, at view source there is no list of schools

Thanks for the suggestion guys.

-yaz

On Oct 19, 2:31 pm, Jack Killpatrick <[EMAIL PROTECTED]> wrote:
> FWIW, I've never had any problems with id and name being the same on
> controls in IE. I don't see a  tag on the page, maybe that's the
> issue?
>
> You might also want to try this:
>
> http://www.texotela.co.uk/code/jquery/select/
>
> - Jack
>
> Chris Jordan wrote:
> > Could it be because you're name and id are identical?
>
> > 
> > 
>
> > Perhaps IE doesn't like this?
>
> > Just a guess.
>
> > Chris
>
> > On 10/19/07, *Yaz* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:
>
> > Hello everyone,
>
> > I have a script that basically just reads some data from an xml
file,
> > then the data gets loaded into a  dropdown, by dynamically
> > creating  tags.
>
> > Here's the working sample:
> >http://yazmedia.com/sandbox/
>
> > View source for the code. XML:http://yazmedia.com/sandbox/data.html
>
> > It works fine in Firefox, but in IE 7 or 6 it doesn't. I tried
> > using a
> > function "addOption()" that I found online, to see if at least I was
> > doing something wrong in my code, but still neither option works.
>
> > Anything that could shed a little light into this would be much
> > appreciated.
>
> > -yaz
>
> > --
> >http://cjordan.us





[jQuery] Re: AJAX and dynamically created dropdowns

2007-10-19 Thread Chris Jordan
Yaz,

View Source will never show you dynamically generated content. Download the
FireFox extension: View Source
Chart.
It's quite handy, and shows you dynamically generated content. It's often
helped me to figure out problems where I really need to know what the
generated markup looks like.

Cheers,
Chris

On 10/19/07, Yaz <[EMAIL PROTECTED]> wrote:
>
>
> With the select plugin I get the same results.
> Added the form tag. Still no results.
>
> Btw, I noticed that even though in Firefox the dropdown does get
> populated, at view source there is no list of schools
>
> Thanks for the suggestion guys.
>
> -yaz
>
> On Oct 19, 2:31 pm, Jack Killpatrick <[EMAIL PROTECTED]> wrote:
> > FWIW, I've never had any problems with id and name being the same on
> > controls in IE. I don't see a  tag on the page, maybe that's the
> > issue?
> >
> > You might also want to try this:
> >
> > http://www.texotela.co.uk/code/jquery/select/
> >
> > - Jack
> >
> > Chris Jordan wrote:
> > > Could it be because you're name and id are identical?
> >
> > > 
> > > 
> >
> > > Perhaps IE doesn't like this?
> >
> > > Just a guess.
> >
> > > Chris
> >
> > > On 10/19/07, *Yaz* <[EMAIL PROTECTED] >
> wrote:
> >
> > > Hello everyone,
> >
> > > I have a script that basically just reads some data from an xml
> file,
> > > then the data gets loaded into a  dropdown, by dynamically
> > > creating  tags.
> >
> > > Here's the working sample:
> > >http://yazmedia.com/sandbox/
> >
> > > View source for the code. XML:
> http://yazmedia.com/sandbox/data.html
> >
> > > It works fine in Firefox, but in IE 7 or 6 it doesn't. I tried
> > > using a
> > > function "addOption()" that I found online, to see if at least I
> was
> > > doing something wrong in my code, but still neither option works.
> >
> > > Anything that could shed a little light into this would be much
> > > appreciated.
> >
> > > -yaz
> >
> > > --
> > >http://cjordan.us
>
>


-- 
http://cjordan.us


[jQuery] Re: AJAX and dynamically created dropdowns

2007-10-19 Thread Yaz

With the select plugin I get the same results.
Added the form tag. Still no results.

Btw, I noticed that even though in Firefox the dropdown does get
populated, at view source there is no list of schools

Thanks for the suggestion guys.

-yaz

On Oct 19, 2:31 pm, Jack Killpatrick <[EMAIL PROTECTED]> wrote:
> FWIW, I've never had any problems with id and name being the same on
> controls in IE. I don't see a  tag on the page, maybe that's the
> issue?
>
> You might also want to try this:
>
> http://www.texotela.co.uk/code/jquery/select/
>
> - Jack
>
> Chris Jordan wrote:
> > Could it be because you're name and id are identical?
>
> > 
> > 
>
> > Perhaps IE doesn't like this?
>
> > Just a guess.
>
> > Chris
>
> > On 10/19/07, *Yaz* <[EMAIL PROTECTED] > wrote:
>
> > Hello everyone,
>
> > I have a script that basically just reads some data from an xml file,
> > then the data gets loaded into a  dropdown, by dynamically
> > creating  tags.
>
> > Here's the working sample:
> >http://yazmedia.com/sandbox/
>
> > View source for the code. XML:http://yazmedia.com/sandbox/data.html
>
> > It works fine in Firefox, but in IE 7 or 6 it doesn't. I tried
> > using a
> > function "addOption()" that I found online, to see if at least I was
> > doing something wrong in my code, but still neither option works.
>
> > Anything that could shed a little light into this would be much
> > appreciated.
>
> > -yaz
>
> > --
> >http://cjordan.us



[jQuery] Re: AJAX and dynamically created dropdowns

2007-10-19 Thread Yaz

Nop. Just tested and its the same.

On Oct 19, 2:15 pm, "Chris Jordan" <[EMAIL PROTECTED]> wrote:
> Could it be because you're name and id are identical?
>
> 
> 
>
> Perhaps IE doesn't like this?
>
> Just a guess.
>
> Chris
>
> On 10/19/07, Yaz <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > Hello everyone,
>
> > I have a script that basically just reads some data from an xml file,
> > then the data gets loaded into a  dropdown, by dynamically
> > creating  tags.
>
> > Here's the working sample:
> >http://yazmedia.com/sandbox/
>
> > View source for the code. XML:http://yazmedia.com/sandbox/data.html
>
> > It works fine in Firefox, but in IE 7 or 6 it doesn't. I tried using a
> > function "addOption()" that I found online, to see if at least I was
> > doing something wrong in my code, but still neither option works.
>
> > Anything that could shed a little light into this would be much
> > appreciated.
>
> > -yaz
>
> --http://cjordan.us



[jQuery] Re: AJAX and dynamically created dropdowns

2007-10-19 Thread Jack Killpatrick
FWIW, I've never had any problems with id and name being the same on 
controls in IE. I don't see a  tag on the page, maybe that's the 
issue?


You might also want to try this:

http://www.texotela.co.uk/code/jquery/select/

- Jack

Chris Jordan wrote:

Could it be because you're name and id are identical?




Perhaps IE doesn't like this?

Just a guess.

Chris

On 10/19/07, *Yaz* <[EMAIL PROTECTED] > wrote:


Hello everyone,

I have a script that basically just reads some data from an xml file,
then the data gets loaded into a  dropdown, by dynamically
creating  tags.

Here's the working sample:
http://yazmedia.com/sandbox/

View source for the code. XML: http://yazmedia.com/sandbox/data.html

It works fine in Firefox, but in IE 7 or 6 it doesn't. I tried
using a
function "addOption()" that I found online, to see if at least I was
doing something wrong in my code, but still neither option works.

Anything that could shed a little light into this would be much
appreciated.

-yaz




--
http://cjordan.us 




[jQuery] Re: AJAX and dynamically created dropdowns

2007-10-19 Thread Chris Jordan
Could it be because you're name and id are identical?




Perhaps IE doesn't like this?

Just a guess.

Chris

On 10/19/07, Yaz <[EMAIL PROTECTED]> wrote:
>
>
> Hello everyone,
>
> I have a script that basically just reads some data from an xml file,
> then the data gets loaded into a  dropdown, by dynamically
> creating  tags.
>
> Here's the working sample:
> http://yazmedia.com/sandbox/
>
> View source for the code. XML: http://yazmedia.com/sandbox/data.html
>
> It works fine in Firefox, but in IE 7 or 6 it doesn't. I tried using a
> function "addOption()" that I found online, to see if at least I was
> doing something wrong in my code, but still neither option works.
>
> Anything that could shed a little light into this would be much
> appreciated.
>
> -yaz
>
>


-- 
http://cjordan.us