All pastes #564628 Raw Edit

Untitled

public text v1 · immutable
·published 2007-06-13 17:51 UTC
rendered paste body
	echo '<li id="moreresults" onclick="window.location=\'/search.php?action=lookup&name='.urlencode($search).'\'">';
	echo '<b>More Results >>></b>';
	echo '</li>';
	echo '<script type="javascript">';
	echo 'moreResLocation = \'/search.php?action=lookup&name='.urlencode($search).'\';';
	echo '
			/* Utility function for search, if event keypress is enter - redirect */

			checkEnter = function()
			{
				alert("In check enter");
				/*
				if (event.keyCode == Event.KEY_ENTER)
				{ 
					window.location= moreResLocation;
				}
				*/
			}
	';
	echo '$(\'moreresults\').observe(\'keypress\', checkEnter)';
	echo '</script>';