Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2009
    Location
    Bedford, England
    Posts
    966
    Plugin Contributions
    0

    Default Need Help Escaping Quotations

    OK been on this all afternoon and there comes a time when I have to accept that Ive been beat!

    I hope someone can help me, I need to add a rel tag to a href in the following code:


    $script_link = '<script language="javascript" type="text/javascript"><!--' . "\n" . 'document.write(\'' . ($flag_display_large ? '<a href="javascriptopupWindow(\\\'' . $large_link . '\\\')">' . $thumb_slashes . '</a>' : $thumb_slashes) . '\');' . "\n" . '//--></script>';


    essentially it needs to be:
    rel="$thumb_slashes"

    I have tried all manor of combinations of escaping and nothing seems to be working

    for example:

    $script_link = '<script language="javascript" type="text/javascript"><!--' . "\n" . 'document.write(\'' . ($flag_display_large ? '<a href="javascriptopupWindow(\\\'' . $large_link . '\\\')" rel=\"' . $thumb_slashes . '>' . $thumb_slashes . '</a>' : $thumb_slashes) . '\');' . "\n" . '//--></script>';

    Hoping someone with bit more of a code head can provide me the solution.

    Thanks.

    Phil
    Phil Rogers
    A problem shared is a problem solved.

  2. #2
    Join Date
    Aug 2009
    Location
    Bedford, England
    Posts
    966
    Plugin Contributions
    0

    Default Re: Need Help Escaping Quotations

    Quote Originally Posted by philip937 View Post
    OK been on this all afternoon and there comes a time when I have to accept that Ive been beat!

    I hope someone can help me, I need to add a rel tag to a href in the following code:


    $script_link = '<script language="javascript" type="text/javascript"><!--' . "\n" . 'document.write(\'' . ($flag_display_large ? '<a href="javascriptopupWindow(\\\'' . $large_link . '\\\')">' . $thumb_slashes . '</a>' : $thumb_slashes) . '\');' . "\n" . '//--></script>';


    essentially it needs to be:
    rel="$thumb_slashes"

    I have tried all manor of combinations of escaping and nothing seems to be working

    for example:

    $script_link = '<script language="javascript" type="text/javascript"><!--' . "\n" . 'document.write(\'' . ($flag_display_large ? '<a href="javascriptopupWindow(\\\'' . $large_link . '\\\')" rel=\"' . $thumb_slashes . '>' . $thumb_slashes . '</a>' : $thumb_slashes) . '\');' . "\n" . '//--></script>';

    Hoping someone with bit more of a code head can provide me the solution.

    Thanks.

    Phil
    incase you wondered the man with his tongue out is actially where there is a : and p next to eachother..
    Phil Rogers
    A problem shared is a problem solved.

  3. #3
    Join Date
    Mar 2008
    Location
    Cape Town & London (depends on the season)
    Posts
    2,975
    Plugin Contributions
    0

    Default Re: Need Help Escaping Quotations

    You should not be adding rel tags inside the body tag.

    What are you trying to achieve? There are other ways to invoke JS in zencart.

  4. #4
    Join Date
    Aug 2009
    Location
    Bedford, England
    Posts
    966
    Plugin Contributions
    0

    Default Re: Need Help Escaping Quotations

    I happen to disagree with you.
    http://www.w3schools.com/TAGS/att_a_rel.asp

    It's required for scripts that deal with large image on hover.

    I'd appreciate direction as per my original question someone please.

 

 

Similar Threads

  1. Preventing contents of sidebox from "escaping" in Internet Explorer
    By mewell in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 12 Apr 2010, 05:11 PM
  2. Pictures escaping manufactures sidebox big time
    By jvanree in forum Basic Configuration
    Replies: 1
    Last Post: 19 Feb 2009, 07:20 AM
  3. Producing Quotations
    By daveydimwit in forum General Questions
    Replies: 1
    Last Post: 19 Nov 2008, 11:56 PM
  4. ezPages & Escaping
    By utoxin in forum Bug Reports
    Replies: 0
    Last Post: 13 Oct 2006, 09:16 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