HighDots Forums  

AJAX Dropdown with Firefox

Javascript JavaScript language (comp.lang.javascript)


Discuss AJAX Dropdown with Firefox in the Javascript forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
The Magnet
 
Posts: n/a

Default AJAX Dropdown with Firefox - 11-02-2009 , 03:57 PM






Hi,

I have this weird problem with Firefox & IE. I have a page with
dynamically generated dropdowns using AJAX & PHP. Problem is that
when the second dropdown is called, it loses the value of the first
dropdown? Is there something I should know about this?

It works fine in IE and retains the value. But not with Firefox....

Reply With Quote
  #2  
Old   
Evertjan.
 
Posts: n/a

Default Re: AJAX Dropdown with Firefox - 11-02-2009 , 04:20 PM






The Magnet wrote on 02 nov 2009 in comp.lang.javascript:
Quote:
I have this weird problem with Firefox & IE. I have a page with
dynamically generated dropdowns using AJAX & PHP. Problem is that
when the second dropdown is called, it loses the value of the first
dropdown? Is there something I should know about this?
How can you call a dropdown?
How can dropdowns remember the value of another dropdown?
What is a dropdown, an html select element?

I had this Christal ball, but I dropped it,
now I cannot comment on code that isn't there.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

Reply With Quote
  #3  
Old   
The Magnet
 
Posts: n/a

Default Re: AJAX Dropdown with Firefox - 11-02-2009 , 04:44 PM



On Nov 2, 3:20*pm, "Evertjan." <exjxw.hannivo... (AT) interxnl (DOT) net> wrote:
Quote:
The Magnet wrote on 02 nov 2009 in comp.lang.javascript:

I have this weird problem with Firefox & IE. *I have a page with
dynamically generated dropdowns using AJAX & PHP. *Problem is that
when the second dropdown is called, it loses the value of the first
dropdown? *Is there something I should know about this?

How can you call a dropdown?
How can dropdowns remember the value of another dropdown?
What is a dropdown, an html select element?

I had this Christal ball, but I dropped it,
now I cannot comment on code that isn't there.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Maybe I not explaining this properly, but I know this is a very common
thing, and it works in IE.

User selects some value in box #1, AJAX/PHP dynamically generates box
#2. User selects from box #2, values are passed to AJAX/PHP script to
be processed.

I works fine in IE, but not in Firefox, so, something is strange about
the different browser. Probably some dumb thing not following
standards.

Reply With Quote
  #4  
Old   
Thomas 'PointedEars' Lahn
 
Posts: n/a

Default Re: AJAX Dropdown with Firefox - 11-02-2009 , 04:52 PM



The Magnet wrote:

Quote:
I have this weird problem with Firefox & IE. I have a page with
Do you mean an HTML document?

Quote:
dynamically generated dropdowns using AJAX & PHP.
AJAX is a technique. PHP is a programming language. Relevance?

Quote:
Problem is that when the second dropdown is called,
Dropdowns are _not_ called. There is no real dropdown widget in HTML to
begin with, that is only one possible representation of SELECT elements.

Quote:
it loses the value of the first dropdown?
Perhaps a request takes place, so that the value of the second SELECT
element is submitted and the value of the first one is not. Perhaps not.

Quote:
Is there something I should know about this?
Yes, you should know the relevant source code or the URL and tell us about
either or both.

Quote:
It works fine in IE and retains the value. But not with Firefox....
Probably written by someone not knowing what they are doing, employing an
ActiveXObject-only solution which would not work in anything but an MSXML-
supporting environment (so also not in Opera, Safari etc.)

<http://jibbering.com/faq/#posting>



PointedEars
--
Use any version of Microsoft Frontpage to create your site.
(This won't prevent people from viewing your source, but no one
will want to steal it.)
-- from <http://www.vortex-webdesign.com/help/hidesource.htm> (404-comp.)

Reply With Quote
  #5  
Old   
JR
 
Posts: n/a

Default Re: AJAX Dropdown with Firefox - 11-02-2009 , 05:38 PM



On Nov 2, 7:44*pm, The Magnet <a... (AT) unsu (DOT) com> wrote:
Quote:
On Nov 2, 3:20*pm, "Evertjan." <exjxw.hannivo... (AT) interxnl (DOT) net> wrote:



The Magnet wrote on 02 nov 2009 in comp.lang.javascript:

I have this weird problem with Firefox & IE. *I have a page with
dynamically generated dropdowns using AJAX & PHP. *Problem is that
when the second dropdown is called, it loses the value of the first
dropdown? *Is there something I should know about this?

How can you call a dropdown?
How can dropdowns remember the value of another dropdown?
What is a dropdown, an html select element?

I had this Christal ball, but I dropped it,
now I cannot comment on code that isn't there.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

Maybe I not explaining this properly, but I know this is a very common
thing, and it works in IE.

User selects some value in box #1, AJAX/PHP dynamically generates box
#2. *User selects from box #2, values are passed to AJAX/PHP script to
be processed.

I works fine in IE, but not in Firefox, so, something is strange about
the different browser. *Probably some dumb thing not following
standards.
Unless the options list is very long, I'd suggest using PHP code to
write that list in an array or object literal (a javascript code
written by PHP code). Then it would be easier to refill select #2
according to the options chosen in select #1. Anyway, it's easy to
test what's going wrong if you run the PHP page called by the AJAX
code with the select #1 selected option.

Cheers,
JR

Reply With Quote
  #6  
Old   
NickFitz
 
Posts: n/a

Default Re: AJAX Dropdown with Firefox - 11-03-2009 , 11:02 AM



On Nov 2, 9:44*pm, The Magnet <a... (AT) unsu (DOT) com> wrote:
Quote:
I works fine in IE, but not in Firefox, so, something is strange about
the different browser. *Probably some dumb thing not following
standards.
"Some dumb thing not following standards" sounds like an adequate
description of IE. If you've written your code to work in IE, then it
is very unlikely to work correctly in an environment that supports
standards. Are you seeing the same problem in Opera, Safari, Chrome?

However, it is impossible to suggest what might be the root cause of
your problem without seeing some code, or preferable the URL of a test
case.

Regards,

Nick.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.