javasac Posted September 8, 2008 Share Posted September 8, 2008 In my test.php file, I cannot run javascript and images do not show up. If I run this file using the URL http://localhost/index/?m=login&name=Sachin I can see 'My name is Sachin'. If I rename this file to test.html and open it, the image shows up and clicking on 'Click Me!' button works fine. Pls uncomment the tag when you run it. ======================================================= <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>SPIDR</title> <script src="javascript/test.js" language="javascript"> </script> <link href="style.css" rel="stylesheet" type="text/css"> </head> <body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> <!-- pls un comment it to test it --> <!----> <p><input type="button" name="TEST" onclick="Hello()" value="Click Me!" /></p> <?php $name = $_GET['name']; echo 'My name is ' . $name; ?> </body> </html> ======================================================= javascript/test.js function Hello() { alert('Hello Ronaldo'); } Link to comment https://forums.phpfreaks.com/topic/123286-php-image-javascript-issue/ Share on other sites More sharing options...
javasac Posted September 8, 2008 Author Share Posted September 8, 2008 I had to comment img tag. Pls uncomment to run it. <!-- pls remove // to test it --> // <img src="images/login.png" width="84" height="24" border="0"> Link to comment https://forums.phpfreaks.com/topic/123286-php-image-javascript-issue/#findComment-636715 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.