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
havik83rsAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

WasistdasCommented:
select * from seminars

...

<input type="text" name="seminar" value="#seminar#">
0
danrosenthalCommented:
on the seminar page have links like this...

<A HREF="register.cfm?seminar_name=#seminar_name#">

and on the register page have a query and a text box like this...

<INPUT type="text" name="seminar" value="#seminar_name#">

0
Renante EnteraSenior PHP DeveloperCommented:
Take this simple example:

Four your main page type this code:

<cfparam name="seminar" default="">
<input name="seminar" type="text" value="<cfoutput>#seminar#</cfoutput>">

Then save it as disp.cfm.

For your other file which displays the list of seminars.
Have this code:

<p><a href="disp.cfm?seminar=Seminar%20One">Seminar One</a></p>
<p><a href="disp.cfm?seminar=Seminar%20Two">Seminar Two</a></p>
<p><a href="disp.cfm?seminar=Seminar%20Three">Seminar Three</a></p>
<p><a href="disp.cfm?seminar=Seminar%20Four">Seminar Four</a></p>

Save as seminar.cfm.

Note: On the disp.cfm, it is required to have the <CFOUTPUT></CFOUTPUT> tags for the value of your textbox seminar.

Try to run this code...
I hope it will give you an idea for your problem.

GOODLUCK.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

Renante EnteraSenior PHP DeveloperCommented:
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!!!
0
dash420Commented:
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="psot"
     document.frmtest.hdnseminarname.value = myval
     document.frmtest.action="seminardtls.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('#semianr_details#');return false;">#semianr_details#</a>
</cfoutput>
</form>

seminardtls.cfm
<cfparam name="seminarname" default="">
<cfif isDefined("form.hdnseminarname")>
   <cfset seminarname= form.hdnseminarname>
</cfif>
<cfoutput>
Seminar Name :
<input type="text" name="txtseminarname" value="#seminarname#">
</cfoutput>


0
dash420Commented:
if u want to do it in url variable, don't forget to do urlencoding.

<a href="disp.cfm?seminar=URLEncodedFormat(seminar_name)">#seminar_name#</a></p>

refer it in details page for seminar name by url.seminar
0
havik83rsAuthor Commented:
Works perfectly, thanks!

Havik
0
Renante EnteraSenior PHP DeveloperCommented:
Thanks for the points havik83rs.
I'm glad to help you solve your problem. I hope to help you again next time.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Servers

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.