Link to home
Start Free TrialLog in
Avatar of xrayroom
xrayroom

asked on

coldfusion error

Hi, I have a program that shows a table with a list of customers and what money they owe and how long from the current date that they owe it. If you want a closer look at a single customer you can click the customer name which is a href and a new window opens giving a closer look at this customer. The current date is passed through the url and is defined as <cfset #todaydate# = todaydate.url>. This works fine until I included a cfform with a submit button which is supposed to export the info to excel. I get an todaydate not defined in url, which it isnt, but how else can I do this?
Avatar of Nathan Stanford Sr
Nathan Stanford Sr
Flag of United States of America image

In the page where the CFForm is add the cfinput line below.
<cfform>
<cfinput name="todaydate" type"hidden" value="url.todaydate">
</cfform>

Now in the file that is creating the export add the lines below.
<cfif isdefined('url.todaydate')>
   <cfset todaydate = url.todaydate>.
<cfelseif isdefined('form.todaydate')>
   <cfset todaydate = form.todaydate>.
</cfif>

Hope this helps and makes sense to you.
Avatar of xrayroom
xrayroom

ASKER

Hi, can you check the file, still getting same error, there is a form that posts to another script then when the link is clicked the attached script is called. Perhaps I didnt give a full enough over view before.

Thanks
debtors.txt
ASKER CERTIFIED SOLUTION
Avatar of Nathan Stanford Sr
Nathan Stanford Sr
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi, before I was getting coldfusion error pages, now im just getting page cant be displayed. It seems to be taking the date ok but not opening excel. any other ideas?

Thanks
now i seem to get cust not defined in url  too
I see... one what is your goal to get a pdf of the current page you are on of a pdf of the customer's page?  because if you want the customer page you need to click on that link if not then you need to link to a different page that does the current code as a pdf.  I wish I was there.
it is to get an excel file of the current page. I have similar code in the page that posts to this one and it works fine
ah, got it, just needed this cust=#get_sales.customer# as well, I didnt send you enough information for this...Thanks for the help!!