Removing Http:// Prefix From Asp Loaded Url
My page here has advertisers' URLs listed in full, but I'm not sure how to remove the http:// prefix. Here's the Code: <% if instr('abc'&rsAdvert('WebAddress'),'http:')>
Solution 1:
Have you tried
var url = "your url";
url = url.replace("http://", "");
Solution 2:
You need to change this bit of your code:
<ahref="url">text</a>
^^^^
You link looks like this:
<a
onclick="pageTracker._trackPageview('/TOP_FULL_ADVERT_WEBSITE/<%=shttp%><%=rsAdvert("WebAddress")%>');"
href='<%=shttp%><%=rsAdvert("WebAddress")%>'
target='_blank'
rel='nofollow'>
<%=rsAdvert("WebAddress")%>
</a>
so you need to chnage the bit just before the </a>
, specifically this bit at the end
><%=rsAdvert("WebAddress")%></a>
^^^^^^^^^^^^^^^^^^^^^^^^^^^
to some variable which does not include the http://
this might work, not sure of classic asp syntax
><%=rsAdvert("WebAddress").replace("http://", "")%></a>
Post a Comment for "Removing Http:// Prefix From Asp Loaded Url"