Loading ...
Sorry, an error occurred while loading the content.
 

Phantom double-quote (") character appearing in clip output

Expand Messages
  • ritesaid_10
    Take a look at the output from the clip below, the double-quote symbol at the end of the URL should not be there. http://www.google.com . But I can t for
    Message 1 of 4 , Nov 18, 2013

      Take a look at the output from the clip below, the double-quote symbol at the end of the URL should not be there. 'http://www.google.com\'". But I can't for the life of me get rid of it. Nowhere in the clip am I asking for it to be inserted, and the javascript that I am referencing will not run correctly with it there!!!


      Anyone got any ideas? Is this a hidden bug? Or am I missing something?



      Clip code:

      ^!InsertHtml <A style="text-decoration: none" href="javascript:void(0);"^?[(T=C)How will pop-up be activated?==_onMouseover|onClick]="return overlib('<a href=\'^?[Link URL?=http://www.google.com]\'>^?[Link description?]</a>', STICKY, ^?[(T=C)Orientation in relation to mouse pointer?==CENTER|LEFT|_RIGHT], ^?[(T=C)Above or below the link text?==_BELOW|ABOVE]) "onMouseOut="return nd();">^?[Link Text]</A>


      Output:

      <a style="text-decoration: none" href="javascript:void(0);"onmouseover="return overlib('<a href=\'http://www.google.com\'">Try here</a>', STICKY, RIGHT, BELOW) "onMouseOut="return nd();">Where can I find stuff?</a>


      Thanks in advance


      Fred

    • Ian NTnerd
      Fred, I d declare the variables first, just for readability ^!set %activate%=^?[(T=C)How will pop-up be activated?==_onMouseover|onClick] ^!set
      Message 2 of 4 , Nov 18, 2013
        Fred,

        I'd declare the variables first, just for readability
        ^!set %activate%=^?[(T=C)How will pop-up be activated?==_onMouseover|onClick]
        ^!set %google%=^?[Link URL?=http://www.google.com]
        etc.

        I'd take out the style attribute and use a class and css instead.
        I don't use ^!inserthtml, I tend to use ^!appendtofile. Id break it up so it is on different lines with multiple ^!inserthtml for readability.

        The issue at hand:

        onmouseover="return overlib('<a href=\'http://www.google.com\'"
        Is a valid attribute structure.
        onmouseover="javascript_stuff"

        Though the JavaScript seems to be missing a closing ) or is the following stuff part of the JS? I don't speak JS much.

        Try  ^!inserttext to see if the result is different.

        Ian

        On 19/11/2013 5:54 AM, fredmorris66@... wrote:
         

        Take a look at the output from the clip below, the double-quote symbol at the end of the URL should not be there. 'http://www.google.com\'". But I can't for the life of me get rid of it. Nowhere in the clip am I asking for it to be inserted, and the javascript that I am referencing will not run correctly with it there!!!


        Anyone got any ideas? Is this a hidden bug? Or am I missing something?



        Clip code:

        ^!InsertHtml <A style="text-decoration: none" href="javascript:void(0);"^?[(T=C)How will pop-up be activated?==_onMouseover|onClick]="return overlib('<a href=\'^?[Link URL?=http://www.google.com]\'>^?[Link description?]</a>', STICKY, ^?[(T=C)Orientation in relation to mouse pointer?==CENTER|LEFT|_RIGHT], ^?[(T=C)Above or below the link text?==_BELOW|ABOVE]) "onMouseOut="return nd();">^?[Link Text]</A>


        Output:

        <a style="text-decoration: none" href="javascript:void(0);"onmouseover="return overlib('<a href=\'http://www.google.com\'">Try here</a>', STICKY, RIGHT, BELOW) "onMouseOut="return nd();">Where can I find stuff?</a>


        Thanks in advance


        Fred


      • ritesaid_10
        Thanks for the advice Ian, yes I agree, the syntax of the JS does look incorrect but it has to be that way for the script I am referencing to function. I
        Message 3 of 4 , Nov 18, 2013

          Thanks for the advice Ian, yes I agree, the syntax of the JS does look incorrect but it has to be that way for the script I am referencing to function.


          I actually found a solution before I read your post. All I had to do was split the code up a bit and have a couple of ^!InsertHtml lines.


          What the script does is pop up a message when you either hover or click on a hyperlink. The pop-up message has a hyperlink in it also 'http://www.google.com' in this case, or what ever the user enters. The "Where can I find stuff" part is the hyperlink text which activates the pop-up.


          This is the script reference which appears within the <head></head> tags:

          <script type="text/javascript" src="overlib.js"></script>


          This is also required within the <body></body> tags:

          <div id="overDiv" style="position:absolute; visibility:hidden; z-index:1000;"></div>


          I am still a relative newbie to clip code, but I will definitely start making use of variables which would make for much cleaner and easier to debug code.


          Thanks again


          Fred



          ---In ntb-clips@yahoogroups.com, <indiamcq@...> wrote:

          Fred,

          I'd declare the variables first, just for readability
          ^!set %activate%=^?[(T=C)How will pop-up be activated?==_onMouseover|onClick]
          ^!set %google%=^?[Link URL?=http://www.google.com]
          etc.

          I'd take out the style attribute and use a class and css instead.
          I don't use ^!inserthtml, I tend to use ^!appendtofile. Id break it up so it is on different lines with multiple ^!inserthtml for readability.

          The issue at hand:

          onmouseover="return overlib('<a href=\'http://www.google.com\'"
          Is a valid attribute structure.
          onmouseover="javascript_stuff"

          Though the JavaScript seems to be missing a closing ) or is the following stuff part of the JS? I don't speak JS much.

          Try  ^!inserttext to see if the result is different.

          Ian

          On 19/11/2013 5:54 AM, fredmorris66@... wrote:
           

          Take a look at the output from the clip below, the double-quote symbol at the end of the URL should not be there. 'http://www.google.com\'". But I can't for the life of me get rid of it. Nowhere in the clip am I asking for it to be inserted, and the javascript that I am referencing will not run correctly with it there!!!


          Anyone got any ideas? Is this a hidden bug? Or am I missing something?



          Clip code:

          ^!InsertHtml <A style="text-decoration: none" href="javascript:void(0);"^?[(T=C)How will pop-up be activated?==_onMouseover|onClick]="return overlib('<a href=\'^?[Link URL?=http://www.google.com]\'>^?[Link description?]</a>', STICKY, ^?[(T=C)Orientation in relation to mouse pointer?==CENTER|LEFT|_RIGHT], ^?[(T=C)Above or below the link text?==_BELOW|ABOVE]) "onMouseOut="return nd();">^?[Link Text]</A>


          Output:

          <a style="text-decoration: none" href="javascript:void(0);"onmouseover="return overlib('<a href=\'http://www.google.com\'">Try here</a>', STICKY, RIGHT, BELOW) "onMouseOut="return nd();">Where can I find stuff?</a>


          Thanks in advance


          Fred


        • loro
          ... Yeah. InsertHTML does odd things. I ve never found the need to use it. Similar to ^!InsertText command, but converts HTML tags to Uppercase, Lowercase, or
          Message 4 of 4 , Nov 18, 2013
            At 00:21 2013-11-19, Ian NTnerd wrote:
            >Try ^!inserttext to see if the result is different.

            Yeah. InsertHTML does odd things. I've never found the need to use
            it. "Similar to ^!InsertText command, but converts HTML tags to
            Uppercase, Lowercase, or XHTML format (depending on settings in
            Options)". Well, I use the case I prefer to begin with, so what's the need?

            Lotta
          Your message has been successfully submitted and would be delivered to recipients shortly.