![]() |
|
|
|||||||
![]() |
|
|
Thread Tools | Rate Thread |
|
|
PM User | #1 |
|
New to the CF scene Join Date: Mar 2004
Location: Jax Beach, FL
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
![]() |
Help with a java script
Hi Everybody I'm New Here
I've been working on one of those rotor scripts and it works but I'm Having trouble with one part: <script language="JavaScript"> <!-- document.write ("<a href=?action=report&url='+parent.main.location.href+' target=_blank ><FONT face=Arial Black color=000000 >[Report Abuse]</FONT></a>") document.write ("spacers") document.write ("<a href='+parent.main.location.href+' target=_blank><FONT face=Arial Black color=000000 >[Open in a new window]</FONT></a>") // --> </script> This +parent.main.location.href+ is suppose to write the url of the site in the main frame but it doesn't could any body help me
Last edited by oletom; 03-09-2004 at 05:44 AM.. |
|
|
|
|
|
PM User | #2 |
|
Master Coder ![]() ![]() Join Date: Jun 2002
Location: Los Angeles, CA Original Location: Philippines
Posts: 9,877
Thanks: 0
Thanked 58 Times in 57 Posts
![]() |
Welcome to CF!
document.write ('<a href="?action=report&url='+parent.main.location.href+'" target="_blank" >...');
It is recommended that you use double quotes in the html attribute values and do away with <font> tags. Use CSS to put style in your document.
__________________
Glenn ___________ Add JavaScript SameGame on Facebook and MySpace Add JavaScript Tower of Hanoi game on Facebook and MySpace Last edited by glenngv; 03-09-2004 at 05:48 AM.. |
|
|
|
|
|
PM User | #3 |
|
New to the CF scene Join Date: Mar 2004
Location: Jax Beach, FL
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
![]() |
Thanks for the help I've been pulling my hair out "What I have left of it anyway"
<script language="JavaScript"> <!-- document.write ('<a href="?action=report&url='+parent.main.location.href+'" target="_blank" ><FONT face=Arial Black color=000000 >[Report Abuse]</FONT></a>') document.write ('spacers') document.write ('<a href="+parent.main.location.href+" target=_blank><FONT face=Arial Black color=000000 >[Open in a new window]</FONT></a>') // --> </script> I tryed this but when I did you could no longer see [Report Abuse] or [Open in a new window] ?? Also without the font tags <script language="JavaScript"> <!-- document.write ('<a href="?action=report&url='+parent.main.location.href+'" target="_blank" >[Report Abuse]</a>') document.write ('spacers') document.write ('<a href="+parent.main.location.href+" target=_blank>[Open in a new window]</a>') and you still can't see [Report Abuse] or [Open in a new window] // --> </script> Last edited by oletom; 03-09-2004 at 06:29 AM.. |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Rate This Thread | |
|
|