Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2005
    Posts
    64
    Plugin Contributions
    1

    Problem adding javascript to custom sidebox

    I'm trying to add the code for a customer support script to a custom sidebox. But I'm getting an error beacuse the ' symbols are not being parsed properly. Can someone tell me a way to add this script to a custom sidebox?

    <SCRIPT LANGUAGE="JavaScript">
    <!-- Hide from old browsers
    function newscreen4() {
    window.open("","talk","width=300,height=350,resizable=no,scrollbars=auto")
    }
    // Stop hiding from old browsers -->
    Stamp = new Date();
    year = Stamp.getYear();
    document.write('<A HREF="http://zero.get1on1.com/cmct/caller/start?clientid=7225" TARGET="talk" onclick="newscreen4()"><img src="http://zero.get1on1.com/cmct/operator/icon?clientid=7225&;'+Stamp+'" border=0></a>');
    </SCRIPT>

  2. #2
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: Problem adding javascript to custom sidebox

    I haven't reviewed your code in detail.
    Just noting that usually you just need to replace all the ' marks in the javascript with \'
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Dec 2005
    Posts
    64
    Plugin Contributions
    1

    Default Re: Problem adding javascript to custom sidebox

    Thanks. I should have worked that one out myself.

 

 

Similar Threads

  1. Adding JavaScript to Blank Sidebox module
    By commdiver in forum Addon Sideboxes
    Replies: 19
    Last Post: 16 May 2014, 10:59 PM
  2. Adding Custom Pages in Information Sidebox
    By warsaw in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 24 Sep 2010, 05:56 PM
  3. Adding a URL to Custom Sidebox Headings
    By limelites in forum Addon Sideboxes
    Replies: 5
    Last Post: 5 Apr 2009, 12:58 PM
  4. Adding Custom Javascript to head and body
    By Xena in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 19 Jun 2007, 04:30 AM
  5. Testimonials Sidebox problem with custom stylesheet
    By cshart in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 17 Mar 2007, 12:12 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg