Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Could someone clean this up for me? Generated coding not working

Status
Not open for further replies.

jeffbouldin

Technical User
Nov 12, 2002
160
0
0
US
Forgive me, I'm signing in under my husbands name because I can't remember my username or password, lol. Anyway, I've signed up at Adify to have ads generated on my blog. Adify provided me with the Javascript needed to insert into my site. But it *will not* work and when I run it through a validator, I get all kind of error messages. I know *nothing* about javascript so I was wondering if any of you might be able to clean up the coding and/or tell me what is wrong. Here is what Adify gave me:

<!-- Begin Adify tag for One Womans Cottage Life ID####### -->
<script type="text/javascript">
<!--
sr_adspace_id = ######;
sr_adspace_width = 120;
sr_adspace_height = 600;
sr_adspace_type = "graphic";
sr_color_back = "#FFFFFF";
sr_color_text = "#000000";
sr_color_url = "#E15F00";
sr_color_title = "#3F66B3";
sr_color_border = "#3366CC";
sr_color_your_ad = "#2852A3";
sr_color_your_adbk = "#FFDD81";
sr_text_your_ad = "Advertise with us";


-->
</script>
<script>
document.write("<scr"+"ipt type='text/javascr"+"ipt' src='"+(location.protocol.indexOf('https')>-1 ? " : " document.write("</scr"+"ipt>");
</script>
<script type="text/javascript">srExecute();</script>
<!-- End Adify tag for One Womans Cottage Life ID#575507 -->


Thank you in advance for all your help!

~Kim
 
Yes..I have:) I sent them the original coding that they gave me and they sent me back what I just posted above. They kind of seem to be stumped, but are still working on it.
 
Have you viewed the page with Firefox? That is an excellent browser for Javascript troubleshooting, and will usually point out the exact character on the exact line where the error occurs.

Lee
 
Hmm, well here are two errors that Mozilla found. It doesn't mean too much to me, but here they are none-the-less.

Error: missing ) after argument list
Line: 3672, Column: 30
Source Code:
document.write("<scr )>-1 ? " : " + IPT SRC=""+(location.protocol.indexOf(" https type="text/javascr"+"ipt">");
---------------------------------------

Error: srExecute is not defined
Line: 3675
 
The first error message means that your opening and closing parentheses are not equal in number. You have one more opening parenthesis than closing one. I see that the text shown in that document.write is not at all the same as in your original post.

The second error message means that you have no function named srExectute available.

Lee
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top