Jump to content

[RESOLVED] Affiliate Bug Maybe


Recommended Posts

I am adding the following into the affiliate links:

 

<div align="left">
<script type="text/javascript">
function SelectAll(id)
{
	document.getElementById(id).focus();
	document.getElementById(id).select();
}
</script>

<strong>Banner Size:</strong> 120 x 60
<br /><br />
<a href="[AffiliateLinkCode]"><img src="http://www.mysite.com/banners/120x60.gif" alt="mysite.com" border="0" /></a>
<br /><br />
<strong>Source Code - Copy and Paste Into Your Website:</strong>
<br /><br />
<textarea id="120x60" cols="125" rows="2" onClick="SelectAll('120x60');"><(a href="[AffiliateLinkCode]")><(img src="http://www.mysite.com/banners/120x60.gif" border="0" alt="mysite.com" /)><(/a)></textarea>
<br /><br />
<strong>Banner Size:</strong> 80 x 15
<br /><br />
<a href="[AffiliateLinkCode]"><img src="http://www. mysite.com/banners/80x15.gif" alt="mysite.com" border="0" /></a>
<br /><br />
<strong>Source Code - Copy and Paste Into Your Website:</strong>
<br /><br />
<textarea id="80x15" cols="125" rows="2" onClick="SelectAll('80x15');"><(a href="[AffiliateLinkCode]")><(img src="http://www. mysite.com/banners/80x15.gif" border="0" alt="mysite.com" /)><(/a)></textarea>
</div>

 

After it re-saves, it is fine on the user end, but when you look back in the admin are code, it turns into:

 

<div align="left">
<script type="text/javascript">
function SelectAll(id)
{
	document.getElementById(id).focus();
	document.getElementById(id).select();
}
</script>

<strong>Banner Size:</strong> 120 x 60
<br /><br />
<a href="[AffiliateLinkCode]"><img src="http://www.mysite.com/banners/120x60.gif" alt="mysite.com" border="0" /></a>
<br /><br />
<strong>Source Code - Copy and Paste Into Your Website:</strong>
<br /><br />
<textarea id="120x60" cols="125" rows="2" onClick="SelectAll('120x60');"><(a href="[AffiliateLinkCode]")><(img src="http://www.mysite.com/banners/120x60.gif" border="0" alt="mysite.com" /)><(/a)>

 

Any ideas?

Link to comment
Share on other sites

You notice that it cut off at the closing </textarea>

 

<textarea>...</textarea> tags cannot be used within a textarea

 

try it like this

<div align="left">
   <script type="text/javascript">
   function SelectAll(id)
   {
       document.getElementById(id).focus();
       document.getElementById(id).select();
   }
   </script>

   <strong>Banner Size:</strong> 120 x 60
   <br /><br />
   <a href="[AffiliateLinkCode]"><img src="http://www.mysite.com/banners/120x60.gif" alt="mysite.com" border="0" /></a>
   <br /><br />
   <strong>Source Code - Copy and Paste Into Your Website:</strong>
   <br /><br />
   [b]<[/b]textarea id="120x60" cols="125" rows="2" onClick="SelectAll('120x60');" [b]>[/b]<(a href="[AffiliateLinkCode]")><(img src="http://www.mysite.com/banners/120x60.gif" border="0" alt="mysite.com" /)><(/a)>[b]<[/b]/textarea [b]>[/b]
   <br /><br />
   <strong>Banner Size:</strong> 80 x 15
   <br /><br />
   <a href="[AffiliateLinkCode]"><img src="http://www. mysite.com/banners/80x15.gif" alt="mysite.com" border="0" /></a>
   <br /><br />
   <strong>Source Code - Copy and Paste Into Your Website:</strong>
   <br /><br />
   [b]<[/b]textarea id="80x15" cols="125" rows="2" onClick="SelectAll('80x15');" [b]>[/b]<(a href="[AffiliateLinkCode]")><(img src="http://www. mysite.com/banners/80x15.gif" border="0" alt="mysite.com" /)><(/a)>[b]<[/b]/textarea [b]>[/b]
</div>

 

You will notice that when you save it the < and > will change to the normal < and >

Edited by sparky
Link to comment
Share on other sites

Hi, I couldn't resist... here's a fix for you and anyone else that needs it.

Also the highlight text java function works in both IE and FF

Obvoiusly change the links to your own. (don't forget to make them https)

<div align="center">
<script type="text/javascript">
function doSelectAll(d) { 
   var textC=document.getElementById(d);
if (document.selection)
{
//Portion for IE
var div = document.body.createTextRange();
div.moveToElementText(textC);
div.select();
}
else
{
//Portion for FF
var div = document.createRange();
div.setStartBefore(textC);
div.setEndAfter(textC);
window.getSelection().addRange(div);

} 
}
</script>
   <div style="border:1px solid #ccc;padding:10px;">
   <div style="text-align:left;"><strong>Banner Size:</strong> 120 x 37</div>
   <br />
   <a href="[AffiliateLinkCode]"><img src="https://tshosting.com.au/images/logo.png" style="height:37px;width:120px;" alt="tshosting.com.au" border="0" /></a>
   <br /><br />
   <strong>Source Code - Copy and Paste Into Your Website:</strong>
   <div style="width:90%;height:40px;background-color:#fff;color:#000;border:2px solid #ccc;padding:3px;text-align:left;" id="120x37" onclick="doSelectAll('120x37');" ><(a href="[AffiliateLinkCode]")><(img src="http://tshosting.com.au/images/logo.png" style="height:37px;width:120px;"  border="0" alt="tshosting.com.au" /)><(/a)></div>
   </div><br /><br /> <div style="border:1px solid #ccc;padding:10px;">
   <div style="text-align:left;"><strong>Banner Size:</strong> 195 x 60</div>
   <br />
   <a href="[AffiliateLinkCode]"><img src="https://tshosting.com.au/images/logo.png" style="height:60px;width:195px;" alt="tshosting.com.au" border="0" /></a>
   <br /><br />
   <strong>Source Code - Copy and Paste Into Your Website:</strong>
   <div style="width:90%;height:40px;background-color:#fff;color:#000;border:2px solid #ccc;padding:3px;text-align:left;" id="195x60" onclick="doSelectAll('195x60');" ><(a href="[AffiliateLinkCode]")><(img src="https://tshosting.com.au/images/logo.png" style="height:60px;width:195px;" border="0" alt="tshosting.com.au" /)><(/a)></div>
</div></div>

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated