Jump to content

Aviway

Members
  • Posts

    37
  • Joined

  • Last visited

Everything posted by Aviway

  1. Sorry about the spam, but can someone help me?
  2. I'm sorry' but can you explain to me with code, becouse I dont know how to do it!
  3. function change_city(area_id){document.getElementById('city_loader').style.display='block';var xmlhttp; if (window.XMLHttpRequest){ // code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest();}else{ // code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");}xmlhttp.onreadystatechange = function(){ if (xmlhttp.readyState==4 && xmlhttp.status==200) { var result = xmlhttp.responseText; if (result) document.getElementById('city_loader').style.display='none'; document.getElementById('error_log').innerHTML='PROBLAM!'; }}xmlhttp.open("GET","pages/update/change_city_by_area.php?area_id="+encodeURIComponent(area_id),true);xmlhttp.send(null);} This is the function that call with "onclick" event. My problam is how to include the array that I'm returned from "change_city_by_area.php", inside the other SELECT TAG(city). I use this ajax code for a lot of things but i never used it to get response with array.
  4. Hello,I need help writing a code in AJAX. I have a form where you had to choose an area in the country,and after selecting the regionin the country,another SELECT tag will only see the cities that are in the selected area.The PHP\HTML code: <select id="area" name="area"><?phpforeach ($get_all_area as $key => $val){ echo '<option onclick="change_city('.$val['area_id'].')" value="'.$val['area_id'].'">'.$val['area_name'].'</option>';}?></select> ]<select id="city" name="city"><!-- All cities are in the selected area --></select>
  5. Thanks man it works great! :good:
  6. First of all, relax. Its look like you are angry.I will explain myself again:I want to write a navigation menu that is built from UL TAG and H TAG inside it.To the main DIV TAG must have a CSS FLOAT command. that is because of all DIV'S are with CSS FLOAT command on my code.It must be on UL TAG because of the LI'S inside it are changing each page by the SQL Query. It says, on one page can have only 5 LI's Tags, and they got enter in one row, and can be another page will be15 LI'S Tags, and they do not enter one row but got a second row, and even third row. Previously noted in the code for just one row. Once it got to the second row,the LI'S tags was not centered like the first row.Now I need a code that will feet to this conditions. Thank you for the Reference.
  7. this code is'nt good for list with a several lines.
  8. Hello,I got stuck again and again the problem that I can not find a solution.I created a navigation bar that build that way: <ul> <li> <a><h3>head name</h3></a> </li></ul> and css code: ul{float:right; width:636px; height:25px;}li{display:inline; padding:0 15px; float:right; height:23px; width:180px; text-align:center;}h3{font-size:15px; font-weight: normal;} The problem is I can not center the list, because the FLOATcommand,and if I remove the FLOAT, H3 tag take control and returns the list to be not on INLINE mode.I'm looking for the code to do that where ever i want, and not to wright it each time from the start. Thanx in advance!!
×
×
  • Create New...