Solved

Different forms posting the same database

Posted on 2004-07-30
3
200 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
[X]
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
  • 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

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

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

Turn A Profile Picture Into A Cartoon Using Photoshop And Illustrator This tutorial will teach you how to make a cartoon style image out of a regular picture. I have tried to keep the tutorial as simple as possible. I used Adobe CS4 for this tuto…
Introduction In this tutorial, I'll explain how to create an animated progress meter in a wireframe prototype developed using Axure RP 7.0 - a leading prototyping tool for designing web sites and software. (For more information about Axure and gett…
The purpose of this video is to demonstrate how to make a WordPress Site faster and smaller in size by cleaning up the database. This will be demonstrated using a Windows 8 PC. Plugin WP Optimize will be used. Go to your WordPress login page. T…
The purpose of this video is to demonstrate how to Test the speed of a WordPress Website. Site Speed is an important metric of a site’s health. Slow site speed can result in viewers leaving your site quickly and not seeing your content. This…

726 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