|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
How to retrieve form values in ColdFusion
I have an asp page, and it is supposed to pass 2 fields over to the next page for processing. Supposedly, if the next page is a HTML page, how do I retrieve the 2 hidden fields passed over?
<form name="form" Action="dloginaction.cfm" METHOD="POST"> <input type='hidden' name='Userid' value='<%=userID%>'> <input type='hidden' name='Password' value='<%=password%>'> </form> Over at the next page, I intend to retrieve the fields in HTML codes, before assigning them to the cfm codes, if that's even possible. Does anyone have a similar problem? Any help would be greatly appreciated. Thanks in advance. Keith Last edited by keith_foo : March 8th, 2004 at 07:44 PM. |
|
#2
|
||||
|
||||
|
you can't request variables from an html page. it has to be a .asp page.
|
|
#3
|
|||
|
|||
|
Thank you for your reply Memnoch.
Sorry, my mistake. HTML can't work. I was actually trying to achieve this: ============================================= getUser.asp <form name="form" Action="dloginaction.cfm" METHOD="POST" id="form"> <input type='hidden' name='Userid' value='<%=userID%>'> <input type='hidden' name='Password' value='<%=password%>'> </form> <Script Language=Javascript> this.form.submit(); </Script> ============================================= over at the dloginaction.cfm page... <cfset userid=Form.Userid> <cfset password=Form.Password> I can't seem to be retrieving the values correctly. Is it wrong to do it this way? Keith |
|
#4
|
|||
|
|||
|
Hi,
Is the original page ASP and the posted page cfm ? The CFM code looks ok - try doing outputting the form values before you post the page to make sure they are ok and as anticipated. I've never mixed the two coding types so I'm not sure if form variables will carry over to the cf server. If this is the case then you might want to divert to a coldfusion page before doing any security checks. |
|
#5
|
|||
|
|||
|
Actually, back at the ASP page everything works fine.
But over at the CFM page, it works only on certain PCs. When I tested the thing at certain computers, I get the error "Session.userID" is undefined. I'm puzzled as to why it only works on certain computers... |
![]() |
| Viewing: ASP Free Forums > Programming > HTML, JavaScript And CSS Help > How to retrieve form values in HTML? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|