Skip to main content
Participant
August 11, 2008
Question

Form Problem

  • August 11, 2008
  • 5 replies
  • 597 views
I have a page with 5 forms on it. Each is for pulling up a separate report. The forms allow you to choose variables for the report like date range and such. All of the forms use the same action page. For some reason 4 of the forms work just fine but one of them does not. When I click the submit button I get a message from Internet Explorer saying that it cannot download the action page from the domain.

This page of forms is in a "beta" folder that I made. In the regular non beta folder all 5 forms work. For some reason in the beta folder 4 of them work and just this 5th one breaks. When I compare the non working form to the others it seems to be coded the same way.

The form action looks like this.
<form action="indexreport.cfm?fuseaction=casereport" etc. etc.
Each form has a different fuseaction so that when the variable gets passed to the indexreport page it will pull up the proper report. In the beta folder 4 of the forms still work just fine. But this 5th one cannot seem to access the indexreport.cfm page. I'm baffled!!

Any ideas?
    This topic has been closed for replies.

    5 replies

    Participant
    August 13, 2008
    Ok

    The page I posted above is dsp_reports.cfm. This page gets included into index.cfm. index.cfm and indexreport.cfm are both in the Sales directory. So it makes sense that the 4 forms that use relative URLs work. But for some reason the one form needs to have /sales/ in front of it to work. If I remove /sales/ from that one form I get a page load error like this.

    Firefox can't find the file at http://www.mysite.com/sales/indexreport.cfm?fuseaction=act_case_report.

    IE gets a similar error just worded differently.

    If I run this form with the /sales/ in front I get this. (and it works)

    http://www.mysite.com/sales/indexreport.cfm?fuseaction=act_case_report.

    When I run either of the other 4 forms that work with the relative URLs (demo for example) the URL looks like this.

    http://www.mysite.com/sales/indexreport.cfm?fuseaction=act_demo_report.

    So you can see the 4 forms using the relative addys make the same URL as the one using the absolute URL. But as far as I can tell the one using the absolute URL should be able to work without /sales/ in front as a relative URL just like the other 4 forms.

    As for the RUN OLD button that actually does not show up on the page. Maybe because of this? style="display:none
    Only the RUN button is displayed which appears to be a normal RUN button just like the other forms.

    And note what I mentioned earlier. If I move this whole menagerie to another folder, say /salesbeta/ all 4 of the relative forms still work fine but the form that has the absolute URL stops working even if I have the /sales/ changed to /salesbeta/ on it's action line. That particular form ONLY works when /sales/ is in front. Cannot figure out why.

    What is different about that form that is not making it work like the other 4?


    Participant
    August 13, 2008
    Good info Kronin, I have to chew on this a little bit. Will get back to this in the morning.
    Participant
    August 12, 2008
    See now that is the catch. All 5 forms are actually pointing to /sales/indexreport.cfm but for some reason only the one form actually needs the /sales/ in front of it. The other 4 forms are finding the file just fine without the /sales/ in front. What is different about the one form that it is requiring that extra designation in front?

    Note: The reason this is a problem is because when I move all the files from /sales/ to /salesbeta/ the 4 forms with no designation in front still work fine but the one that had /sales/ in front (which I change to /salesbeta/) stops working. The browser then says it cannot download the file.
    Participating Frequently
    August 12, 2008
    quote:

    Originally posted by: Computersaurus
    All 5 forms are actually pointing to /sales/indexreport.cfm but for some reason only the one form actually needs the /sales/ in front of it. The other 4 forms are finding the file just fine without the /sales/ in front. What is different about the one form that it is requiring that extra designation in front?



    As long as the page displaying this form is in the same directory as indexreport.cfm, you don't need the "/sales/". Where does this form post to if you remove the "/sales/"? You need to fix that problem, then this other problem will go away.

    What is the URL when you're viewing this forms page? What is the URL after you post one of the ones that works? What is the URL after you post the one you feel needs the "/sales/" in front of the action using the RUN submit button? What is the URL after you post the one you feel needs the "/sales/" in front of the action using the Run Old button? What is the source code of the javascript function that button is calling? What is the URL that results if you remove the "/sales/" from the action of that form, re-load the form page and submit that form?
    Participating Frequently
    August 12, 2008
    4 of your forms are posting to the same place. One of them is posting to:
    <form action="/sales/indexreport.cfm?fuseaction=act_case_report" method="post" id="case_form" name="case_form">

    Note the "/sales/" in front of the indexreport.cfm.
    Inspiring
    August 11, 2008
    My first idea would be to use a hidden formfield instead of a query string and submit the form using post, not get. On the first line of indexreport.cfm, cfdump your form.

    Once you have that part working, start testing the part of the page that determines which block of code is going to run.
    Participant
    August 12, 2008
    Sorry I feel kinda newbish here but I am having trouble following your suggestion. I attached the page of code which contains the forms on it. Maybe that will help.