Advertisement

07.15.2008 at 01:54AM PDT, ID: 23565385
[x]
Attachment Details

problem in IE passing cfform/cfselect over an ajax request

Asked by CurtinProp in Asynchronous Javascript and XML (AJAX), Internet Explorer Web Browser, Cold Fusion Markup Language

Tags: coldfusion, ajax, internet explorer problems, perfect in firefox

Created a building search form that isn't functioning properly in Internet explorer.

 The user selects a building "select_buildings" and the rooms for that particular building are dynamically generated in the rooms dropdown list "sel_rooms".

It functions fine in Firefox so I'm thinking that there is an issue with cfform and ajax in IE? (after removing the cf related code it works accross all browsers)

Any suggestions? modify as you see fit.

cheers

I've added the file as well as a code snippet:
Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
<script language="javascript">
	
 
	function init() {
	
	var building = $F('sel_building');
	
	
	
	var div = 'result';
	var url = '/ajax/index.cfm';
	
	new Ajax.Updater(div, url,{asynchronous:true, method:'post', postBody: 'building='+building});
	
	}
		
		
	function search_cats() {
 
	var building = $F('sel_building');
	var room 	 = $F('sel_rooms');
	var div = 'search_results';
	var url = '/ajax/building_select_action.cfm';
	
	$(div).update('<div class="preloader">Loading <img src="loading.gif"></div>');
	new Ajax.Updater(div, url,{asynchronous:true, method:'post', postBody: 'buildings='+building+'&rooms='+room});
	}
 
	function search_fac() {
	
	var params = $('select_facilities').serialize();
	var div = 'search_results';
	var url = '/ajax/facilities_select_action.cfm';
	$(div).scrollTo();
	$(div).update('<div class="preloader">Loading <img src="loading.gif"></div>');
 
	new Ajax.Updater(div, url, {asynchronous:true, parameters:params});	
	
	}
</script>
 
<div class="src_loc">
<h2>Search by Location</h2>
<cfquery name="get_building" datasource="afmread">
SELECT DISTINCT BL_ID
FROM RM
WHERE BU_ID=0031
</cfquery>
 
    <table cellpadding="0" cellspacing="0" border="0">
        <tr>
            <td><p>Select Building:</p></td>
            <td class="right_space">
            <!---<cfform name="select_building" id="select_building" action="building_select_action.cfm">--->
            <cfform name="select_building" id="select_building">
                
                <cfselect name="buildings" onchange="init();"
                id="sel_building"
                query="get_building"
                display="BL_ID"
                required="Yes"
                multiple="No"
				selected="none"
				queryPosition="below"
                size="1">
				<option value="none">-- Select a Building --</option>
                </cfselect>
            </td>
            <td><p>Room:</p></td>    
            <td class="right_space">	
		<div id="result">
                <select id="sel_rooms" name="rooms">
                <option value="0">-- Select a Room --</option>
                </select></div>
            </td>
            <td>
                <input type="button" id="cats_submit" value="Search" OnClick="search_cats();"/>
            </td>
            </cfform>
            
</tr>
    </table>
</div>
 
<div class="src_fac">
<h2>Search by Facilities</h2>
<table cellpadding="0" cellspacing="0" border="0">
    <tr>
        <td class="right_space">
 
                <cfform name="select_facilities" id="select_facilities" action="facilities_select_action.cfm">
                <input type="checkbox" id="dvdvcr" name="dvdvcr" value="true" /> Access to DVD/VCR Combo<br />
                <input type="checkbox" name="vcr" value="true" /> Access to VCR<br />
                <input type="checkbox" name="ohp" value="true" /> Access to O/H Projector<br />
                <input type="checkbox" name="dataproj" value="true" /> Has Data Projector<br />
        </td>
        <td class="right_space"> 
        	<input type="checkbox" name="netports" value="true" /> Has Network Ports<br />       
                <input type="checkbox" name="wap" value="true" /> Wireless Network Access<br />
                <input type="checkbox" name="phone" value="true" /> Has Telephone Ports<br />
                <input type="checkbox" name="vidscreen" value="true" /> Has Video Screen<br />
                
 
        </td>
        
    </tr>
    <tr>
    	<td style="padding-top:10px;"><input id="cats_submit" type="button" value="Click here to Search" OnClick="search_fac();"/></td></tr>
    </cfform>
 
</table>
</div>
 
<hr />
 
<div id="search_results"></div> 
</body>
</html>
 
 
[+][-]07.15.2008 at 02:38AM PDT, ID: 22005310

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.15.2008 at 07:57PM PDT, ID: 22012975

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Asynchronous Javascript and XML (AJAX), Internet Explorer Web Browser, Cold Fusion Markup Language
Tags: coldfusion, ajax, internet explorer problems, perfect in firefox
Sign Up Now!
Solution Provided By: CurtinProp
Participating Experts: 1
Solution Grade: B
 
 
[+][-]07.17.2008 at 10:08AM PDT, ID: 22027567

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]07.17.2008 at 10:08AM PDT, ID: 22027577

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628