V
Vincy
Hi, I have the follow problem:
a windows is divided on two frames: frame1 and frame2.
on frame 2 there is a buttom it runs a function 'SendMsg' that write (by
operator 'write' of javascript) a string with
link (this link should show a alert message) on frame1.
follow the javascript code:
frame1 = empty.
frame2 function SendMsg() in the <head>:
<script language="JavaScript">
function SendMsg {
var a=t1;
top.bodym.document.write('<html><head><title>PROVA</title><meta
http-equiv="Content-Type" content="text/html; charset=iso-8859-1">');
top.bodym.document.write('</head><body bgcolor="#FFFFFF">');
top.bodym.document.write('<font face="Verdana" size="2" color="#FF0011"><a
href="javascript:window.alert()">P R O V A</a></font>');
top.bodym.document.write('</body></html>');
}
</script>
it is ran by buttom whit operator: onClik....
But It doesn't work.
if i put <a href="javascript:void()"> instead of <a
href="javascript:window.alert()"> in to fuction it works.
Why doesn't it work with <a href="javascript:window.alert()"> ?
Thanks
a windows is divided on two frames: frame1 and frame2.
on frame 2 there is a buttom it runs a function 'SendMsg' that write (by
operator 'write' of javascript) a string with
link (this link should show a alert message) on frame1.
follow the javascript code:
frame1 = empty.
frame2 function SendMsg() in the <head>:
<script language="JavaScript">
function SendMsg {
var a=t1;
top.bodym.document.write('<html><head><title>PROVA</title><meta
http-equiv="Content-Type" content="text/html; charset=iso-8859-1">');
top.bodym.document.write('</head><body bgcolor="#FFFFFF">');
top.bodym.document.write('<font face="Verdana" size="2" color="#FF0011"><a
href="javascript:window.alert()">P R O V A</a></font>');
top.bodym.document.write('</body></html>');
}
</script>
it is ran by buttom whit operator: onClik....
But It doesn't work.
if i put <a href="javascript:void()"> instead of <a
href="javascript:window.alert()"> in to fuction it works.
Why doesn't it work with <a href="javascript:window.alert()"> ?
Thanks