954,561 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Using javascript in Firefox Vs. Others.

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>\n";
   } 
?>
facarroll
Junior Poster in Training
62 posts since Aug 2010
Reputation Points: 10
Solved Threads: 1
 

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>\n";						} 
?>
facarroll
Junior Poster in Training
62 posts since Aug 2010
Reputation Points: 10
Solved Threads: 1
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You