Thanks but the error tell me the line number which is ..
<a href="javascript: poponload('http://www.google.com')" class="linkw">Application</a>
With single quotes is correct syntax. Are you using server-side code to build that HTML line? If so, then the problem is in the server-side which you are not showing. If not, then post a link to the full live page so I can try it out for myself.
<?php
session_start();
?>
<HTML>
<head>
<title>me</title>
<style type="text/css">
.linkw{color:#FFFFF;}
</style>
</head>
<SCRIPT language="JavaScript1.2">
function poponload(url)
{
var testwindow= window.open ('', "mywindow","location=no,status=0,scrollbars=0,menubar=0,resizable=0,toolbar=0,directories=0,width=750,height=550");
testwindow.moveTo(25,40);
}
</SCRIPT>
<body style="background: #39275B;
background-attachment: fixed;
background-repeat: no-repeat;
background-position: center;
link="white" vlink="red" alink="white"">
<?php
// check session variable
if (isset($_SESSION['valid_user']))
{
echo '<tr align="center" bgcolor="#39275B"><td colspan="3">';
echo '<a href="javascript: poponload(want to add url here)" class="linkw">Application</a>';
echo '</td></tr>';
echo '<tr align="center" bgcolor="#39275B"><td colspan="3">';
echo '<a href="javascript: poponload(2nd url here)" class="linkw">Application</a>';
echo '</td></tr>';
echo '<tr align="center" bgcolor="#39275B"><td colspan="3">';
echo '<a href="javascript: poponload(3rd url here)" class="linkw">Application</a>';
echo '</td></tr>';
echo '<tr align="center" bgcolor="#39275B"><td colspan="3">';
echo '<a href="javascript: poponload(4th url here)" class="linkw">Application</a>';
echo '</td></tr>';
}
else
{
echo '<p>You are not logged in.</p>';
echo '<p>Only logged in members may view information on this page.</p>';
echo '<a href="login_me.php" class="linkw">Back to main page please</a>';
}
?>
</body>
</html>
Right now there is no url inside poponload()......and the code give a blank popup window. But when i add the url with single quotes poponload('/secure/me/me.pdf') or poponload(http://www.google.com) i receive a syntax error on this line stating that a "," or a ";" is missing
No, the generated HTML *before* you click the link.
I just created an html file (omitted the php file) with just the javascript function above and the issue still exist. i really dont think it has anything to do with the php coding because im still unable to insert a link and get the website. All your help is very appreciated. If i may ask you to create an html file with that javascript function and attempt to insert a link in the body of the file where u are calling the function and see if that website is executed. thanks again
Bookmarks