Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Doczytywanie strony
northwest
post
Post #1





Grupa: Zarejestrowani
Postów: 788
Pomógł: 1
Dołączył: 17.09.2004

Ostrzeżenie: (10%)
X----


Witam,
mam taką stronkę:
  1. <head>
  2. <meta http-equiv=Content-Type content="text/html; charset=ISO-8859-2">
  3. <meta name="robots" content="index, follow" >
  4. <meta http-equiv=Pragma content=no-cache >
  5. <meta http-equiv=Cache-Control content=no-cache >
  6. <link rel="stylesheet" type="text/css" href="custom.css">
  7. <script type="text/javascript" src="tabs.js"></script>
  8. </head>
  9. <div id="demo" class="demolayout">
  10. <ul id="demo-nav" class="demolayout">
  11. <li><a href="#tab1">a</a></li>
  12. <li><a href="#tab2">b</a></li>
  13. <li><a href="#tab3">c</a></li>
  14. <li><a href="#tab4">d</a></li>
  15. <li><a href="#tab5">e</a></li>
  16. <li><a href="#tab6">f</a></li>
  17. <li><a href="#tab7">g</a></li>
  18. </ul>
  19. <div class="tabs-container">
  20. <div class="tab" id="tab1">
  21. <? //test.php"
  22. ?>
  23. </div>
  24. <div class="tab" id="tab2">
  25. blablabla
  26. </div>
  27. <div class="tab" id="tab3">
  28. <? //includec.php"
  29. ?>
  30. </div>
  31. <div class="tab" id="tab4">
  32. blablabla
  33. </div>
  34. <div class="tab" id="tab5">
  35. <? //include"a.php";
  36. ?>
  37. </div>
  38. <div class="tab" id="tab6">
  39. <? //include"c.php";
  40. ?>
  41. </div>
  42. <div class="tab" id="tab7">
  43. blablabla
  44. </div>
  45. </div></div>
  46. <script type="text/javascript">
  47. var tabber1 = new Yetii({
  48. id: 'demo'
  49. });
  50. <?
  51. if ($_GET[id]=="test"){
  52. echo"<script>
  53. tabber1.show(5);
  54. </script>";
  55. } ?>
  56. <?


i chce teraz zrobić coś takiego, ażeby po kliknięciu na daną zakładkę te podstrony (php) się odczytywały
w locie, a nie tak jak jest teraz że wszystko jest wczytywane od razu... Wiecie może jak to zrobić??

Stronka aktualnie znajduje się tutaj: http://trif.superhost.pl/tabs/

powycinałem zbędny kod, żeby było łatwiej coś zrobić (IMG:http://forum.php.pl/style_emoticons/default/winksmiley.jpg)


Z góry dzięki za pomoc,
pozdrawiam Northwest

Ten post edytował northwest 9.01.2008, 12:01:17
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
northwest
post
Post #2





Grupa: Zarejestrowani
Postów: 788
Pomógł: 1
Dołączył: 17.09.2004

Ostrzeżenie: (10%)
X----


jest prawie super (IMG:http://forum.php.pl/style_emoticons/default/smile.gif)
zrobiłem coś takiego: http://trif.superhost.pl/tabs/
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
  2. <html lang="en">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  5. <meta http-equiv="Content-Style-Type" content="text/css">
  6. <meta http-equiv="Content-Script-Type" content="text/javascript">
  7. <title>jQuery UI Tabs / Tabs 3</title>
  8. <link rel="stylesheet" href="ui.tabs.css" type="text/css" media="print, projection, screen">
  9. <style type="text/css" media="screen, projection">
  10. /* Not required for Tabs, just to make this demo look better... */
  11. body, h1, h2 {
  12. font-family: "Trebuchet MS", Trebuchet, Verdana, Helvetica, Arial, sans-serif;
  13. }
  14. h1 {
  15. margin: 1em 0 1.5em;
  16. font-size: 18px;
  17. }
  18. h2 {
  19. margin: 2em 0 1.5em;
  20. font-size: 16px;
  21. }
  22. p {
  23. margin: 0;
  24. }
  25. pre, pre+p, p+p {
  26. margin: 1em 0 0;
  27. }
  28. code {
  29. font-family: "Courier New", Courier, monospace;
  30. }
  31. </style>
  32.  
  33. <script src="jquery-1.2.1.pack.js" type="text/javascript"></script>
  34. <script src="ui.tabs.js" type="text/javascript"></script>
  35. <script type="text/javascript">
  36. $(function() {
  37. $('#container-8 ul').tabs({ cache: false });
  38. $('<p><a href="#">Click third tab<\/a><\/p>').prependTo('#fragment-12').find('a').click(function() {
  39. $('#container-8 ul').tabsClick(3);
  40. return false;
  41. });
  42. });
  43. </script>
  44. </head>
  45. <body>
  46.  
  47. <h2>Ajax tabs</h2>
  48.  
  49. <div id="container-8">
  50.  
  51. <ul>
  52. <li><a href="ahah_1.html" title="Tab one"><span>One</span></a></li>
  53. <li><a href="ahah_2.html" title="Tab two"><span>Two</span></a></li>
  54. <li><a href="ahah_3.html"><span>Three</span></a></li>
  55. </ul>
  56. <div id="fragment-12">
  57.  
  58. <pre><code>$('#container').tabsClick(3); // simulate click on 3rd tab
  59. </code></pre>
  60.  
  61. </div>
  62. </body>
  63. </html>

teraz do pełni szczęścia brakuje mi tylko czegoś, to na podstawie np. zmiennej "id"
spowoduje przy wczytywaniu strony od razu zaznaczenie zakładki 3... Wiesz może jak to
zrobić??

Dzięki WIELKIE za pomoc:)

Ten post edytował northwest 9.01.2008, 12:50:11
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 15.10.2025 - 00:10