method write help me please

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top