havik83rs
asked on
pass value from page to another pages form textbox
Hi,
I have a page filled with seminars that the users can sign up for. I also have links following each seminar that send the user to a register page with a form. On this form there is a seminar text box that the user must fill out with the appropriate seminar name in order to be registered.
I would like to have this seminar text box filled out with the seminar name automatically. Any ideas on how to do this?
Havik
I have a page filled with seminars that the users can sign up for. I also have links following each seminar that send the user to a register page with a form. On this form there is a seminar text box that the user must fill out with the appropriate seminar name in order to be registered.
I would like to have this seminar text box filled out with the seminar name automatically. Any ideas on how to do this?
Havik
on the seminar page have links like this...
<A HREF="register.cfm?seminar _name=#sem inar_name# ">
and on the register page have a query and a text box like this...
<INPUT type="text" name="seminar" value="#seminar_name#">
<A HREF="register.cfm?seminar
and on the register page have a query and a text box like this...
<INPUT type="text" name="seminar" value="#seminar_name#">
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Additional Reminders:
%20 is equivalent to a single space
And:
For you link [disp.cfm?seminar=Seminar One], the value for the seminar correspond to the name of the seminar that you want to be displayed for your seminar textbox.
OK...
Best Wishes!!!
%20 is equivalent to a single space
And:
For you link [disp.cfm?seminar=Seminar One], the value for the seminar correspond to the name of the seminar that you want to be displayed for your seminar textbox.
OK...
Best Wishes!!!
i will rather suggests u to do it in hidden variable.
like this
seminar selection page.
<script language="javascript">
function fndetail(myval){
document.frmtest.method="p sot"
document.frmtest.hdnsemina rname.valu e = myval
document.frmtest.action="s eminardtls .cfm"
document.frmtest.submit()
}
</script>
<cfquery name="qryseminar" datasource="dsn">
select * from seminar
</cfquery>
<form name="frmtest">
<input type="hidden" name="hdnseminarname" value="">
<cfoutput query="qryseminar">
<a href="seminardtls.cfm" onclick="fndetail('#semian r_details# ');return false;">#semianr_details#< /a>
</cfoutput>
</form>
seminardtls.cfm
<cfparam name="seminarname" default="">
<cfif isDefined("form.hdnseminar name")>
<cfset seminarname= form.hdnseminarname>
</cfif>
<cfoutput>
Seminar Name :
<input type="text" name="txtseminarname" value="#seminarname#">
</cfoutput>
like this
seminar selection page.
<script language="javascript">
function fndetail(myval){
document.frmtest.method="p
document.frmtest.hdnsemina
document.frmtest.action="s
document.frmtest.submit()
}
</script>
<cfquery name="qryseminar" datasource="dsn">
select * from seminar
</cfquery>
<form name="frmtest">
<input type="hidden" name="hdnseminarname" value="">
<cfoutput query="qryseminar">
<a href="seminardtls.cfm" onclick="fndetail('#semian
</cfoutput>
</form>
seminardtls.cfm
<cfparam name="seminarname" default="">
<cfif isDefined("form.hdnseminar
<cfset seminarname= form.hdnseminarname>
</cfif>
<cfoutput>
Seminar Name :
<input type="text" name="txtseminarname" value="#seminarname#">
</cfoutput>
if u want to do it in url variable, don't forget to do urlencoding.
<a href="disp.cfm?seminar=URL EncodedFor mat(semina r_name)"># seminar_na me#</a></p >
refer it in details page for seminar name by url.seminar
<a href="disp.cfm?seminar=URL
refer it in details page for seminar name by url.seminar
ASKER
Works perfectly, thanks!
Havik
Havik
Thanks for the points havik83rs.
I'm glad to help you solve your problem. I hope to help you again next time.
I'm glad to help you solve your problem. I hope to help you again next time.
...
<input type="text" name="seminar" value="#seminar#">