[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.

Question
[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.0

Refresh page based on selected options without using submit()

Asked by yuhannl in PHP and Databases, JavaScript, Scripting Languages

Tags: refresh, page, php, javascript

I'm currently building a webpage which allows people to enter information as well as selecting categories which the piece of information belongs to.

The category selection is based on 2 select drop down list. First one loads from DB, and after the user selected an option, the 2nd one then gets loaded. However, at this stage I'm only able to achieve this by using onChange="submit();" to get the 2nd list to reload. In the mean time, all information on the rest of the form needs to be retained.

I've copied the code for the 2 drop down lists here:

<select onChange="submit();" name="domain" id="domain" size="1">
<?
      for ($i = 0; $i < count($domain_list1); $i ++) {
            echo "<option value=\"".$domain_list1[$i]['id']."\"";
            if ($_POST['domain'] == $domain_list1[$i]['id']) {
                  echo "SELECTED";
            }
            echo ">";
            echo $domain_list1[$i]['name'];
            echo "</option>";
      }
?>
</select>

<select name="category" size="1" <?
if ($category_list1 == null || count($category_list1) == 0 ) {
      echo "Disabled>";
} else {
      echo ">";
      for ($i = 0; $i < count($category_list1); $i ++) {
            echo "<option value=\"".$category_list1[$i]['id']."\"";
            if ($_POST['category'] == $category_list1[$i]['id']) {
                  echo "SELECTED";
            }
            echo ">";
            echo $category_list1[$i]['name'];
            echo "</option>";
      }                                                                              
}
?>
</select>

What I'm concerned as that because I'm utilising the submit() function to reload the page (and populating 2nd list), it'd be hard to differenciate whether I'm just reloading the list, or whether I'm really submitting the form.

Has anyone got ways to achieve
1. Load the 2nd dropdown list based on first one's selection
2. Still retain the rest of info on the page


I'm using PHP / MYSQL / and some Javascript on the page too.
[+][-]08/12/07 06:11 AM, ID: 19679026Accepted Solution

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

Zones: PHP and Databases, JavaScript, Scripting Languages
Tags: refresh, page, php, javascript
Sign Up Now!
Solution Provided By: bugs
Participating Experts: 4
Solution Grade: B
 
[+][-]08/12/07 07:43 AM, ID: 19679239Assisted Solution

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

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

 
[+][-]08/12/07 10:38 AM, ID: 19679684Assisted Solution

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

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

 
[+][-]08/13/07 04:57 AM, ID: 19683073Assisted Solution

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

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

 
[+][-]09/02/07 07:00 AM, ID: 19817166Author Comment

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.

 
 
Loading Advertisement...
20091021-EE-VQP-81 / EE_QW_2_20070628