thehog
05-03-2005, 05:35 PM
I know that the IFrame element does not have an onClick event handler. However, I need to execute a history.go(-1) when the user clicks somewhere in the iframe in the following example:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="style.css" type="text/css">
<script language="JavaScript">
function init() {
/* load content in the iframe */
document['frame'].location.href="<%= sFileName %>";
/* How do I set the onclick handler for the content in the iframe? */
...
}
</script>
</head>
<body onLoad="javascript:init()">
<iframe name="frame" width="100%" height="100%" scrolling="no" frameborder="no" marginwidth="0" marginheight="0">
</body>
</html>
Thanks,
-- theHog
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="style.css" type="text/css">
<script language="JavaScript">
function init() {
/* load content in the iframe */
document['frame'].location.href="<%= sFileName %>";
/* How do I set the onclick handler for the content in the iframe? */
...
}
</script>
</head>
<body onLoad="javascript:init()">
<iframe name="frame" width="100%" height="100%" scrolling="no" frameborder="no" marginwidth="0" marginheight="0">
</body>
</html>
Thanks,
-- theHog