Maxxis
Новичок
всем привет !
Кто-то может подсказать что я неправильно делаю?
Заранее спасибо ;-)
Кто-то может подсказать что я неправильно делаю?
Заранее спасибо ;-)
PHP:
<script type="text/javascript" src="jquery/jquery.js"></script>
<script type="text/javascript" src="models.js"></script>
<style>
body{
font-family:tahoma;font-size:13px;
}
.button {
border: 1px solid #BEBEBE;
color: #666;
cursor: pointer;
font-size: 10px;
font-weight: bold;
height: 20px;
margin-left: 55px;
padding: 1px 5px 3px;
text-align: center;
vertical-align: top;
}
</style>
<title></title>
<body>
<form id="af"name="af">
<TABLE style="font-size:13px">
<TR><TD><select class="mark"name="mark" id="mark" onchange="ChangeMake(this);" style="width:130px" >
<option label="" value="" >Марка</option>
<option label="AC" value="AC">AC</option>
<option label="Acura" value="Acura">Acura</option>
<option label="Alfa Romeo" value="Alfa Romeo">Alfa Romeo</option>
<option label="ARO" value="ARO">ARO</option>
<option label="Asia" value="Asia">Asia</option>
<option label="Audi" value="Audi">Audi</option>
<option label="Austin" value="Austin">Austin</option>
<option label="Avia" value="Avia">Avia</option>
<option label="Barkas" value="Barkas">Barkas</option>
<option label="BAW" value="BAW">BAW</option>
<option label="BMW" value="BMW">BMW</option>
<option label="Bugatti" value="Bugatti">Bugatti</option>
<option label="Buick" value="Buick">Buick</option>
<option label="BYD" value="BYD">BYD</option>
<option label="Cadillac" value="Cadillac">Cadillac</option>
<option label="Changan" value="Changan">Changan</option>
<option label="Chery" value="Chery">Chery</option>
<option label="Chevrolet" value="Chevrolet">Chevrolet</option>
<option label="Chrysler" value="Chrysler">Chrysler</option>
<option label="Citroen" value="Citroen">Citroen</option>
<option label="Dacia" value="Dacia">Dacia</option>
<option label="Dadi" value="Dadi">Dadi</option>
<option label="Daewoo" value="Daewoo">Daewoo</option>
<option label="DAF" value="DAF">DAF</option>
<option label="Daihatsu" value="Daihatsu">Daihatsu</option>
<option label="Dodge" value="Dodge">Dodge</option>
<option label="Dong Feng" value="Dong Feng">Dong Feng</option>
<option label="Eagle" value="Eagle">Eagle</option>
<option label="FAW" value="FAW">FAW</option>
<option label="Ferrari" value="Ferrari">Ferrari</option>
<option label="Fiat" value="Fiat">Fiat</option>
<option label="Ford" value="Ford">Ford</option>
<option label="Forland" value="Forland">Forland</option>
<option label="Foton" value="Foton">Foton</option>
<option label="Freightliner" value="Freightliner">Freightliner</option>
<option label="FSO" value="FSO">FSO</option>
<option label="Fuqi" value="Fuqi">Fuqi</option>
<option label="Geely" value="Geely">Geely</option>
<option label="GMC" value="GMC">GMC</option>
<option label="Great Wall" value="Great Wall">Great Wall</option>
<option label="Honda" value="Honda">Honda</option>
<option label="Hummer" value="Hummer">Hummer</option>
<option label="Hyundai" value="Hyundai">Hyundai</option>
<option label="Infiniti" value="Infiniti">Infiniti</option>
<option label="International" value="International">International</option>
<option label="Iran Khodro" value="Iran Khodro">Iran Khodro</option>
<option label="Isuzu" value="Isuzu">Isuzu</option>
<option label="Iveco" value="Iveco">Iveco</option>
<option label="Jaguar" value="Jaguar">Jaguar</option>
<option label="Jeep" value="Jeep">Jeep</option>
<option label="Kassbohrer" value="Kassbohrer">Kassbohrer</option>
<option label="Kawasaki" value="Kawasaki">Kawasaki</option>
<option label="Kenworth" value="Kenworth">Kenworth</option>
<option label="Kia" value="Kia">Kia</option>
<option label="Lamborghini" value="Lamborghini">Lamborghini</option>
<option label="Lancia" value="Lancia">Lancia</option>
<option label="Land Rover" value="Land Rover">Land Rover</option>
<option label="Landmark" value="Landmark">Landmark</option>
<option label="LDV" value="LDV">LDV</option>
<option label="Lexus" value="Lexus">Lexus</option>
<option label="LiAZ" value="LiAZ">LiAZ</option>
<option label="Lincoln" value="Lincoln">Lincoln</option>
<option label="MAN" value="MAN">MAN</option>
<option label="Maserati" value="Maserati">Maserati</option>
<option label="Maybach" value="Maybach">Maybach</option>
<option label="Mazda" value="Mazda">Mazda</option>
<option label="Mercedes-Benz" value="Mercedes-Benz">Mercedes-Benz</option>
<option label="Mercedes-Trucks" value="Mercedes-Trucks">Mercedes-Trucks</option>
<option label="Mercury" value="Mercury">Mercury</option>
<option label="MG" value="MG">MG</option>
<option label="Mini" value="Mini">Mini</option>
<option label="Mitsubishi" value="Mitsubishi">Mitsubishi</option>
<option label="Morris" value="Morris">Morris</option>
<option label="Neoplan" value="Neoplan">Neoplan</option>
<option label="Nissan" value="Nissan">Nissan</option>
<option label="Oldsmobile" value="Oldsmobile">Oldsmobile</option>
<option label="Opel" value="Opel">Opel</option>
<option label="Peugeot" value="Peugeot">Peugeot</option>
<option label="Plymouth" value="Plymouth">Plymouth</option>
<option label="Pontiac" value="Pontiac">Pontiac</option>
<option label="Porsche" value="Porsche">Porsche</option>
<option label="Renault" value="Renault">Renault</option>
<option label="Rolls-Royce" value="Rolls-Royce">Rolls-Royce</option>
<option label="Rover" value="Rover">Rover</option>
<option label="Saab" value="Saab">Saab</option>
<option label="Saturn" value="Saturn">Saturn</option>
<option label="Scania" value="Scania">Scania</option>
<option label="SEAT" value="SEAT">SEAT</option>
<option label="Skoda" value="Skoda">Skoda</option>
<option label="Smart" value="Smart">Smart</option>
<option label="SsangYong" value="SsangYong">SsangYong</option>
<option label="Subaru" value="Subaru">Subaru</option>
<option label="Suzuki" value="Suzuki">Suzuki</option>
<option label="Talbot" value="Talbot">Talbot</option>
<option label="TATA" value="TATA">TATA</option>
<option label="Toyota" value="Toyota">Toyota</option>
<option label="Trabant" value="Trabant">Trabant</option>
<option label="TVR" value="TVR">TVR</option>
<option label="Volkswagen" value="Volkswagen">Volkswagen</option>
<option label="Volvo" value="Volvo">Volvo</option>
<option label="Wartburg" value="Wartburg">Wartburg</option>
<option label="Yamaha" value="Yamaha">Yamaha</option>
<option label="Zhong Xing" value="Zhong Xing">Zhong Xing</option>
<option label="БАЗ" value="БАЗ">БАЗ</option>
<option label="Богдан" value="Богдан">Богдан</option>
<option label="ВАЗ" value="ВАЗ">ВАЗ</option>
<option label="ГАЗ" value="ГАЗ">ГАЗ</option>
<option label="ЕрАЗ" value="ЕрАЗ">ЕрАЗ</option>
<option label="Жук" value="Жук">Жук</option>
<option label="ЗАЗ" value="ЗАЗ">ЗАЗ</option>
<option label="ЗИЛ" value="ЗИЛ">ЗИЛ</option>
<option label="ИЖ" value="ИЖ">ИЖ</option>
<option label="Икарус" value="Икарус">Икарус</option>
<option label="ИФА" value="ИФА">ИФА</option>
<option label="Інше" value="Інше">Другое</option>
<option label="КАВЗ" value="КАВЗ">КАВЗ</option>
<option label="КамАЗ" value="КамАЗ">КамАЗ</option>
<option label="Комбайн" value="Комбайн">Комбайн</option>
<option label="КрАЗ" value="КрАЗ">КрАЗ</option>
<option label="ЛАЗ" value="ЛАЗ">ЛАЗ</option>
<option label="ЛуАЗ" value="ЛуАЗ">ЛуАЗ</option>
<option label="МАЗ" value="МАЗ">МАЗ</option>
<option label="Москвич" value="Москвич">Москвич</option>
<option label="Мотоциклы" value="Мотоциклы">Мотоциклы</option>
<option label="НефАЗ" value="НефАЗ">НефАЗ</option>
<option label="ПАЗ" value="ПАЗ">ПАЗ</option>
<option label="Прицеп" value="Прицеп">Прицеп</option>
<option label="РАФ" value="РАФ">РАФ</option>
<option label="Спецтехника" value="Спецтехника">Спецтехника</option>
<option label="Трактор" value="Трактор">Трактор</option>
<option label="УАЗ" value="УАЗ">УАЗ</option>
<option label="Урал" value="Урал">Урал</option>
<option label="ХАЗ" value="ХАЗ">ХАЗ</option>
<option label="Эксклюзив" value="Эксклюзив">Эксклюзив</option>
</select><br>
<TD><select name="model" id="model" style="width:130px">
<option selected="selected" value="">Модель</option>
</select></td>
<td><input name="year" type="year" value="" style="width:51px;" maxlength="4"></td>
<td><input type="submit" value="поиск" class="button"></td></tr></table><td><a href="nreview.html" rel="superbox[ajax][nreview.html]">Добавить отзыв</a></td>
</form>
<div id="total_reviews">
</div>
</body>
<script type="text/javascript">
// загрузка сообщений из БД
function show_reviews()
{ var id = $("#id").val();
$.ajax({
url: "review_show.php",
data: "id="+id,
success: function(html){
$("#total_reviews").html(html);
}
});
}
// вот эта часть не работает --> $(document).ready(function()
{
show_reviews();
$("#af").submit(function(){
var mark = $("#mark").val();
var model = $("#model").val();
var year = $("#year").val();
$.ajax({
type: "GET",
url: "review_show.php",
data: "mark="+mark+"&model="+model+"&year="+year+"&action=add",
success: function(){
show_reviews();
}
});
});
});
</script>