php - Javascript button wont work or show -


i have been trying few hours try , working. however, code working fine second button not show on website. please help?

echo "<td><input class=button_normal type=button value=google renter onclick=window.window.open(href='https://www.google.co.uk/')";   echo "<input class=button_normal type=button value=yahoo onclick=window.window.open(href='https://www.yahoo.co.uk')</td>";

you haven't added quotations onclick, value , class. forgot close input tag.

echo "<td><input class='button_normal' type='button' value='google renter' onclick='window.window.open.href=\'https://www.google.co.uk/\''/>";  echo "<input class='button_normal' type='button' value='yahoo' onclick='window.location.href=\'https://www.yahoo.co.uk\''/></td>"; 

what suggest this:

<script> function gotoyahoo() { window.open('https://www.yahoo.co.uk'); }  function gotogoogle() { window.open('https://www.google.co.uk'); } </script> <?php      echo "<td><input class='button_normal' type='button' value='google renter' onclick='gotogoogle()'/>";      echo "<input class='button_normal' type='button' value='yahoo' onclick='gotoyahoo()'/></td>"; ?> 

Comments

Popular posts from this blog

css - SVG using textPath a symbol not rendering in Firefox -

Java 8 + Maven Javadoc plugin: Error fetching URL -

datatable - Matlab struct computations -