Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Closed TopicStart new topic
> [adres url] plz help!
dziama
post 23.04.2003, 09:53:41
Post #1





Grupa: Zarejestrowani
Postów: 28
Pomógł: 0
Dołączył: 22.04.2003
Skąd: Wawa

Ostrzeżenie: (0%)
-----


witam przegladalem to forum ale nie znalazlem rozwiazania mojego problemu, a mianowicie:
W jaki sposób ukryć/zakodować adres dokumentu, który ma postać:
<a href=index.php?dzial=lole> lole</a>
i w oknie przeglądarki w pasku adresu jest to widoczne.
Czy jest inna metoda oprocz ramek?
Go to the top of the page
+Quote Post
dragossani
post 23.04.2003, 10:03:42
Post #2





Grupa: Przyjaciele php.pl
Postów: 398
Pomógł: 0
Dołączył: --
Skąd: Poznań

Ostrzeżenie: (0%)
-----


Formularz z ukrytymi polami? Trochę uciążliwe ale powinno działać.


--------------------
cease this long, long rest / wake and risk a foul weakness to live / when it all comes down / watch the smoke and bury the past again / sit and think what will come / raise your fears and cast them all away
Go to the top of the page
+Quote Post
dziama
post 23.04.2003, 13:29:51
Post #3





Grupa: Zarejestrowani
Postów: 28
Pomógł: 0
Dołączył: 22.04.2003
Skąd: Wawa

Ostrzeżenie: (0%)
-----


czyli np w menu mam zrobić formularz z polami input type hidden i value taką jaki ma być link i prekazywanie metodą post?
coś takiego??
Go to the top of the page
+Quote Post
dragossani
post 24.04.2003, 16:06:25
Post #4





Grupa: Przyjaciele php.pl
Postów: 398
Pomógł: 0
Dołączył: --
Skąd: Poznań

Ostrzeżenie: (0%)
-----


Zamiast
Kod
<a href=index.php?dzial=lole>lole</a>

zrób
Kod
<form name="Form1" action="index.php" method="post">

  <input type="hidden" name="stala_wartosc" value="wartość">

  <input type="hidden" name="dzial" value="">

</form>

<a href="javascript:document.Form1.dzial.value='lole'; document.Form1.submit();">Lole</a>

Od razu masz przykład jak przekazywać zmienne bezpośrednio ze skryptu, a jak zmienić wartość ukrytego pola w zależności od linku, który klikamy. Niezbyt eleganckie i pewne rozwiązanie - sam go unikam, ale działa.


--------------------
cease this long, long rest / wake and risk a foul weakness to live / when it all comes down / watch the smoke and bury the past again / sit and think what will come / raise your fears and cast them all away
Go to the top of the page
+Quote Post
kwiateek
post 25.04.2003, 12:25:44
Post #5





Grupa: Zarejestrowani
Postów: 223
Pomógł: 0
Dołączył: 13.01.2003
Skąd: 3rd ball of mud behind a big ball of burning gas

Ostrzeżenie: (0%)
-----


Cytat
Kod
<a href="javascript:document.Form1.dzial.value='lole'; document.Form1.submit();">Lole</a>

Ja bym to zrobil bardziej secret'nie:
Kod
<a onclick="javascript:document.Form1.dzial.value='lole'; document.Form1.submit();" href="#">Lole</a>


--------------------
It's Time to Join the PLD Linux Generation!
<? while (!$success) { $try++; } ?>
Go to the top of the page
+Quote Post

Closed TopicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 20.04.2024 - 03:40