Jump to content

ONCLICK HANDLING


biircoop

Recommended Posts

I am having trouble parsing coding errors in my .php file. When I click on the first button, I want it to call two functions with the arguments specified. The first function is daily_hours() and the second is process_task() The current error that I am getting now is T_CONSTANT_ENCAPSED_STRING, but I have been messing around with it and changing it and have gotten many different errors. I think it might have something to do with how I am using quotes around my variables, but I can't figure it out.

 

<input type=\"Button\" value=\"\" style=\"background-image:url(img/complete_task_btn.gif); border:0px; width:150px; height:30px; cursor:pointer;\" onclick=\"daily_hours(".$_REQUEST["ticket_id"].",".$_REQUEST["req_id"].","'".$dow."'","'".$status_id."'" ,"'".$last_log_hours_date."'","'".$weekday."'"); process_task(".$_REQUEST['ticket_id'].",".$_REQUEST['req_id'].",'".$_REQUEST['req_name']."','complete','".$_SESSION['username']."','".$_REQUEST['added_user']."')\">

 

 

Here is an example of the next button handler, which works fine on the function call, but doesn't have any variables other than the REQUESTS.

 

<input type=\"Button\" value=\"\" style=\"background-image:url(img/cancel_task_btn.gif); border:0px; width:140px; height:30px; cursor:pointer;\" onclick=\"process_task(".$_REQUEST["ticket_id"].",".$_REQUEST["req_id"].",'".$_REQUEST["req_name"]."','cancel','".$_SESSION['username']."','".$_REQUEST['added_user']."')\">

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.