- see footer for list info -<
Hi all,
I have a property website and I want to use the 'ononemap' api
(www.ononemap.com).
Im not really sure how I go about this ...
I have an action page that writes everything to the database when a new
property is uploaded so I guess the necessary script to call the API goes
there. Question is what is the script ...?
What do I have to do to invoke it and how do I process the responses ...?
The main bit of my uploadaction is .....
<CFTRY>
<!--- UPLOAD THE PROPERTY DETAILS --->
<cffile action ="UPLOAD"
filefield ="details"
nameconflict = "overwrite"
accept = "application/pdf"
destination = "#application.uploadDetails#">
<cfif #file.filewassaved# eq "yes"><!--- Were the details saved? --->
<cfset details = '#file.serverfile#'>
<!---<cfdump var="#CFFILE#" label="first upload">--->
</cfif>
<CFCATCH><CFSET errormessage = "Please enter a file"></CFCATCH>
</CFTRY>
<CFTRY>
<!--- UPLOAD THE SMALL PROPERTY PICTURE --->
<cffile action ="UPLOAD"
filefield ="smallpic"
nameconflict = "overwrite"
accept = "image/jpg, image/pjpeg"
destination = "#application.UploadDirectory#">
<cfif #file.filewassaved# eq "yes"><!--- Was the small pic saved? --->
<cfset smallpic = '#trim(file.serverfile)#'>
<!---<cfdump var="#CFFILE#" label="Second upload">--->
</cfif>
<CFCATCH><CFSET errormessage = "Please enter a file"></CFCATCH>
</CFTRY>
<!--- Add the property to the database --->
<CFQUERY NAME="AddProperty" datasource="#application.DSN#">
INSERT INTO tblPropertyDetails
(NoBedroomsIDFK,
PropertyTypeIDFK,
PropertyLocationIDFK,
RoadName,
Picture,
Description1,
Description2,
Description3,
Description4,
Description5,
Description6,
SellingPrice,
PostCode,
PDFDetails)
VALUES
('#form.Select_Bedrooms#',
'#form.Select_Type#',
'#form.Select_Location#',
'#trim(form.RoadName)#',
'#smallpic#',
'#trim(form.Description1)#',
'#trim(form.Description2)#',
'#trim(form.Description3)#',
'#trim(form.Description4)#',
'#trim(form.Description5)#',
'#trim(form.Description6)#',
CAST('#FORM.SellingPrice#' AS MONEY),
'#trim(PostCode)#',
'#Details#')
</CFQUERY>
Regards - Paul
_______________________________________________
For details on ALL mailing lists and for joining or leaving lists, go to
http://list.cfdeveloper.co.uk/mailman/listinfo
--
CFDeveloper Sponsors:-
- Hosting provided by www.cfmxhosting.co.uk -<
- Forum provided by www.fusetalk.com -<
- DHTML Menus provided by www.APYCOM.com -<
- Lists hosted by www.Gradwell.com -<
- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<