Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2008
    Posts
    46
    Plugin Contributions
    0

    Default Cant get mousover to work in custom sidebox

    Help please, site is www.halloweenfunshop.com/index.php (I have a temp site in index.html) and I created my own sidebox named Coupon on the upper left.

    I have the following code in the includes/templates/responsive_apparel_boutique/sideboxes/tpl_coupon_sidebox.php:

    <?php
    $content = '<div>
    <a href="coupon.html"> <img src="images/storecoupon2.jpg" onmouseover="this.src='images/storecouponroll2.jpg'" onmouseout=" this.src='images/storecoupon2.jpg'"></a>
    </div>'
    ?>

    Why doesnt this work? If I remove the mouseover/outs it shows a single image with the link just fine. Im stumped on something really simple.

    Thanks.

  2. #2
    Join Date
    Jan 2004
    Posts
    66,363
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Cant get mousover to work in custom sidebox

    Mismatched quotation marks. You have single-quotes embedded inside another set of single-quotes, and thus they are not taking effect because they're being treated as the end of the string sooner than you intended. If you intend to embed single-quotes inside another set of single-quotes, you'll need to prepend a \ to "escape" them so they're treated as literal characters. This applies in all programming languages.

    example: $var = 'this is a string of text which means I\'ve gotta escape the quotes used inside it';
    ie: if it starts and ends with single-quotes, then escape all single-quotes.
    or, if it starts and ends with double-quotes, then escape all double-quotes.
    .

    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
    Oct 2008
    Posts
    46
    Plugin Contributions
    0

    Default Re: Cant get mousover to work in custom sidebox

    you da man. Thank you, worked perfectly.

 

 

Similar Threads

  1. cant get my custom template to work
    By tuds in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 17 Nov 2007, 07:52 PM
  2. cant get shipping to work!! HELP
    By kitcorsa in forum General Questions
    Replies: 3
    Last Post: 15 Nov 2007, 04:54 PM
  3. cant get banners to work!
    By ryangsoton in forum Basic Configuration
    Replies: 2
    Last Post: 14 Jul 2006, 07:35 PM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR