How about using frames? maybe an iframe/ilayer. that way you could click on a name, and the info would pop in a another frame
Robert -----Original Message----- From: han peng [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 26, 2002 10:13 PM To: CF-Talk Subject: which is the best way to do auto retrieval of Address... hi... i need to do a address input fields.. where customer can choose their postal code.. and his house number and streetname will be retrieved out automatically... the codes below actually can do the work.. but because theres about 100,000 data to be put into array...so it took almost like a minute to load a page.... sigh... anyone have a better idea.? i did it this way coz customer wan to retrieve the data instantly.. thanx han Javascript function: function display_Street(box1, box2) { var TotalStreetArray = box2.length; for(i=0; i<TotalStreetArray; i++) { if(box2[i][0] == box1) { document.form.strStreetName.value = box2[i][1]; document.form.strBlockNumber.value = box2[i][2]; } } } <!--- Database Queries ---> <CFQUERY name="PostalCode_list" datasource="#request.DSN#" cachedwithin="#CreateTimeSpan(0, 6, 0, 0)#"> SELECT a.strPostalCode, a.strBlockNumber, b.strStreetName From tblPostalCode a, tblStreet b WHERE a.strStreetNumber = b.strStreetNumber ORDER BY a.strPostalCode </CFQUERY> <cfset StreetName_array = arraynew(2)> <CFSET i =1> <CFLOOP query="PostalCode_list"> <cfset StreetName_array[i][1] = "#trim(strPostalCode)#"> <cfset StreetName_array[i][2] = "#trim(strStreetName)#"> <cfset StreetName_array[i][3] = "#trim(strBlockNumber)#"> <CFSET i = i + 1> </CFLOOP> <CFWDDX INPUT="#StreetName_array#" OUTPUT="MyWDDXPacket" ACTION="CFML2WDDX"> <CFWDDX INPUT="#MyWDDXPacket#" OUTPUT="DynamicJSCode" ACTION="WDDX2JS" TOPLEVELVARIABLE="StreetName_array"> <script><cfoutput>#DynamicJSCode#</cfoutput></script> <table width="100%" border="0" cellspan=0> <tr> <td width="5%">BLK/HSE NO.</td> <td width="25%"><cfinput type="text" name="strBlockNumber" size="5" maxlength="5" message="Please enter your Block / House Number." required="Yes" onerror="setFocus" value="#session.prospect.strBlockNumber#"></td> <td width="5%">FLR.</td> <td width="25%"><cfinput type="text" name="strFloorNumber" size="5" maxlength="5" message="Please enter your Floor Number." required="No" value="#session.prospect.strFloorNumber#"></td> <td width="5%">UNIT</td> <td width="25%"><cfinput type="text" name="strUnitNumber" size="5" maxlength="5" message="Please enter your Unit Number." required="No" value="#session.prospect.strUnitNumber#"></td> <td width="5%"> </td> <td width="5%"> </td> </tr> <tr> <td>ST</td> <td colspan =3><cfinput type="text" name="strStreetName" size="50" maxlength="50" message="Please enter your Street Name." required="Yes" onerror="setFocus" value="#session.prospect.strStreetName#"></td> <td>BLDG</td> <td colspan =3><cfinput type="text" name="strBuildingName" size="50" maxlength="50" message="Please enter your Building Name." required="No" value="#session.prospect.strBuildingName#"></td> </tr> <tr> <td>PD</td> <td><cfSELECT name="strPostalName" display="strPostalCode" value="strPostalCode" query="postalCode_list" size="1" message="Please choose your Postal Code." required="Yes" onerror="setFocus" Selected="#session.prospect.strPostalName#" onChange="display_Street(this.options[this.selectedIndex].value, StreetName_array);"></CFSELECT></td> <td>TYPE</td> <td><cfselect name="strAddressType" message="Please enter your Housing Type." required="Yes" onerror="setFocus" Selected="#session.prospect.strAddressType#" size="1"> <option value="A" <cfif #session.prospect.strAddressType# eq 'A'>SELECTED</cfif>>A</option> <option value="B" <cfif #session.prospect.strAddressType# eq 'B'>SELECTED</cfif>>B</option> </cfselect></td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> </table> ______________________________________________________________________ Why Share? Dedicated Win 2000 Server · PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER Instant Activation · $99/Month · Free Setup http://www.pennyhost.com/redirect.cfm?adcode=coldfusionc FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists