DeFacto Posted January 17, 2006 Report Share Posted January 17, 2006 Mani interese vai ir iespejam un ka, klikšķinot uz sānu navigācijas linkiem, ka nepārlādējās visa lapa, bet mainās saturs tikai vidusdaļā... Būtu ļoti pateicīga par palīdzību!!! Link to comment Share on other sites More sharing options...
Vebers Posted January 17, 2006 Report Share Posted January 17, 2006 Ir iespējams. To var panākt ar JavaScript. Topikam neatbilstošā tēmā esi ievitojis topiku! Link to comment Share on other sites More sharing options...
[Ya] Posted January 17, 2006 Report Share Posted January 17, 2006 tas smird peec ajax Link to comment Share on other sites More sharing options...
v3rb0 Posted January 17, 2006 Report Share Posted January 17, 2006 ajax vai frames/iframe, vai, ja texti ir pāris tikai teikumi, tad ielādē visus textus uzriez un spēlējies ar js un display:none. Link to comment Share on other sites More sharing options...
DeFacto Posted January 17, 2006 Author Report Share Posted January 17, 2006 ir iespējams ar PHP atradu jau tādu skriptu, ka ļauj klikšķinot uz kreisās malas navigācijas linkiem mainīt tekstu vidusdaļā, bet tagad vēl viena problēma: man ir linki arī augšpusē, kreisajā pusē ir tikai 2. līmeņa linki, kā klikšķinot uz augšējiem linkiem panākt, ka parādās atbilstošie 2. līmeņa linki, nepārlādējot visu lapu, bet tikai kreiso malu? Link to comment Share on other sites More sharing options...
SkyD Posted January 17, 2006 Report Share Posted January 17, 2006 <a href="?kategorija=1">Sadaļa 1</a> [2liimenja navigaacijas skripts] <? $kat = $_GET['kategorija']; switch($kat) { case '1': echo '<a href="?kategorija=1&kovajag=1">Sadaljas 1 otraa liimenja links</a>'; echo 'utt'; break; } ?> Nu nez vai attieciigi, bet mosh der.. :D Link to comment Share on other sites More sharing options...
Paulinjsh Posted January 17, 2006 Report Share Posted January 17, 2006 Nepārlādējot tikai vai nu Ajax vai savādāk ar javascriptiem. Link to comment Share on other sites More sharing options...
php_Stopp Posted January 17, 2006 Report Share Posted January 17, 2006 pieņemu, ka tu esi atradis kādu koda gabalu ar frames Link to comment Share on other sites More sharing options...
DarkSide Posted January 24, 2006 Report Share Posted January 24, 2006 Varu tikai pievienoties paareejiem. PHP ir riiks, kas izpildaas servera galaa. Liidz ar to sho var panaakt tikai kaadaa no sekojoshiem veidiem: 1) Lietot frames vai iframes vai vairaakus logus, ko vizuaali var noformeet kaa vienu. 2) Lietot JavaScript klienta galaa un style = display:none vai tamliidziigi. Respektiivi PHP sagatavo visu iespeejamo (pilnu) weblapu, no kuras redzama ir tikai dalja, un attieciigi sagatavo arii JavaScript, kas operee jau klienta daljaa un nodroshina to kas ir un kas nav redzams. Shis variants ir stipri leendarbiigaaks nekaa iepriesheejais. 3) Veel ir variants, ka nevis paarlaadee tikai dalju, bet paarlaadee visu weblapu, ko var uztaisiit sameeraa smuki ar include vai require atbilstoshaas vietaas... Arii leenaaks nekaa frames, bet visdroshaakais veids. Link to comment Share on other sites More sharing options...
ok1 Posted May 19, 2006 Report Share Posted May 19, 2006 Atvainojiet, ka neizmantoju paste.php.lv . Nav laika.... Šo to pameklēju un atradu. Izskatās pēc AJAX... bet ko lai dara? Tas laikam ir tas kabākais.... 1. Skripts kurš izmanto <div></div> : JS : <script type="text/javascript"> /*********************************************** * Dynamic Ajax Content- © Dynamic Drive DHTML code library (www.dynamicdrive.com) * This notice MUST stay intact for legal use * Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code ***********************************************/ var bustcachevar=1 //bust potential caching of external pages after initial request? (1=yes, 0=no) var loadedobjects="" var rootdomain="http://"+window.location.hostname function ajaxpage(url, containerid){ var page_request = false if (window.XMLHttpRequest) // if Mozilla, Safari etc page_request = new XMLHttpRequest() else if (window.ActiveXObject){ // if IE try { page_request = new ActiveXObject("Msxml2.XMLHTTP") } catch (e){ try{ page_request = new ActiveXObject("Microsoft.XMLHTTP") } catch (e){} } } else return false page_request.onreadystatechange=function(){ loadpage(page_request, containerid) } if (bustcachevar) //if bust caching of external page var bustcacheparameter=(url.indexOf("?")!=-1)? "&"+new Date().getTime() : "?"+new Date().getTime() page_request.open('GET', url+bustcacheparameter, true) page_request.send(null) } function loadpage(page_request, containerid){ if (page_request.readyState == 4 && (page_request.status==200 || window.location.href.indexOf("http")==-1)) document.getElementById(containerid).innerHTML=page_request.responseText } function loadobjs(){ if (!document.getElementById) return for (i=0; i<arguments.length; i++){ var file=arguments[i] var fileref="" if (loadedobjects.indexOf(file)==-1){ //Check to see if this object has not already been added to page before proceeding if (file.indexOf(".js")!=-1){ //If object is a js file fileref=document.createElement('script') fileref.setAttribute("type","text/javascript"); fileref.setAttribute("src", file); } else if (file.indexOf(".css")!=-1){ //If object is a css file fileref=document.createElement("link") fileref.setAttribute("rel", "stylesheet"); fileref.setAttribute("type", "text/css"); fileref.setAttribute("href", file); } } if (fileref!=""){ document.getElementsByTagName("head").item(0).appendChild(fileref) loadedobjects+=file+" " //Remember this object as being already added to page } } } </script> Hrefi : <a href="java script:ajaxpage('tavs fails.php?Tab=10', 'tavs divs');">Tavs teksts</a> <div id="tavs divs"></div> Link to comment Share on other sites More sharing options...
Recommended Posts