Link to home
Start Free TrialLog in
Avatar of jkoonsman
jkoonsmanFlag for United States of America

asked on

onchange not working for Dynamic Selects in firefox

Hello,

I am using the following code for dynamic selects in my php applicacation using Smarty Templates:

<form action="/php/Contact-Display.php" method="post" name="filter" id="filter" onsubmit="document.getElementById('return_rows').value=document.getElementById('rowsSelect').value;">

<select name="leadsourceFilter" id="LeadSourceId" onchange="document.getElementById('filterKey').value=this.id; document.getElementById('filterValue').value=this.value; document.getElementById('search').value=''; document.getElementById('current').value='0'; document.forms.filter.submit();">
                    <option value="">Select</option>
                   
                     
  {if $filterKey=="LeadSourceId"}{html_options values=$leadSourceIds output=$leadSourceNames selected=$filterValue}{else}{html_options values=$leadSourceIds output=$leadSourceNames}{/if}
                   
                  </select>
Avatar of Gurvinder Pal Singh
Gurvinder Pal Singh
Flag of India image

try onclick along with onchange
Avatar of jkoonsman

ASKER

Thank you for your quick response:

Not sure I am following you, how do you use them together?
SOLUTION
Avatar of Gurvinder Pal Singh
Gurvinder Pal Singh
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Sorry but I tried this and it worked one time in IE then could not reselect. It did not work at all in FF.

Thank you.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I am going to try ajax vs javascript.