pass value from page to another pages form textbox

Posted on 2003-03-21
Medium Priority
Last Modified: 2013-12-24

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?

Question by:havik83rs
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Expert Comment

ID: 8184184
select * from seminars


<input type="text" name="seminar" value="#seminar#">
LVL 15

Expert Comment

ID: 8185078
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#">

LVL 14

Accepted Solution

Renante Entera earned 300 total points
ID: 8185174
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.

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

LVL 14

Expert Comment

by:Renante Entera
ID: 8185193
Additional Reminders:

%20 is equivalent to a single space


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.

Best Wishes!!!

Expert Comment

ID: 8185462
i will rather suggests u to do it in hidden variable.

like this

seminar selection page.

<script language="javascript">
   function fndetail(myval){
     document.frmtest.hdnseminarname.value = myval

<cfquery name="qryseminar" datasource="dsn">
  select * from seminar
<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>

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


Expert Comment

ID: 8185471
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

Author Comment

ID: 8195519
Works perfectly, thanks!

LVL 14

Expert Comment

by:Renante Entera
ID: 8199584
Thanks for the points havik83rs.
I'm glad to help you solve your problem. I hope to help you again next time.

Featured Post

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most ColdFusion developers get confused between the CFSet, Duplicate, and Structcopy methods of copying a Structure, especially which one to use when. This Article will explain the differences in the approaches with examples; therefore, after readin…
Introduction This article explores the design of a cache system that can improve the performance of a web site or web application.  The assumption is that the web site has many more “read” operations than “write” operations (this is commonly the ca…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses
Course of the Month8 days, 10 hours left to enroll

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question