467,877 Members | 1,257 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,877 developers. It's quick & easy.

document,write opens a new window instead!

Hi,
I have a page with this frameset:

<frameset cols="185,800*" frameborder="YES" border="2"
framespacing="2" rows="*" bordercolor="#FF0000">
<frame name="leftFrame" noresize src="SpagnoloLeftFrame.html">
<frame name="mainFrame" src="SpagnoloIntro.html">

in SpagnoloIntro.html I have put this javascript code (in the body):

<h5>
<center>
<script language="Javascript">
name = 'xxxx';
domain = 'mysite.com;
nuovo=document.open();
nuovo.document.write('<a href="MailTo:' + name + '@' + domain
+ '">' + name + '@' + domain +'</a>');
nuovo.document.close();
</script>
</center></h5>

'cos I don't want spammers to get my e-mail address.
The problem is, when I click on a link in the "leftFrame" frame, a new
window is open with the content of the link, instead of going to
target="mainFrame".

If I do not put the javascript code, the rightFrame gets the content
of the leftFrame link, exactly as I wish.

Could you please tell me why? I really can't come to a solution which
is driving me crazy.

Thanks!
John.
Jul 23 '05 #1
  • viewed: 1910
Share:
2 Replies
Lee
PhoneLover said:

Hi,
I have a page with this frameset:

<frameset cols="185,800*" frameborder="YES" border="2"
framespacing="2" rows="*" bordercolor="#FF0000">
<frame name="leftFrame" noresize src="SpagnoloLeftFrame.html">
<frame name="mainFrame" src="SpagnoloIntro.html">

in SpagnoloIntro.html I have put this javascript code (in the body):

<h5>
<center>
<script language="Javascript">
name = 'xxxx';
domain = 'mysite.com;
nuovo=document.open();
nuovo.document.write('<a href="MailTo:' + name + '@' + domain
+ '">' + name + '@' + domain +'</a>');
nuovo.document.close();
</script>
</center></h5>

'cos I don't want spammers to get my e-mail address.
The problem is, when I click on a link in the "leftFrame" frame, a new
window is open with the content of the link, instead of going to
target="mainFrame".

If I do not put the javascript code, the rightFrame gets the content
of the leftFrame link, exactly as I wish.

Could you please tell me why? I really can't come to a solution which
is driving me crazy.


Your variable named "name" is changing the name of that frame.
Use a different name than "name".

Jul 23 '05 #2
Lee <RE**************@cox.net> wrote in message
Your variable named "name" is changing the name of that frame.
Use a different name than "name".


Shheezzz, how the hell did you see this?!
I have changed "name" into "nome" (in italian) and now everything works perfectly.

Great job indeed! Would have NEVER seen this. Thank you very much!
Ciao!
Jul 23 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

9 posts views Thread by James Marshall | last post: by
2 posts views Thread by Brett Baisley | last post: by
4 posts views Thread by Bernard | last post: by
2 posts views Thread by Bruce | last post: by
7 posts views Thread by Remi Bastide | last post: by
136 posts views Thread by Matt Kruse | last post: by
reply views Thread by MrMoon | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.