Click to See Complete Forum and Search --> : Web newsletter problem


Flying Snowman
04-11-2008, 08:09 PM
This post has been moved from "Javascript" Hope some help is here.

#1 Today, 04:57 PM
Flying Snowman
Registered User Join Date: Apr 2008
Posts: 3

error in web newsletter

--------------------------------------------------------------------------------

The following is taken from an email newsletter (Properties - Message Source). Some of the links to news articles fail. I beleive it is because the 3rd line below "<base href="http://www.azfamily.com" /> doesn't get pre-appended to the links to the article later in the script, ie, "<p><a href=/perl/common/apredir.pl?SECTION=HEALTHRAW&link=http://hosted.ap.org/dynamic/stories/R/RADIATION_DRUG?>Drug experiment blocks radiation damage</a></p>"

Can anyone see what might cause this would happen? Is there a way for me to forward this complete email ?


html><body>

<base href="http://www.azfamily.com" />
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

<link href="http://www.azfamily.com/listserv/css/newsletter.css" rel="stylesheet" type="text/css" media="all" />
</head>


<body>
<!-----------------------start header----------------------->


<table width="750" border="0" cellspacing="0" cellpadding="0">
<tr><td height="1" bgcolor="#999999"></td></tr>
<tr>
<td bgcolor="#999999">


<table width="748" border="0" cellspacing="0" cellpadding="0" align="center">

<tr>
<td height="83" background="http://www.azfamily.com/sharedcontent/newsletters/templates/images/az_header_bkg.jpg" bgcolor="#000000">
<table width="746" border="0" cellspacing="0" cellpadding="0">

<tr>
<td width="301"><img src="http://www.azfamily.com/sharedcontent/newsletters/templates/images/az_header_graphic.jpg" width="301" height="83" />
</td>
<td width="445" align="center"><strong><font color="#FFFFFF" size="5" face="Arial, Helvetica, sans-serif">Health News</font></strong></td>
</tr>
</table>
</td>

</tr>
<tr>
<td bgcolor="#FFFFFF">


<!--Unhide for LeaderTop Sponsorship -->
<!--<table width="748" border="0" cellspacing="0" cellpadding="5" align="center">
<tr>
<td valign="top" bgcolor="#FFFFFF" align="center">
Leader Top Goes Here</td>
</tr>
</table>
<table width="748" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#999999" height="1"></td>
</tr>
</table> -->

<!--End Unhide for LeaderTop Sponsorship -->




<!-- tracking pixel --><a href="http://ads.belointeractive.com/RealMedia/ads/click_lx.ads/www.azfamily.com/newsletters/health/100000007/ClearPix/Default/AzfNewsltr-health/1234567899">

<img src="http://ads.belointeractive.com/RealMedia/ads/adstream_nx.ads/www.azfamily.com/newsletters/health/100000007@ClearPix" border=0 width=1 height=1 alt="">



</a>



</td>
</tr>

</table>
<!-----------------------end header----------------------->




<!-----------------------start content----------------------->
<table width="748" border="0" cellspacing="0" cellpadding="10" align="center">

<tr>
<td valign="top" bgcolor="#FFFFFF">



<!--start content -->

<table border="0" width="100%">

<tr><td colspan="3">
<a class="bilabel" href="http://www.azfamily.com/health/" target="_blank">Making Headlines Today</a>

<div class="biposter1">

<h2><a href="http://www.azfamily.com/health/news/stories/phoenix_local_health_20080410_phatcamp.4b2e10cc.html">
<script language="Javascript">
<!--
expnew("04/11/2008")
//-->
</script>
Phat Kids Camp</a></h2><p>“I used to be an overweight child,” said personal trainer Cindy Feltman. “I used to be over 200 pounds, and I used to work out five hours a day trying to lose weight. And I didn't know how to eat.”</p><a class="bistorylink" href="http://www.azfamily.com/health/news/stories/phoenix_local_health_20080410_phatcamp.4b2e10cc.html">Full story...</a>


</div>

<div class="binoarrownoborder">
<div class="biblockheads">
<p>
Tune in to 3TV today to catch all of today's top news.
</p>
</div>
</div>
</td>
</tr>

<tr>
<td colspan="3" class="bitablespacer_horiz"></td>
</tr>

<tr>
<td>
<a class="bilabel" href="http://www.azfamily.com/health/" target="_blank">Health News</a>
<div class="biblockheads">
<p><a href=/perl/common/apredir.pl?SECTION=HEALTHRAW&link=http://hosted.ap.org/dynamic/stories/R/RADIATION_DRUG?>Drug experiment blocks radiation damage</a></p>

<p><a href=/perl/common/apredir.pl?SECTION=HEALTHRAW&link=http://hosted.ap.org/dynamic/stories/F/FOOD_POISONING?>No surge of food-borne illness in 2007</a></p>

<p><a href=/perl/common/apredir.pl?SECTION=HEALTHRAW&link=http://hosted.ap.org/dynamic/stories/M/MUMPS_VACCINE?>Mumps shots didn't fully protect in 2006</a></p>

<p><a href=/perl/common/apredir.pl?SECTION=HEALTHRAW&link=http://hosted.ap.org/dynamic/stories/C/CLIMATE_HEALTH?>Climate change brings health risks</a></p>

<p><a href=/perl/common/apredir.pl?SECTION=HEALTHRAW&link=http://hosted.ap.org/dynamic/stories/S/SIX_KIDNEYS?>6 kidneys transplanted at once in Md.</a></p>


</div>
</td>




</tr>

<tr>
<td colspan="3" class="bitablespacer_horiz"></td>
</tr>

<tr><td colspan="3">
<a class="bilabel" href="http://www.azfamily.com/" target="_blank">More on azfamily.com</a>
<div class="binoarrownoborder">
<div class="biblockheads">
<p align="center"><a href="http://www.azfamily.com/news/" target="_blank"><b>News</b></a> | <a href="http://www.azfamily.com/sports/" target="_blank"><b>Sports</b></a> | <a href="http://www.azfamily.com/weather/" target="_blank"><b>Weather</b></a> | <a href="http://www.azfamily.com/entertain/" target="_blank"><b>Entertainment</b></a> | <a href="http://www.azfamily.com/health/" target="_blank"><b>Health</b></a> | <a href="http://customwire.ap.org/dynamic/fronts/BUSINESS?SITE=KTVK&TEMPLATE=BUSINESS.html" target="_blank"><b>Business</b></a> |
<a href="http://www.azfamily.com/newsletters/" target="_blank"><b>Newsletters</b></a> | <a href="http://www.azfamily.com/hotlines/" target="_blank"><b>3TV Hotlines</b></a> | <a href="http://www.azfamily.com/ontv/" target="_blank"><b>On TV</b></a></p>
</div>
</div>
</td>
</tr>



</table>


<!--end content -->


</td>
<!--td for skyscraper --><!--<td width="180">Skyscraper Goes Here</td> -->
</tr>
</table>






<tr><td height="1" bgcolor="#999999"></td></tr>
</td>
</tr>
</table>


<!-----------------------end content----------------------->

</body>
</html>



<IMG ALT="" SRC="http://mailer1.belointeractive.com/db/52622/196159/1.gif" WIDTH=1 HEIGHT=1><BR>
<p><!-----------------------start footer----------------------->
<table cellspacing="0" cellpadding="0" width="748" border="0"><tbody><tr><td style="BORDER-RIGHT: #b6b4a6 1px solid; BORDER-TOP: #b6b4a6 1px solid; BORDER-LEFT: #b6b4a6 1px solid; BORDER-BOTTOM: #b6b4a6 1px solid" bgcolor="#e5e5e5"><table cellspacing="0" cellpadding="5" width="730" align="center" border="0"><tbody><tr><td><table cellspacing="0" cellpadding="0" width="548" align="center" border="0"><tbody></tbody>
</table>
</td>
</tr>
<tr><td><div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" color="#333333" size="1">
<p>If you received this email from a friend and would like to subscribe to this and other newsletters, please <a href="/newsletters">click here</a>
.</p>
<p> You are subscribed to this newsletter as: b.snow2@verizon.net <a href="/sharedcontent/registration/changeemail.jsp">Click here</a>
to update your email address.</p>
</font>
</div>


Flying Snowman
View Public Profile
Send a private message to Flying Snowman
Find all posts by Flying Snowman
Add Flying Snowman to Your Buddy List

#2 Today, 05:21 PM
paziek
Registered User Join Date: Apr 2008
Posts: 17

And what does this have to do with JavaScipt?


paziek
View Public Profile
Send a private message to paziek
Find all posts by paziek
Add paziek to Your Buddy List

#3 Today, 05:43 PM
Flying Snowman
Registered User Join Date: Apr 2008
Posts: 3

Sorry if I am in the wrong place. Please tell me the correct place to post this request for help.


Flying Snowman
View Public Profile
Send a private message to Flying Snowman
Find all posts by Flying Snowman
Add Flying Snowman to Your Buddy List

#4 Today, 07:37 PM
paziek
Registered User Join Date: Apr 2008
Posts: 17

Here is perl section, as your script uses Perl.. and Java?


Good luck.

Nedals
04-14-2008, 02:14 AM
I do not know why you were directed to post this in the Perl section. It really belongs in the HTML section

I have no idea why you are using a base href. You don't need it. Just use relative links. (except those that go to a different site)
If you ever do need to use a base href, it should be placed within the <head> section of your page

The links containing <a href=/perl/common/apredir.pl.... look very suspicious and are most likely wrong.
The perl directory should never appear in a url. It probably means the server is incorrectly structured and is a major security risk.
Of course, I could be wrong. :)

Flying Snowman
04-14-2008, 12:19 PM
Thanks Nedals but the script is not mine.

From prior post in HTML:

Thanks Fang but you misunderstand. I am not the author and have no control of how the scripts are written. These newsletters are sent by AZ Family.com to hundreds if not thousands of readers via email. The script I included here is typical of their dozens of emails to subscribers. I have discussed this with them but I am the only person to complain of this problem. In fact they work fine on an old Win 98 computer so I truly believe it is something in the several computers I have that is causing the problem.

Do you or anyone have a clue as to what could be causing the base href not to be added to the link address or am I not correctly understanding how the script works?

Nedals
04-14-2008, 05:37 PM
If you copy that onto an HTML page, it will display in IE and Firefox.
It is however very badly formed and should be re-written. (but not your problem)

I'll guess that the links that do not work for you are the "..../perl/common/apredir.pl..."
This is because the <base href... is not in the <head> section of the doc
and the doc starts out with <html><body>, which is wrong.

Flying Snowman
04-14-2008, 05:53 PM
Thanks again. The problem I have with going bacj to them is that this same email run on my OLD Win 98II does add the prefix to the link and it finds the web site and displays the story. How do you explain that? If you want I can forward one of the email newsletters to you to try.

Nedals
04-14-2008, 06:32 PM
How do you explain that?
Tell them that newer internet tools are more code-compliant and will not work correctly with non-compliant code.

If you want to get fancy, copy that code, run it though a validator, and sent them the result.

Flying Snowman
04-14-2008, 07:31 PM
Wish I had the means and know how to do that. My computer skills go back to the 70's with Burroughs Teller Terminals even doing some of the programing in assembler. Then Business Basic (Basic Four & BBX). Not gotten involved with HTML. But that certain should give me the ammunition.