i have an application that saves a listing entry. this entry can have
multiple number of addresses. so i have a child window that pops up.
this window then calls addresspost.cfm, this is the code you will find
below, and with this page i save the address and proceed to get all of
the address that belong to the specific listing_id. once i get all of
the addresses i place them into an array. but now i'm trying to pass
that array into javascript and don't know how. 

Please help SomeOne
Thank you
Metzy



<cfparam name="txtListing_Id" default="">
<cfparam name="selArea" default="">
<cfparam name="txtStreet1" default="">
<cfparam name="txtStreet2" default="">
<cfparam name="txtCity" default="">
<cfparam name="selState" default="">
<cfparam name="txtZip" default="">
<cfparam name="txtPhone" default="">
<cfparam name="txtFax" default="">
<cfparam name="txtEmail" default="">
<cfparam name="txtHours" default="">
<cfparam name="txtDescription" default="">
<cfparam name="txtKeywords" default="">
<cfparam name="chkActive" default="off">
<cfoutput>
<cfquery name="address" datasource="#dsn.listings_v2#">
INSERT INTO 
address
(Listing_Id, area_Id, street1, street2, city, state,
zipCode, phone, fax, email, hours, description, keywords, active) 
VALUES 
(#txtListing_Id#, '#selArea#', '#txtStreet1#',
'#txtStreet2#', '#txtCity#', '#selState#', '#txtZip#', '#txtPhone#',
'#txtFax#', '#txtEmail#', '#txtHours#', '#txtDescription#',
'#txtKeywords#',
'#chkActive#')
</cfquery>
<cfquery name="addressArray" datasource="#dsn.listings_v2#"
dbtype="ODBC">
SELECT 
address_ID, street1
FROM 
address 
WHERE
listing_id = #txtListing_id#
</cfquery>
</cfoutput>
<cfif addressArray.recordCount GT 0>
<cfset arrValue = ArrayNew(1)>
<cfset arrLabel = ArrayNew(1)>
<cfloop index=i from=1 to=#addressArray.recordcount#> 
<cfset arrValue = AddressArray.address_id>
<cfset arrLabel = 'addressArra.street'>
</cfloop>

<HTML>
<HEAD>
<META NAME="ROBOTS" CONTENT="NONE">
<SCRIPT LANGUAGE="JavaScript">
<!--
function refreshProduct()
{
// Rebuilds the catalog list for the product page.
// It is built here so that it can be returned to the product page and
reloaded
window.opener.modifyAddress(#arrLabel#, #arrValue#);

window.close();
}
//-->

</SCRIPT>

</HEAD>
<BODY onload="javascript: refreshProduct();">
</body>
</HTML>
<cfelse>
<HTML>
<HEAD>
<META NAME="ROBOTS" CONTENT="NONE">
<SCRIPT LANGUAGE="JavaScript">
<!--
function refreshProduct()
{
// Rebuilds the catalog list for the product page.
// It is built here so that it can be returned to the product page and
reloaded

var arrValue;
var arrLabel;
window.opener.modifyaddress(arrLabel, 0);

window.close();

}
//-->

</SCRIPT>

</HEAD>
<BODY onload="javascript: refreshProduct();">
</body>
</HTML>

</cfif> 

-------------------------
Metzy Matinez 

______________________________________________________________________
Dedicated Windows 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=coldfusiona
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

Reply via email to