Solved

Different forms posting the same database

Posted on 2004-07-30
3
197 Views
Last Modified: 2013-12-24
I register players for events.  I would like the participant to select an event and location on a separate page from the form itself iand have the form field "event" and "location" on the actual form filled in.  There is too many events and/or locations to use a drop down box on the actual form.  If I must create as many forms as events that would be cumbersome but ok.   Or if I could have method that when the participants came to the event field (or location field) they could open another page to make their selection and it would paste or fill out that field on the form...   I guess I would like a more elegant drop down box.  This would be an ASP form.  Don't know if there is a problem with multiple forms posting the same database?
0
Comment
Question by:bnp6622
  • 2
3 Comments
 
LVL 12

Accepted Solution

by:
rcmb earned 500 total points
ID: 11676100
On the first page create the form with your drop-downs for event  and location.

Have the form post to your other form page and in the second form (your actual form) in the box for event enter

<input name="event" type="text" value="<%=request.form("event")%>">

and for the location enter

<input name="location" type="text" value="<%=request.form("location")%>">

in the values section of each box

You can also use hidden fields so the user is not tempted to modify the displayed boxes like so:

<input name="event" type="hidden" value="<%=request.form("event")%>">
<input name="location" type="hidden" value="<%=request.form("location")%>">

or use a drop-down with the only one option

<select size="1" name="event">
        <option><%=request.form("event")%></option>
        </select>

<select size="1" name="location">
        <option><%=request.form("location")%></option>
        </select>

RCMB
0
 
LVL 3

Expert Comment

by:hawks4ever
ID: 11676696
Try this.  This basic script will get your event.  Minimal changes will get the location in the same way for you.

<script language="JavaScript">
function doLookup() {
      window.open("lookup.asp?formName=form1&formField=strEvent","","width=500 height=250, scrollbars=yes")
}
</script>

<form method="post" action="result.asp" name="form1">
<input type="text" name="strEvent" size="25"> <a href="javascript:doLookup()">Look for it</a>
</form>

----------------lookup.asp code-------------------
<form name="form2">
  <p><input type="radio" name="strEvent" value="Event 1">Event1</p>
  <p><input type="radio" name="strEvent" value="Event2">Event2</p>
  <p><input type="button" value="Select" name="go" onclick="javascript:opener.document.<% =Request("formName") %>.<% =Request("formField") %>.value = ' + form1.strEvent.value + '; setTimeout('self.close()', 500);"></p>
</form>
0
 
LVL 12

Expert Comment

by:rcmb
ID: 11747400
bnp6622,

If you desire to chat with me about additional help you can reach me at rcmb25@bellsouth.net

RCMB
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
HTML Editor That Indents Code As Illustrated 11 136
How can I find the URL of the zoomed in image 3 103
Internet Explorer ignoring hyphens in html 1 86
Google Maps 7 72
When setting up new project requests for our site, one of the most powerful tools our team has available to use is Axure (http://www.axure.com/). It’s a tool for creating software and web prototypes that can function and interact as if it were the a…
Objective of This Article In 1990’s, when I was a budding software professional, I had a lot of confusion about which stream or technology, I had to choose to build my career. In those days, I had lot of confusion like whether to choose System so…
The purpose of this video is to demonstrate how to manually back up a WordPress Database. This will be demonstrated using a Windows 8 PC. The Host used will be IPage.com Log into your Hosting account. IPage will be used for demonstration : Locat…
The purpose of this video is to demonstrate how to integrate Mailchimp with Facebook. This will be demonstrated using a Windows 8 PC. Mailchimp and Facebook will be used. Log into your Mailchimp account. : Click on your name. Go to Account Setti…

914 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now