Jump to content

Can not get onClick open window functions to work


farban6

Recommended Posts

Javascript isnt my strong point, and im trying to embed js into a php echo which is proving very differcult.

 

So I have two links that open up popup pages. The first opens up a normal page, the second opens up a page which passes get varibles. The second link I am having problems with, so far this works

 


<script type="text/javascript">
function open_win_input()
{
window.open("input.php",'_blank', "width=800,height=300");
}
</script>



<a href="javascript:void(0);" onclick="open_win_input();">Insert Appointment</a>


 

 

But when I try to make a second link for edit, none of the javascript functionaly works for either links

 

<script type="text/javascript">
function open_win_input()
{
window.open("input.php",'_blank', "width=800,height=300");
}

function open_win_edit(d,s)
{
window.open("edit.php?date_id=" + d"&status="+ s,'_blank', "width=800,height=300");
}
</script>

<?php 
echo "<a href='javascript:void(0);' onclick=\"open_win_edit('".$result['date_id'].','.$result['status']."')\">Edit</a>"; 

?>

 

Any help would be very appreciated

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.