Solved

Different forms posting the same database

Posted on 2004-07-30
3
196 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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

When deciding to adopt any help desk solutions many factors should be explored before taking decisions. This will change from business to another but in general there are some kind of rule of thumb. Here are some quick tips: Do we need only ticket…
In this short web based tutorial, I wanted to show users how they can still use the powers of FrontPage in conjunction with Expression Web 3.  Even though Microsoft eliminated the use of Web components, we can still use them with FrontPage and edit …
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…
The purpose of this video is to demonstrate how to set up basic WordPress SEO. This will be demonstrated using a Windows 8 PC. The plugin used will be WordPress SEO by Yoast. Go to your WordPress login page. This will look like the following: myw…

746 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

18 Experts available now in Live!

Get 1:1 Help Now