![]() |
![]() ![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 215 Pomógł: 0 Dołączył: 12.03.2007 Ostrzeżenie: (0%) ![]() ![]() |
Witam
Jak zrobić tak, że jak kliknę w w jakiś text to z pod niego wyjedzie napis. Takie jakby rozsuwane menu, ale ja chce, żeby to był ajax. Pozdrawiam |
|
|
![]()
Post
#2
|
|
Grupa: Zarejestrowani Postów: 81 Pomógł: 2 Dołączył: 26.10.2005 Ostrzeżenie: (0%) ![]() ![]() |
Polecam lekture. http://www.w3schools.com/ajax/ajax_example_suggest.asp
nie jest dokladnie co potrzebujesz, ale mysle ze dasz rade przerobic pod siebie. Co cie wiecej nauczy. Pozdrawiam PS Tan na kolejnej podstronie masz skrypt php co obsluguje ten przyklad Ten post edytował Mordoran 22.08.2007, 14:51:55 |
|
|
![]()
Post
#3
|
|
Grupa: Zarejestrowani Postów: 215 Pomógł: 0 Dołączył: 12.03.2007 Ostrzeżenie: (0%) ![]() ![]() |
A jak to zmienić ?
|
|
|
![]()
Post
#4
|
|
Grupa: Zarejestrowani Postów: 81 Pomógł: 2 Dołączył: 26.10.2005 Ostrzeżenie: (0%) ![]() ![]() |
Robisz 3 pliki :
1. forum.html 2. forum.js Kod var xmlHttp function showHint(str) { if (str.length==0) { document.getElementById("txtHint").innerHTML=""; return; } xmlHttp=GetXmlHttpObject() if (xmlHttp==null) { alert ("Your browser does not support AJAX!"); return; } var url="forum.php"; url=url+"?q="+str; url=url+"&sid="+Math.random(); xmlHttp.onreadystatechange=stateChanged; xmlHttp.open("GET",url,true); xmlHttp.send(null); } function stateChanged() { if (xmlHttp.readyState==4) { document.getElementById("txtHint").innerHTML=xmlHttp.responseText; } } function GetXmlHttpObject() { var xmlHttp=null; try { // Firefox, Opera 8.0+, Safari xmlHttp=new XMLHttpRequest(); } catch (e) { // Internet Explorer try { xmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { xmlHttp=new ActiveXObject("Microsoft.XMLHTTP"); } } return xmlHttp; } 3. forum.php
I dziala (IMG:http://forum.php.pl/style_emoticons/default/smile.gif) Pozdro, mam nadzieje, ze to jest to o co Ci chodzilo |
|
|
![]() ![]() |
![]() |
Aktualny czas: 23.09.2025 - 15:34 |