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.

     if ("{$row['passState']}" == 0) 
echo "<a href ='javascript:void(0);', NAME = 'var', basestring = 'window'+new Date().getTime();', title = 'Results of quiz' onClick ='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";
Re: Using javascript in Firefox Vs. Others. 80 80

Solved like this.

     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";						} 
Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.