Announcement

Collapse
No announcement yet.

Javascript in Fragment

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Javascript in Fragment

    I have looked at quite a few other threads which have helped me get the site to display card logos but does anyone know how to "break" the displayed output into two lines?

    It is too wide here. http://www.hddirect.co.uk/

    #2
    Originally posted by HD Direct View Post
    I have looked at quite a few other threads which have helped me get the site to display card logos but does anyone know how to "break" the displayed output into two lines?

    It is too wide here. http://www.hddirect.co.uk/
    Try this (untested). It should give you three lines, first two for the cards and the last for the Worldpay logo.
    Code:
    <script src="https://secure.worldpay.com/wcc/logo?instId=1099480" language="JavaScript">
    document.write('<table cellspacing="2" cellspacing="2" border="0" align="center">');
    document.write('<tr>');
    document.write('<td><a href="http://www.mastercard.com" target="_blank"><img src="https://secure.worldpay.com/jsp/shopper/icons/WP_ECMC.gif" border="0" alt="MasterCard" /></a></td>');
    document.write('<td><a href="http://www.jcbusa.com" target="_blank"><img src="https://secure.worldpay.com/jsp/shopper/icons/WP_JCB.gif" border="0" alt="JCB" /></a></td>');
    document.write('</tr>');
    document.write('<tr>');
    document.write('<td><a href="http://www.maestrocard.com" target="_blank"><img src="https://secure.worldpay.com/jsp/shopper/icons/WP_MAESTRO.gif" border="0" alt="Maestro" /></a></td>');
    document.write('<td><a href="http://www.visa.com" target="_blank"><img src="https://secure.worldpay.com/jsp/shopper/icons/WP_VISA_DELTA.gif" border="0" alt="Visa Debit" /></a></td>');
    document.write('</tr>');
    document.write('<tr>');
    document.write('<td colspan="2" align="center"><a href="http://www.worldpay.com/support/index.php?CMP=BA22713" target="_blank"><img src="https://secure.worldpay.com/jsp/shopper/icons/../pictures/poweredByWorldPay.gif" border="0" alt="Powered by WorldPay" /></a></td>');
    document.write('</tr>');
    document.write('</table>');
    </script>

    Comment


      #3
      Thanks Duncan,
      This will sound really thick but I am doing the right thing by putting the code in the video box of the fragment? It's still showing as one line.

      Comment


        #4
        What is the code you're using? Can you post (in Code tags) here?

        The simplest way would be to just use the 'document.write' code directly in the fragment text.

        See Norman's code below.

        Comment


          #5
          Many lines end with an extraneous ') which will need removing.
          Code:
          Code:
          !!<
          <table cellspacing="2" cellspacing="2" border="0" align="center">
              <tr>
                  <td><a href="http://www.mastercard.com" target="_blank"><img src="https://secure.worldpay.com/jsp/shopper/icons/WP_ECMC.gif" border="0" alt="MasterCard" /></a></td>
                  <td><a href="http://www.jcbusa.com" target="_blank"><img src="https://secure.worldpay.com/jsp/shopper/icons/WP_JCB.gif" border="0" alt="JCB" /></a></td>
              </tr>
              <tr>
                  <td><a href="http://www.maestrocard.com" target="_blank"><img src="https://secure.worldpay.com/jsp/shopper/icons/WP_MAESTRO.gif" border="0" alt="Maestro" /></a></td>
                  <td><a href="http://www.visa.com" target="_blank"><img src="https://secure.worldpay.com/jsp/shopper/icons/WP_VISA_DELTA.gif" border="0" alt="Visa Debit" /></a></td>
              </tr>
              <tr>
                  <td colspan="2" align="center"><a href="http://www.worldpay.com/support/index.php?CMP=BA22713" target="_blank"><img src="https://secure.worldpay.com/jsp/shopper/icons/../pictures/poweredByWorldPay.gif" border="0" alt="Powered by WorldPay" /></a></td>
              </tr>
          </table>
          >!!
          Norman - www.drillpine.biz
          Edinburgh, U K / Bitez, Turkey

          Comment


            #6
            Thanks guys, it works perfectly. Hopefully the title of the thread should stop more dumbos like me annoying you when trying to do the same thing. Thanks again.

            Comment

            Working...
            X