Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Old 03-09-2004, 05:40 AM   PM User | #1
oletom
New to the CF scene

 
Join Date: Mar 2004
Location: Jax Beach, FL
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
oletom is an unknown quantity at this point
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..
oletom is offline   Reply With Quote
Old 03-09-2004, 05:46 AM   PM User | #2
glenngv
Master Coder


 
glenngv's Avatar
 
Join Date: Jun 2002
Location: Los Angeles, CA Original Location: Philippines
Posts: 9,877
Thanks: 0
Thanked 58 Times in 57 Posts
glenngv will become famous soon enough
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..
glenngv is offline   Reply With Quote
Old 03-09-2004, 06:20 AM   PM User | #3
oletom
New to the CF scene

 
Join Date: Mar 2004
Location: Jax Beach, FL
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
oletom is an unknown quantity at this point
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..
oletom is offline   Reply With Quote
Old 03-09-2004, 06:36 AM   PM User | #4
glenngv
Master Coder


 
glenngv's Avatar
 
Join Date: Jun 2002
Location: Los Angeles, CA Original Location: Philippines
Posts: 9,877
Thanks: 0
Thanked 58 Times in 57 Posts
glenngv will become famous soon enough
Help yourself by enabling the javascript error notification (IE) or opening the Javascript console (NS).
__________________
Glenn
___________
Add JavaScript SameGame on Facebook and MySpace
Add JavaScript Tower of Hanoi game on Facebook and MySpace
glenngv is offline   Reply With Quote
Old 03-09-2004, 07:36 AM   PM User | #5
oletom
New to the CF scene

 
Join Date: Mar 2004
Location: Jax Beach, FL
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
oletom is an unknown quantity at this point
Quote:
Help yourself by enabling the javascript error notification
Well thanks for trying to help
oletom is offline   Reply With Quote
Old 03-09-2004, 07:50 AM   PM User | #6
glenngv
Master Coder


 
glenngv's Avatar
 
Join Date: Jun 2002
Location: Los Angeles, CA Original Location: Philippines
Posts: 9,877
Thanks: 0
Thanked 58 Times in 57 Posts
glenngv will become famous soon enough
Wouldn't it help you if you can see the error message?
Not only now but in your future programming projects.
__________________
Glenn
___________
Add JavaScript SameGame on Facebook and MySpace
Add JavaScript Tower of Hanoi game on Facebook and MySpace
glenngv is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:37 AM.

Home - Contact Us - Archives - Link to CF - Resources - Top 

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.