Solved

Jump menu

Posted on 2004-04-08
7
304 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 500 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Script 12 213
Reverse Proxy Server 6 101
IIS Site Configuration Copy 2 86
How to set up WAMP on a windows 8.1 IIS machine 14 45
Most ColdFusion developers get confused between the CFSet, Duplicate, and Structcopy methods of copying a Structure, especially which one to use when. This Article will explain the differences in the approaches with examples; therefore, after readin…
Article by: kevp75
Hey folks, 'bout time for me to come around with a little tip. Thanks to IIS 7.5 Extensions and Microsoft (well... really Windows 8, and IIS 8 I guess...), we can now prime our Application Pools, when IIS starts. Now, though it would be nice t…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

737 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