RE: form variables not passed to action page - please help!

2003-11-03 Thread Mike Brunt
You should check out this UDF for putting all form fields to hidden fields,
if you are on CF50 or greater.

http://www.cflib.org/udf.cfm?ID=534

Kind Regards - Mike Brunt
Webapper Services LLC
Web Site http://www.webapper.com
Blog http://www.webapper.net

Webapper 

-Original Message-
From: ColdFusion Programmer [mailto:[EMAIL PROTECTED]
Sent: Monday, November 03, 2003 6:29 AM
To: CF-Talk
Subject: Re:form variables not passed to action page - please help!

I'm assigning the form field values to hidden variables because it is a 4
pages form and I am passing the values from one page to another in hidden
variables. I have chceked the code in both the action pages, they both have
the same code, I just don't understand what's happenning here, I've turned
debugging on. One another thing I've noticed is if I remove the "id"
attribute from the text input fields, I get a _javascript_ error when
submitting the form (form variable FirstName is not undefined). I thought
the "id" attribute was optional. Any ideas?

>okay I copied your code and made a rental and order page. the page submits
>fine to either page depending on which button I press. One thing I dont
>understand is why you are assingning the values from a form field that is
>already being passed into a hidden field that is also passed?
>
>couldnt you do this in the js functions?
>
> function rentSubmit()
>  {
>    document.the_form.action = "">
>    document.the_form.submit();
>  }
>
> function orderSubmit()
>  {
>   document.the_form.action = "">
>    document.the_form.submit();
>  }
>
>but, either way it seems to be submitting fine. i guess you could check the
>syntax of your dump statement on the one page, and also turn debugging on
to
>see  the form variables being passed.
>
>hope this helps.
>
>
>
>-----Original Message-----
>From: Allan Clarke [mailto:[EMAIL PROTECTED]
>Sent: Monday, November 03, 2003 10:06 AM
>To: CF-Talk
>Subject: form variables not passed to action page - please help!
>
>
>Hi Guys,
>Am really hoping for someone to help me. I have this
>problem and can't find a solution. I have a form with
>two buttons with an onClick event each. Each button
>calls a _javascript_ function. When the user clicks on
>the button, I'm assigning all form field values to
>hidden variables. When I dump the form values on the
>action page,
>I see the form field values (including hidden form
>field values) for button 1, but don't see the same
>when button 2 is clicked. Here is my code
>
><br>
><br>
>  function rentSubmit()<br>
>  {<br>
> with (document.the_form) {<br>
>FirstName_hid.value = FirstName.value;<br>
>  LastName_hid.value = LastName.value;<br>
>    }<br>
>    document.the_form.action = "">
>    document.the_form.submit();<br>
>  }<br>
><br>
>  function orderSubmit()<br>
>  {<br>
>  with (document.the_form) {<br>
>  FirstName_hid.value = FirstName.value;<br>
>    LastName_hid.value = LastName.value;<br>
>  }<br>
>    document.the_form.action = "">
>    document.the_form.submit();<br>
>  }<br>
><br>
>  
>
>
>
>value="" size="56">
>
>value="" size="56">
>
>
>
>
>
>>
>
>>
>
>
>When I click on the "Rent" button, I am taken to
>RentalForm.cfm. In this file, I have a
>
>It dumps all the form variables as I expect it to. But
>when I click on the "Order" button, I get directed to
>OrderForm.cfm but the cfdump on that page displays
>nothing. I don't understand why I don't see the form
>variables? Can somebody show/tell me how to fix this
>problem.
>
>Many Thanks,
>Allan
>
>__
>Do you Yahoo!?
>Exclusive Video Premiere - Britney Spears
>http://launch.yahoo.com/promos/britneyspears/
>
>  _
>
>
  _


 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: form variables not passed to action page - please help!

2003-11-03 Thread John Stanley
>> I've turned debugging on.

 
did you look at the bottom of the page to see if the form variables are
being passed to the page? if they are, then it is the action page. if they
are not, then it is the form page.

 
i've remvoed the id attributes from the text fields and get no errors. I've
even removed the name attribute, but left the id attribute, and the value
still gets assigned to the hidden fields.

 
i do get the error if i remove both the id and the name attribute.

-Original Message-
From: ColdFusion Programmer [mailto:[EMAIL PROTECTED]
Sent: Monday, November 03, 2003 9:29 AM
To: CF-Talk
Subject: Re:form variables not passed to action page - please help!

I'm assigning the form field values to hidden variables because it is a 4
pages form and I am passing the values from one page to another in hidden
variables. I have chceked the code in both the action pages, they both have
the same code, I just don't understand what's happenning here, I've turned
debugging on. One another thing I've noticed is if I remove the "id"
attribute from the text input fields, I get a _javascript_ error when
submitting the form (form variable FirstName is not undefined). I thought
the "id" attribute was optional. Any ideas?

>okay I copied your code and made a rental and order page. the page submits
>fine to either page depending on which button I press. One thing I dont
>understand is why you are assingning the values from a form field that is
>already being passed into a hidden field that is also passed?
> 
>couldnt you do this in the js functions?
> 
> function rentSubmit()
>  {
>    document.the_form.action = "">
>    document.the_form.submit();
>  }
> 
> function orderSubmit()
>  {
>   document.the_form.action = "">
>    document.the_form.submit();
>  }
> 
>but, either way it seems to be submitting fine. i guess you could check the
>syntax of your dump statement on the one page, and also turn debugging on
to
>see  the form variables being passed.
> 
>hope this helps.
>
>
>
>-----Original Message-
>From: Allan Clarke [mailto:[EMAIL PROTECTED]
>Sent: Monday, November 03, 2003 10:06 AM
>To: CF-Talk
>Subject: form variables not passed to action page - please help!
>
>
>Hi Guys,
>Am really hoping for someone to help me. I have this
>problem and can't find a solution. I have a form with
>two buttons with an onClick event each. Each button
>calls a _javascript_ function. When the user clicks on
>the button, I'm assigning all form field values to
>hidden variables. When I dump the form values on the
>action page,
>I see the form field values (including hidden form
>field values) for button 1, but don't see the same
>when button 2 is clicked. Here is my code
>
><br>
><br>
>  function rentSubmit()<br>
>  {<br>
> with (document.the_form) {<br>
>FirstName_hid.value = FirstName.value;<br>
>  LastName_hid.value = LastName.value;<br>
>    }<br>
>    document.the_form.action = "">
>    document.the_form.submit();<br>
>  }<br>
><br>
>  function orderSubmit()<br>
>  {<br>
>  with (document.the_form) {<br>
>  FirstName_hid.value = FirstName.value;<br>
>    LastName_hid.value = LastName.value;<br>
>  }<br>
>    document.the_form.action = "">
>    document.the_form.submit();<br>
>  }<br>
>  <br>
>  
>
>
>
>value="" size="56">
>
>value="" size="56">
>    
>
>
>    
>
>>
>
>>
>
>
>When I click on the "Rent" button, I am taken to
>RentalForm.cfm. In this file, I have a 
>
>It dumps all the form variables as I expect it to. But
>when I click on the "Order" button, I get directed to
>OrderForm.cfm but the cfdump on that page displays
>nothing. I don't understand why I don't see the form
>variables? Can somebody show/tell me how to fix this
>problem.
>
>Many Thanks,
>Allan
>
>__
>Do you Yahoo!?
>Exclusive Video Premiere - Britney Spears
>http://launch.yahoo.com/promos/britneyspears/
>  
>  _  
>
> 
  _  


 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: form variables not passed to action page - please help!

2003-11-03 Thread John Stanley
okay I copied your code and made a rental and order page. the page submits
fine to either page depending on which button I press. One thing I dont
understand is why you are assingning the values from a form field that is
already being passed into a hidden field that is also passed?

 
couldnt you do this in the js functions?

 function rentSubmit()
  {
    document.the_form.action = "">
    document.the_form.submit();
  }

 function orderSubmit()
  {
   document.the_form.action = "">
    document.the_form.submit();
  }

 
but, either way it seems to be submitting fine. i guess you could check the
syntax of your dump statement on the one page, and also turn debugging on to
see  the form variables being passed.

 
hope this helps.

-Original Message-
From: Allan Clarke [mailto:[EMAIL PROTECTED]
Sent: Monday, November 03, 2003 10:06 AM
To: CF-Talk
Subject: form variables not passed to action page - please help!

Hi Guys,
Am really hoping for someone to help me. I have this
problem and can't find a solution. I have a form with
two buttons with an onClick event each. Each button
calls a _javascript_ function. When the user clicks on
the button, I'm assigning all form field values to
hidden variables. When I dump the form values on the
action page,
I see the form field values (including hidden form
field values) for button 1, but don't see the same
when button 2 is clicked. Here is my code

<br>
<br>
  function rentSubmit()<br>
  {<br>
 with (document.the_form) {<br>
FirstName_hid.value = FirstName.value;<br>
  LastName_hid.value = LastName.value;<br>
    }<br>
    document.the_form.action = "">
    document.the_form.submit();<br>
  }<br>
<br>
  function orderSubmit()<br>
  {<br>
  with (document.the_form) {<br>
  FirstName_hid.value = FirstName.value;<br>
    LastName_hid.value = LastName.value;<br>
  }<br>
    document.the_form.action = "">
    document.the_form.submit();<br>
  }<br>
  <br>
  



value="" size="56">

value="" size="56">
    


    

>

>


When I click on the "Rent" button, I am taken to
RentalForm.cfm. In this file, I have a 

It dumps all the form variables as I expect it to. But
when I click on the "Order" button, I get directed to
OrderForm.cfm but the cfdump on that page displays
nothing. I don't understand why I don't see the form
variables? Can somebody show/tell me how to fix this
problem.

Many Thanks,
Allan

__
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears
http://launch.yahoo.com/promos/britneyspears/
  
  _  


 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




form variables not passed to action page - please help!

2003-11-03 Thread Allan Clarke
Hi Guys,
Am really hoping for someone to help me. I have this
problem and can't find a solution. I have a form with
two buttons with an onClick event each. Each button
calls a _javascript_ function. When the user clicks on
the button, I'm assigning all form field values to
hidden variables. When I dump the form values on the
action page,
I see the form field values (including hidden form
field values) for button 1, but don't see the same
when button 2 is clicked. Here is my code



  function rentSubmit()
  {
 with (document.the_form) {
FirstName_hid.value = FirstName.value;
  LastName_hid.value = LastName.value;
    }
    document.the_form.action = "">     document.the_form.submit();
  }

  function orderSubmit()
  {
  with (document.the_form) {
  FirstName_hid.value = FirstName.value;
    LastName_hid.value = LastName.value;
  }
    document.the_form.action = "">     document.the_form.submit();
  }
  
   value="" size="56"> value="" size="56">         > > When I click on the "Rent" button, I am taken to RentalForm.cfm. In this file, I have a It dumps all the form variables as I expect it to. But when I click on the "Order" button, I get directed to OrderForm.cfm but the cfdump on that page displays nothing. I don't understand why I don't see the form variables? Can somebody show/tell me how to fix this problem. Many Thanks, Allan __ Do you Yahoo!? Exclusive Video Premiere - Britney Spears http://launch.yahoo.com/promos/britneyspears/ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]