View Single Post
  #1  
Old 08-23-2010, 08:13 AM
 
RStoelting RStoelting is offline
 

Advanced Member
  
Join Date: Jun 2007
Posts: 49
 

Default Problem adding javascript to category description

I want to add a link to a category description that will open a new window with a specific size and at the top right of the users screen. Here is the script:

Code:
<script type="text/javascript"> <!-- function popup(url) { params = 'top=0, left=0'; params += ', resizable=yes'; params += ', width=620'; params += ', height=600'; params += ', scrollbars=1'; params += ', toolbar=yes, menubar=yes'; newwin=window.open(url,'windowname4', params); if (window.focus) {newwin.focus()} return false; } // --> </script>
But when I add this code to the description field for "Modify Category" and save, the entire content of the description field is deleted.

Here is the code that applies the javascript to the link:
Code:
<a href="javascript: void(0)" onclick="popup('URL')">Click here</a>
Before adding the javascript code above, I was able to add this link to the category without losing the description. But of course, without the javascript code, the link did not function.

How can I add this javascript to a category?
__________________
Version 4.6.1 Gold [unix]
Reply With Quote