Monday, 15 July 2013

Php not calling javascript -



Php not calling javascript -

i've been having problem calling javascript form php, nil happens when seek phone call function.

this javascript i'm trying phone call won't work other functions

function rotate() { alert("123"); if (run == true) { switch(current) { case 1: display1(); break; case 2: display2(); break; case 3: display3(); break; case 4: display4(); break; default: display1(); } current++; if (current > 4) { current = 1; } } alert("hello"); settimeout(function () { roate(); }, 1000); }

this php trying phone call javascript doesn't

<?php echo "<script type='text/javascript'>rotate();</script>"; ?>

the php not phone call function set in phone call alert();

you seek phone call function functionname call, functionname rotate.

try:

<?php echo "<script type='text/javascript'>rotate();</script>"; ?>

beside, there typos in script. alret should alert, , roate should rotate

php javascript html

No comments:

Post a Comment