yeahz Posted October 18, 2010 Report Share Posted October 18, 2010 ir ieslēgta adrese: http://*****/#page=1 kā lai zem "var pager" iegūst to vērtību 1? var pager = <?php echo $_GET['pager']; ?>; ? Quote Link to comment Share on other sites More sharing options...
Леший Posted October 18, 2010 Report Share Posted October 18, 2010 Paprovē location.href.split('#')[1] Quote Link to comment Share on other sites More sharing options...
briedis Posted October 18, 2010 Report Share Posted October 18, 2010 alert(window.location.href.hash); Quote Link to comment Share on other sites More sharing options...
indoom Posted October 18, 2010 Report Share Posted October 18, 2010 var hash = document.location.hash.slice(1); var pager = hash && hash.indexOf('=') !== -1 ? hash.split('=')[1] : 0; Quote Link to comment Share on other sites More sharing options...
codez Posted October 18, 2010 Report Share Posted October 18, 2010 php pusē šo vērtību nevar iegūt, jo browseris serverim šos datus nesūta. Quote Link to comment Share on other sites More sharing options...
foxsk8 Posted October 18, 2010 Report Share Posted October 18, 2010 Var arī izmantot jq url pluginus. Piemēram kaut vai šo: http://ajaxcssblog.com/jquery/url-read-request-variables/ Quote Link to comment Share on other sites More sharing options...
yeahz Posted October 20, 2010 Author Report Share Posted October 20, 2010 hmm, kaut kā neviens no variantiem neder :/ it kā pēdējais variants būtu vislabākais, taču cik noprotu, tad tas grib strādāt tikai tad, ja tiek pārlādēta lapa, man lapas pārlādēšanu nevajag. Piebilde: var būt arī vairāk mainīgie http://******/#type=desc&country=3&pager=1 Quote Link to comment Share on other sites More sharing options...
mefisto Posted October 20, 2010 Report Share Posted October 20, 2010 Varbūt beidzot paskaidro ko tieši tu gribi !? Kāda nozīmē ir tam pager, un kāpēc tur ir vajadzīgs php ? Kas notiek kad tu aizej uz to labu http://whatever/#page=1 ? Quote Link to comment Share on other sites More sharing options...
yeahz Posted October 20, 2010 Author Report Share Posted October 20, 2010 pēc tiem get parametriem gribu sataisīt bilžu galeriju, kura darbojas ar ajax. pager nozīme ir pārslēgt uz nākamo lapu. ja ir ieslēgts #pager=1 tad tiek ieslēgta lapa, kura ir ar noklusējuma parametriem citiem mainīgajiem (jo tie nav pievienoti). katrā ziņā šeit ir galerija, kurai vajadzētu pārslēgties tādā veidā ar lapām, tāpat kā to dara mazā forma virs galerijas. Quote Link to comment Share on other sites More sharing options...
mefisto Posted October 20, 2010 Report Share Posted October 20, 2010 Eh.. kā tu vispār pie projekta ticis esi .. http://innonesen.se/widgets/tabs/ Paķidā šito. Source dabūnama te : http://innonesen.se/widgets/tabs.php Ideja ir +/- tā pati. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.