Frage

i want to add this javascript in php echo

<a href="#" onClick="document.getElementById('footerSlideContainer').style.display ='block'">ddddddd</a>

i tried this but not working

 echo "  
  <a  href=\"javascript://\" onClick=\"clearChildren(document.getElementById('row11'));\" > <img src='Dealer/images/email_send.png'   style='width:22px;height:22px' />
  Contact Advertiser </a>" ;
War es hilfreich?

Lösung

<?php echo "<a  href=\"javascript://\" onClick=\"document.getElementById('footerSlideContainer').style.display ='block'\" > <img src='Dealer/images/email_send.png'   style='width:22px;height:22px' /> Contact Advertiser </a>"; ?>

try this code. problem is your javascript code in onClick event. what you want to do?

document.getElementById('footerSlideContainer').style.display ='block'; 

or

clearChildren(document.getElementById('row11'));

If you want 1st one copy my code, else there is nothing wrong with your code. That means bug on clearChildren(), check clearChildren() is defined and works perfectly.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top