Solved

Jump menu

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

Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

Question has a verified solution.

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

Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
When it comes to security, close monitoring is a must. According to WhiteHat Security annual report, a substantial number of all web applications are vulnerable always. Monitis offers a new product - fully-featured Website security monitoring and pr…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

707 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