0

The following script creates a child window check/check.php in Firefox but not in IE or Chrome. I know that I should not be using href = "javascript:void(0);" but I cannot work out a better solution at this stage.

Here is the snippet I'm using. While this code contains PHP I think that I really have a javascript problem.

Any help would be greatly appreciated.

<?php 
     if ("{$row['passState']}" == 0) 
   {
echo "<a href ='javascript:void(0);', NAME = 'var', basestring = 'window'+new Date().getTime();', title = 'Results of quiz' onClick = window.open('check/check.php?quizTitle = ".urlencode($quizTitle)."','width = 1100, height = 510, resizable = yes, menubar = no, 0, status = 0, scrollbars = 1');><p>Check your answers</p></a><br />\n";
   } 
?>
1
Contributor
1
Reply
2
Views
5 Years
Discussion Span
Last Post by facarroll
0

Solved like this.

<?php 
     if ("{$row['passState']}" == 0) {
	//'NAME='var......Time(); uses a time calculation to ensure the window name is different each time it is created
	echo "<a NAME='var basestring='window'+new Date().getTime();'title='Results of quiz'href='check/check.php?quizTitle=".urlencode($quizTitle)."','width=1100,height=510,resizable=yes,menubar=no,0,status=0,scrollbars=1');>
<p>Check your answers</p></a><br />\n";						} 
?>

Edited by facarroll: n/a

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.