Hey, I'm sorry to bump this old thread, but this is the only thread I've found in hours of searching that has actually given me the answers I've needed, but when I run my code (I'll link it below) the output that I get is <?php echo $a ?> and then <?php echo $c ?> in another alert window... I'm extremely miffed why this is happening.. Here's muh code :
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<?php
$a = 'Fatber Christmas';
$b = '27 Sunshine Street /n America';
$c = nl2br($b);
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="description" content="Kenneth So - Automotive and Nightclub Photography">
<meta name="keywords" content="automotive photography, car photography, nightclub photography, rave photography, club photography, edm photography, car pictures, car images, automotive, cars, nightclub, rave, edm, photographs, digital photography">
<meta name="abstract" content="Kenneth So - Automotive and night club photography.">
<meta name="robots" content="index,follow">
<meta name="resource-type" content="document">
<meta name="revisit-after" content="5 days">
<title>Kenneth So Photography</title>
<link rel="stylesheet" href="kennethsostylesheet.css" type="text/css">
<link rel="shortcut icon" href="Photos/favicon.png" type="image/png">
<script type="text/javascript">
function test(a,b) {
alert(a);
alert(b);
}
</script>
<script type="text/javascript" src="picScript.js"></script>
</head>
<body>
<a onClick="test('<?php echo $a ?>', '<?php echo $c ?>');">LINK</a>
<div id="headerBar">
<div id="logo">
<a href="javascript:void(0)" ><img src="Photos/FinalizedLogo.png" alt="logo" height="100px" width="400px" onclick="setNum(1)"></a>
</div>
<div id="titleBar">
<p>
<a href="javascript:void(0)" onclick="setNum(1)">Home</a> |
<a href="javascript:void(0)" onclick="setNum(2)">Automotive</a> |
<a href="javascript:void(0)" onclick="setNum(3)">Nightlife</a> |
<a href="/about.html">About Me</a> |
<a href="/contact.html">Contact</a>
</p>
</div>
</div>
<div id="imageBox">
<div id="imageView">
</div>
<div id="imagePreview">
</div>
</div>
</body>
</html>
setNum(); is a function in the picScript.js file. TIA!!! (and sorry for bumping the old thread but it's exactly what I needed)
Bookmarks