ggggus
Programmer
- Jul 5, 2003
- 114
I'm trying to set up what I thought would be a simple ajax system, but I'm having troulbe with javascript returned to the client.
here's the relevant code:
and what is being returned to fill that div with: document.getElementById('div_find_model').innerHTML = http.responseText;
is the following:
here's the relevant code:
Code:
<script src="/js/ajax.js" type="TEXT/JAVASCRIPT"></script>
<div id="div_find_model"></div>
<script language="JavaScript" type="text/javascript">
<!--
find_model();
//-->
</script>
and what is being returned to fill that div with: document.getElementById('div_find_model').innerHTML = http.responseText;
is the following:
Code:
<select name="brand_id" style="width: 120" class="form_select" onChange="find_model(this.value);">
<option value=0>Select Brand</option>
<option ....>a list of options here</option>
</select>
[\code]
Ok, so here is what happens, The first code executes properly, but once an item is selected from the drop down, it is not executing find_model() again. The javascrip console in Firefox is telling me that find_model is not a function. It is a function, and it executes properly when it is called from outside of the div.
How do I fix this?
***************************************
J. Jacobs
[URL unfurl="true"]http://www.piercedmedia.com[/URL]