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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.