?
Solved

Jump menu

Posted on 2004-04-08
7
Medium Priority
?
323 Views
Last Modified: 2013-12-24
I have this form below, what i am trying to accomplish here is fill all these fields, and when i choose one of the it should take me to the right file, i was able to do that but i couldn't submit anything to the database, so what is the right way


<cfparam name="customer" default="">
<!--- Create it by Ashraf Samuel for the testing department Autoliv Auburn Hills, MI

      Database associate it withe this is Test_info table SQL
 --->
<cfparam name="SESSION.auth.userID" default="1">
<cfquery name="UserInfo" datasource="testrequest">
SELECT userID, user_name, Phone_No FROM dbo.Requester_info WHERE userID = #SESSION.auth.userID#

</cfquery>
<cfquery name="customerinfo" datasource="testrequest">
SELECT custID, customerName FROM dbo.customerInfo
</cfquery>
<html>
<head>
<title>Test Information Page</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<!--- <Script Language="javascript" Type = "text/javascript">
      function jump(list) { location.href = list.options[list.selectedIndex].value} ---></Script>
<style type="text/css">
<!--
.test {
      font-family: "Times New Roman", Times, serif;
      font-size: medium;
      font-style: normal;
      line-height: normal;
      font-weight: bold;
      font-variant: normal;
      color: #000066;
}
-->
</style>
</head>
<body>
<cfform action="MembersOnly_action.cfm" method="post" target="blank" name="members">
  <input type="hidden" name="IsValidUser" value="1">
  <table width="753" height="358" border="0" align="center" cellpadding="5" cellspacing="15" bordercolor="#990033" bgcolor="#00FFFF">
    <tr>
      <th colspan="2"> <font size="+1">Test General Information</font> </th>
    </tr>
    <tr>
      <td width="367" class="test"> Today's Date: </td>
      <td width="321"> <cfset today =dateformat(now(),"mm/dd/yyyy")> <cfoutput>
          <cfinput name="today_date" type="text" value="#today#">
        </cfoutput> </td>
    </tr>
    <td class="test"></tr>
    <tr>
      <td class="test"> Requester name: </td>
      <td> <cfoutput>
          <cfinput name="user_name" type="text" value="#session.auth.user_name#" readonly="true" required="no">
        </cfoutput> </td>
    </tr>
    <tr>
      <td height="26" class="test"> Customer name: </td>
      <td> <select name="customer" id="customer">
          <cfoutput query="customerinfo">
            <option value="#customerinfo.custID#">#customerinfo.customerName#</option>
          </cfoutput> </select> <a href="../Work_request/Customer_Info/customerSignIn.cfm">Add
        New Customer</a> </td>
    </tr>
    <tr>
      <td class="test"> Billing Information: </td>
      <td> <select name="billing_info" id="billing_info">
          <option value="Internal">Internal</option>
          <option value="External">External</option>
          <option value="external billable">External Billable</option>
        </select> </td>
    </tr>
    <tr>
      <td class="test"> What type of test you will run?</td>
      <td> <select name="test_type" size="1" id="test_type">
          <option value="members_only.cfm" selected>Choose test type</option>
          <option value="NewHygeWizard.cfm">Hyge- Rigid Sled Buck test </option>
          <option value="newCOPWizard.cfm">Component belt- COP test</option>
          <option value="NewSoftBodyWizard.cfm">Hyge- Soft Body test</option>
          <option value="NewBarrierWizard.cfm">Barrier test</option>
          <option value="NewDropTowerWizard.cfm">Drop Tower</option>
          <option value="NewImpactWizard.cfm">Impact test</option>
          <option value="NewComponentWizard.cfm">LEV_LVC_QA test</option>
          <option value="NewOOPWizard.cfm">OOP test</option>
          <option value="NewSeatBeltWizard.cfm">Seat Belt test</option>
          <option value="NewHygeSideImpact.cfm">Hyge Side Impact</option>
        </select>
        <!--- <input name="Go" type="button" onChange="FormAction(this.value);" value="Go"> --->
      </td>
    </tr>
    <tr>
      <td class="test">How many tests are you looking to run?</td>
      <td><cfinput name="testNo" type="text" id="testNo" size="3" maxlength="3"></td>
    </tr>
    <tr>
      <td class="test"> Archive Life: </td>
      <td><select name="archive" id="archive">
          <option>Choose the Archiving Type</option>
          <option value="Development test 4Yrs">Development test (4 Yrs)</option>
          <option value="DV/PV/Cert (23 Yrs)">DV/PV/Cert (23 Yrs)</option>
        </select> </td>
    </tr>
    <tr>
      <td class="test">What is your Target Test Date after all the parts kitted?</td>
      <td> <cfinput name="target_date"
           type="text"
              maxlength="20" required="no"
               validate="date"> </td>
    </tr>
    <tr>
      <td class="test">What is the Test Objective: </td>
      <td> <textarea name="test_obj" rows="3" wrap="VIRTUAL" id="test_obj"></textarea>
      </td>
    </tr>
    <tr>
      <td colspan="2" align="center" > </tr>
    <tr>
      <td colspan="2"> <div align="center">
          <!--- <input name="GO" type="button" onClick="javascript:jump(document.members.test_type)" value="GO"> --->
          <input name="Submit" type="submit" value="Submit">
          <input name="Cancel" type="reset" value="Cancel">
          <input name="Close Browser" type="button" id="Close Browser" onClick="javescript: window.close()" value="Close Browser">
        </div></td>
    </tr>
  </table>
 
</cfform>
</body>
</html>
0
Comment
Question by:asamuel
[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
  • 4
7 Comments
 
LVL 17

Accepted Solution

by:
anandkp earned 2000 total points
ID: 10789925
u need something like this :

<form name="x" action"sompage.cfm" method="post">
 .
.
.
.

<select onChange="document.x.submit()" name="sel1">
 <option> ....
  ....
</select>

</form>

is this what ur looking for

K'Rgds
Anand
0
 
LVL 17

Expert Comment

by:anandkp
ID: 10789941
<FORM NAME="frm" ACTION "sompage.cfm" METHOD="post">      .
      .
      .
      .
      <SELECT onChange="subMe()" NAME="sel1">
            <OPTION value="url1.cfm">url1</option>....
            <OPTION value="url2.cfm">url2</option>....
            <OPTION value="url3.cfm">url3</option>....
      </SELECT>
</FORM>

<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
<!--
function subMe()
{
      document.frm.action = document.frm.sel1.selectedIndex;
      document.frm.submit();
}
//-->
</SCRIPT>
0
 
LVL 17

Expert Comment

by:anandkp
ID: 10789943
<FORM NAME="frm" ACTION "sompage.cfm" METHOD="post">      .
      .
      .
      .
      <SELECT onChange="subMe()" NAME="sel1">
            <OPTION value="url1.cfm">url1</option>....
            <OPTION value="url2.cfm">url2</option>....
            <OPTION value="url3.cfm">url3</option>....
      </SELECT>
</FORM>

<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
<!--
function subMe()
{
      document.frm.action = document.frm.sel1[document.frm.sel1.selectedIndex].value;
      document.frm.submit();
}
//-->
</SCRIPT>
0
 
LVL 17

Expert Comment

by:anandkp
ID: 10795829
change that to ...

document.frm.action = document.frm.sel1.options[document.frm.sel1.selectedIndex].value;

hth

K'Rgds
Anand
0

Featured Post

Understanding Web Applications

Without even knowing it, most of us are using web applications on a daily basis. Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We often confuse these web applications tools for websites.  So, what is the difference?

Question has a verified solution.

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

A web service (http://en.wikipedia.org/wiki/Web_service) is a software related technology that facilitates machine-to-machine interaction over a network. This article helps beginners in creating and consuming a web service using the ColdFusion Ma…
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

650 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