A
Anonymous
Guest
Hi there brothers
I have a java script code that will do this but I wonder if theres a way to do this with php since php doesnt show the code in the source.
This works like a charm, does php have any way to target objects and setVariables?
also mabe if some one could teach me how to call java script from php
This works like a charm, does php have any way to target objects and setVariables?
Code:
<script language="JavaScript" type="text/JavaScript">
window.document.mp3player.SetVariable("mp3url", '/items/<?php echo $row_0["itemType"]; ?>/audio/<?php echo $row_0["itemId"]; ?>.mp3');
</script>
Code:
<script language="JavaScript" type="text/JavaScript">
function doPassVar(args) {
var mp3 = args.value;
window.document.mp3player.SetVariable("mp3url", mp3);
}
</script>
<?php
if(mp3 == true){
calljs(doPassVar("'/items/" . $row_0["itemType"] . "/audio/" . $row_0["itemId"] . ".mp3'"));
}
?>