Pergunta

How to make this code work? There are so many quotation marks and I'm confused how to put them right. Help me with this one.

<script type="text/javascript">
function eventWindow(url) {
    event_popupWin = window.open(url, 'event', 'resizable=yes,scrollbars=yes,toolbar=no,width=400,height=400');
    event_popupWin.opener = self;
}
</script>

$calendar.= '<div class="day-number"><a href="javascript:eventWindow(event.php?&d='.$list_day.'&m='.$month.'&y='.$year.')">'.$list_day.'</a></div>';

Thanks in advance.

Foi útil?

Solução

I think it will solve your problem..

function eventWindow(url) {
       event_popupWin = window.open(url, 'event',   'resizable=yes,scrollbars=yes,toolbar=no,width=400,height=400');
      event_popupWin.opener = self;
 }

 <div class="day-number">
      <a href="javascript:eventWindow('event.php?&d=<?php echo   $list_day; ?>&m=<?php   echo $month; ?>&y=<?php echo $year; ?>')"><?php echo $list_day; ?></a>   
 </div>
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top