Forum FAQForum FAQSearchSearch MemberlistMemberlist Forum ignore listForum ignore list RegisterRegister ProfileProfile Log in to check your private messagesLog in to check your private messages Log inLog in
kako pozvati js kroz php?

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    mi3dot.org Forum Index -> Server-side
View previous topic :: View next topic  
Author Message
Ghalatea



Joined: 18 Nov 2006
Posts: 3
Location: Zagabria

PostPosted: 09.12.2009 22:56    Post subject: kako pozvati js kroz php? Add user to your forum ignore list Reply with quote

evo kod..zasto ovo nije dobro... kad zakomentiram ovu echo liniju sa javascriptom radi, tj ispisuje nest ili nene. a kad ostavim ovak kak je dole ne radi nista uopce,zasto??


<html>

<?php
$varijabla1 = $_POST['tip_pretrazivanja'];

if($varijabla1=="1")
{
echo "nest";
echo "<script language=JavaScript> alert("pisi nesto"); </ script>";

}
else echo "nene";
?>


</html>
Back to top
View user's profile Send private message MSN Messenger
Ivan Podrug - e1



Joined: 15 Apr 2005
Posts: 316
Location: Solin

PostPosted: 10.12.2009 08:43    Post subject: Add user to your forum ignore list Reply with quote

navodnici.
razbija si kod. stavi u alertu jednostruke pa će radit.

_________________
there R only 10 typs of ppl.
Those who understand binary & those who don't.
Back to top
View user's profile Send private message
F34R



Joined: 08 Mar 2009
Posts: 30
Location: Metković

PostPosted: 10.12.2009 22:30    Post subject: Add user to your forum ignore list Reply with quote

Ne mozes ("pisi nesto");

Prvo, navodnici prekidaju echo naredbu...Drugo, ne treba ti ; iza zagrade.

Dakle, ovo ce radit:
echo "<script type="text/javascript"> alert('pisi nesto') </script>";
Back to top
View user's profile Send private message MSN Messenger
Ivan Podrug - e1



Joined: 15 Apr 2005
Posts: 316
Location: Solin

PostPosted: 10.12.2009 23:28    Post subject: Add user to your forum ignore list Reply with quote

F34R wrote:
Ne mozes ("pisi nesto");

Prvo, navodnici prekidaju echo naredbu...Drugo, ne treba ti ; iza zagrade.

Dakle, ovo ce radit:
echo "<script type="text/javascript"> alert('pisi nesto') </script>";


To neće radit jer si ti stavija text/javascript u dvostruke.

_________________
there R only 10 typs of ppl.
Those who understand binary & those who don't.
Back to top
View user's profile Send private message
F34R



Joined: 08 Mar 2009
Posts: 30
Location: Metković

PostPosted: 11.12.2009 01:59    Post subject: Add user to your forum ignore list Reply with quote

Ivan Podrug - e1 wrote:
F34R wrote:
Ne mozes ("pisi nesto");

Prvo, navodnici prekidaju echo naredbu...Drugo, ne treba ti ; iza zagrade.

Dakle, ovo ce radit:
echo "<script type="text/javascript"> alert('pisi nesto') </script>";


To neće radit jer si ti stavija text/javascript u dvostruke.

Da, to sam refleksno ubacio... Embarassed

Final:
echo "<script type=text/javascript> alert('pisi nesto') </script>";

Very Happy
Back to top
View user's profile Send private message MSN Messenger
sphx



Joined: 02 Jun 2004
Posts: 109
Location: Split

PostPosted: 11.12.2009 16:37    Post subject: Add user to your forum ignore list Reply with quote

Razz

Code:
echo '<script type="text/javascript"> alert(\'pisi nesto\') </script>';
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    mi3dot.org Forum Index -> Server-side All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group