Xeef
07-23-2005, 10:08 PM
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<HTML>
<HEAD>
<SCRIPT>
var frameSrc = '';
frameSrc += '<HTML><BODY>';
frameSrc += '<BUTTON ONCLICK="THISISWHATINEED()">';
frameSrc += 'button<\/BUTTON>';
frameSrc += '<\/BODY><\/HTML>';
var iframeWin, iframeElement;
function init () {
iframeWin = window.frames.anIframe;
iframeWin.document.open();
iframeWin.document.write(frameSrc);
iframeWin.document.close();
iframeElement =
document.getElementById ?
document.getElementById('anIframe') :
document.all['anIframe'];
}
function THISISWHATINEED(){
alert("!");
}
</SCRIPT>
</HEAD>
<BODY ONLOAD="init();">
<input type="submit" name="Submit" value="Submit" onClick="THISISWHATINEED()">
<IFRAME ID="anIframe" NAME="anIframe" SRC="about:blank" WIDTH="100">
</IFRAME>
</BODY>
</HTML>
is there a way to get this to work ?
both buttons shoud triger the alert !
thanks for your time ;)
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<HTML>
<HEAD>
<SCRIPT>
var frameSrc = '';
frameSrc += '<HTML><BODY>';
frameSrc += '<BUTTON ONCLICK="THISISWHATINEED()">';
frameSrc += 'button<\/BUTTON>';
frameSrc += '<\/BODY><\/HTML>';
var iframeWin, iframeElement;
function init () {
iframeWin = window.frames.anIframe;
iframeWin.document.open();
iframeWin.document.write(frameSrc);
iframeWin.document.close();
iframeElement =
document.getElementById ?
document.getElementById('anIframe') :
document.all['anIframe'];
}
function THISISWHATINEED(){
alert("!");
}
</SCRIPT>
</HEAD>
<BODY ONLOAD="init();">
<input type="submit" name="Submit" value="Submit" onClick="THISISWHATINEED()">
<IFRAME ID="anIframe" NAME="anIframe" SRC="about:blank" WIDTH="100">
</IFRAME>
</BODY>
</HTML>
is there a way to get this to work ?
both buttons shoud triger the alert !
thanks for your time ;)