?
Solved

Different forms posting the same database

Posted on 2004-07-30
3
Medium Priority
?
211 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 2000 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

WordPress Tutorial 2: Terminology

An important part of learning any new piece of software is understanding the terminology it uses. Thankfully WordPress uses fairly simple names for everything that make it easy to start using the software.

Question has a verified solution.

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

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…
Originally, this post was published on Monitis Blog, you can check it here . It goes without saying that technology has transformed society and the very nature of how we live, work, and communicate in ways that would’ve been incomprehensible 5 ye…
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…
The purpose of this video is to demonstrate how to set up an RSS Feed on a WordPress Website. This will be demonstrated using a Windows 8 PC. Feedburner will be used for this demonstration. Go to your WordPress login page. This will look like the…
Suggested Courses

800 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