onclick="javascript:document.location= alternative

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • yvoshkiro
    New Member
    • Apr 2015
    • 1

    onclick="javascript:document.location= alternative

    hi i have a css style button with following code,

    but my cms seems to be stripping the javascript , is there some alternative to link the button?

    Code:
    <h2 class="black-first-title"><button class="button yellow" onclick="javascript:document.location='/joomla/index.php/webshop/cart/add?quantity[0]=1&amp;virtuemart_product_id[0]=11&amp;virtuemart_category_id[0]=2'">
    <div class="title">buy now</div>
    <div class="price">120 €</div>
    </button>
    tnxz
    Last edited by Rabbit; Apr 20 '15, 04:08 PM. Reason: Please use [code] and [/code] tags when posting code or formatted data.
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    I would drop the event attributes completely in favour of properly coded event handlers in the JS section (<script> tags or includes)

    Comment

    Working...