Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Wywolanie funkcji javascript
mk83
post
Post #1





Grupa: Zarejestrowani
Postów: 72
Pomógł: 0
Dołączył: 17.02.2005

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


Mam funkcje w java script:

  1. <?php
  2.  
  3. printf(&#092;"<script language=\"JavaScript\">\");
  4. printf(&#092;"function a(numer)  \");
  5. printf(&#092;"{  \");
  6. printf(&#092;"window.open(\"show.php?id=numer\",\"ble\",'toolbar=no , scrollbars=yes, resizable=no, height=300, width=600');\");
  7. printf(&#092;"} \");
  8. printf(&#092;"</script>\");
  9.  
  10. ?>


Chce ja wywolac z php z jakims parametrem.

  1. <?php
  2.  
  3. printf(&#092;"<tr ><td ><a href=\"javascript:a($numer)\">[Czytaj więcej]</a></td></tr>\");
  4.  
  5. ?>


Czy jest to wogole mozliwe (IMG:http://forum.php.pl/style_emoticons/default/questionmark.gif) Bo podany powyzej sposob wywolania oczywiscie nie zadzialal.

Ten post edytował mk83 6.04.2005, 15:31:32
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 2)
nospor
post
Post #2





Grupa: Moderatorzy
Postów: 36 557
Pomógł: 6315
Dołączył: 27.12.2004




to jest możliwe, ale masz napewno jeden blad. Na inne nie mam czasu szukać.

Powinno być
  1. <?php
  2.  
  3. //....
  4. printf(&#092;"window.open(\"show.php?id=\"+numer,\"ble\",'toolbar=no , scrollbars=yes, resizable=no, height=300, width=600');\");
  5. //....
  6.  
  7. ?>

Widzi różnicę?
Go to the top of the page
+Quote Post
mk83
post
Post #3





Grupa: Zarejestrowani
Postów: 72
Pomógł: 0
Dołączył: 17.02.2005

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


No tak, nie wiem jak moglem taka gafe strzelic (IMG:http://forum.php.pl/style_emoticons/default/smile.gif) . Dzieki za pomoc.
Go to the top of the page
+Quote Post

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: 24.08.2025 - 13:39