[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

07/20/2007 at 10:31AM PDT, ID: 22710239
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.6

Form onchange performs two different functions depending on selection from drop down menu

Asked by mrslate1 in JavaScript

Tags: onchange, javascript, two, form, functions

Hello,
I am using a Form drop down select onchange event to show/hide elements on a page. The problem is one of the select choices should go to a page instead of show/hide. How do I add this functionality in the same form. That is, have two seperate functions depending on the selection chosen?

Here is the code I am using currently:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
      <title>FETCH ADMIN</title>
      <link href="css/merch_report.css" rel="stylesheet" type="text/css">
      
      <script language="JavaScript">
var actDiv;
var actDiv2;
function chklayer(v) {
  if (actDiv) {
    actDiv.style.display="none";
  }
  if(v>0){
    actDiv = document.getElementById("Layer"+v);
    actDiv.style.display="block";
  }
}
</script>

</head>

<body bgcolor="#FFFFFF" leftmargin="30" topmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0">


      <!-- Master Table Beginning -->
      
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
      <td width="100%" valign="top">      
<!-- Content Area -->
      <table cellspacing="2" cellpadding="2" border="0">
<tr>
      <td>Select an option and content will appear      </td>
</tr>

<tr><form>
      <td> <select name="type" onchange="chklayer(this.value);">
      <option value="0">Select Option:</option>
      <option value="1">Select 1 shows content on existing page</option>
      <option value="2">Select 2 shows content on existing page</option>
        <option value="3">Select 3 shows content on existing page</option>
       <option value="4">Select 4 should opent new location in existing window</option>
    </select></td></forrm>
</tr>

</table>
      
         <!-- Conetent show hide 1-->
      <div style="position:absolute; left:60px; top:75px; width:455px; height:131px; z-index:1;">
  <div id="Layer1" style="display:none;">
  Content 1
  </div>
 
 
   <!-- Show Hide content 2 -->  
  <div id="Layer2" style="display:none;">
   Content 2
   </div>
   
   
   


<!-- Show Hide content 2 -->  
  <div id="Layer3" style="display:none;">
   Content 3
   </div>


<!-- Report Usage -->
<div id="Layer4" style="display:none;">
 I want this menu selection to change page location
</div>
 



      
      
      </td>
</tr>
</table>
      <!-- Content Area End -->
</body>
</html>

Again I want selection 4 to launch a new page in existing browser window. I do know how to do a JavaScript jump menu, but not if there is already an onchange event specified
[+][-]07/20/07 10:33 AM, ID: 19533253

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/20/07 12:59 PM, ID: 19534660

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: JavaScript
Tags: onchange, javascript, two, form, functions
Sign Up Now!
Solution Provided By: cap2501
Participating Experts: 2
Solution Grade: A
 
 
[+][-]07/20/07 10:43 PM, ID: 19537320

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07/22/07 06:42 PM, ID: 19544497

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-91