Solved

Populating A Div based on Combobox

Posted on 2013-05-12
4
298 Views
Last Modified: 2013-05-13
I am trying to populate a div "BigPlace" based on  a selection of a combo box.
This is the page...
http://www.menuhead.com/feedslide.php

This is the Javascript
$(document).ready(function()
            {
            $("#Alpha").change(function()
            {
            var Alpha = $(this).val();
            $.ajax({
            type: "POST",	
            url: "place_search.php",
            data: {"Alpha": Alpha},
            cache: false,
            success: function (html) {
            $("#BigName").html("");
			$("#BigPlace").html(html);
			}
            });
            });
			}); 

Open in new window


This is the place_search.php
<div id="BigPlace">
<?php
include('config.php');
$Alpha=$_POST['Alpha']= mysql_real_escape_string($_POST['Alpha']);
?>
		<tr>
		<td width="81" colspan="1" rowspan="3" bgcolor="#FFFFFF">&nbsp;</td>
		<td width="123" rowspan="3" align="left" valign="top" bgcolor="#FFFFFF">
		<?php switch ($Alpha)
					{
					case "1":
						$Alpha_str = print ("<IMG SRC =http://www.menuhead.com/Images/Ratings/APlus.jpg>");
						break;
					case "2":
						$Alpha_str = print ("<IMG SRC =http://www.menuhead.com/Images/Ratings/A.jpg>");
						break;
		 			case "3":
						$Alpha_str = print ("<IMG SRC =http://www.menuhead.com/Images/Ratings/AMinus.jpg>");
						break;
					case "4":
						$Alpha_str = print ("<IMG SRC =http://www.menuhead.com/Images/Ratings/BPlus.jpg>");
						break;
					case "5":
						$Alpha_str = print ("<IMG SRC =http://www.menuhead.com/Images/Ratings/B.jpg>");
						break;		
					}
					?></td>
        <tr>
          <td bgcolor="#FFFFFF">&nbsp;</td>
        </tr>		
	</table>
		
</div>

Open in new window

0
Comment
Question by:DS928
[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
  • 2
  • 2
4 Comments
 
LVL 58

Expert Comment

by:Gary
ID: 39159853
Cannot see any combobox.
I'm not sure what your problem is? What is supposed to be happening?
0
 

Author Comment

by:DS928
ID: 39159899
The slider with the green squares is the select box, when you click on either one ir the ither then the content un the div below should change
0
 
LVL 58

Accepted Solution

by:
Gary earned 500 total points
ID: 39159904
"NetworkError: 404 Not Found - http://www.menuhead.com/place_search.php"
0
 

Author Comment

by:DS928
ID: 39159926
Could very well be it.  Will check in about three hours when U am back in my computer.  Thank you
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this. Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it i…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
The viewer will learn how to count occurrences of each item in an array.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

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