Jump to content

php image & javascript issue


javasac

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.