Jump to content

kewpe20

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Everything posted by kewpe20

  1. Hello all, I've been trying to a resolve an issue with a parent page not reloading after a child form is submitted. The initial problem is that I immediately lose the value of window.opener on the call to the child window.. What am I doing wrong? Here is my call to the child window in my php file: <a href="notes.php" class="actiontiny" target="_blank" onclick="modalWin('3','4','add' ); return false;">Add Note</a> Here is the Javascript for modalWin function: The alert statement results in "undefined" when it should result in the name of the parent's php file name....right? function modalWin(type, id, func) { alert(window.opener); if (window.showModalDialog) { window.showModalDialog("notes.php?type="+type+"&id="+id+"&func="+func+"","Notes", "dialogWidth:600px;dialogHeight:510px"); } else { window.open('notes.php?type='+type+'&id='+id+'&func='+func+'','Notes', 'height=510,width=600,toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no ,modal=yes'); } }
  2. Ken, When I copy and paste your code without making any edits to it, I get 20:28:13.
  3. I got the results I wanted with this code: <?php $pct = 6.1275; $mins = $pct*1440/100 ; // 1440 minutes in most days $hrs = $pct*24/100; // 24 hours in most days $fake_time = intval($hrs). ":". (intval($mins) - 60*intval($hrs)); echo $pct. "% of a day equals ". $fake_time. " in hh:mm format";; ?> The other solution returned 20:28:13 Thanks to the both of you for helping me out.
  4. Not a gag. To see a live example copy 0.0612756581515 into a cell in MSEXCEL. Then right click the cell and select Format, then select the time format (hh:mm) Excel treats the number as a a percent of a 24 hour day. So, 6 hours = .25 12 hours = .5 18 hours = .75 and 24 hours = 1 That's the logic. I just can't get my head around how to convert it the opposite way. Meaning if someone said what is 6.1275% of a 24 hour day, how would I calculate it and return an answer in a hour:minute format.
  5. A client provided me with an Excel Doc. with some very complex equations to determine a time period. I have been able to duplicate the results using PHP up to the point where Excel converts the decimal value into a period of time using a 24 hour time frame. For example I have a decimal value = 0.0612756581515 which equals 1 hour and 28 minutes in Excel. How do I convert that decimal value to 1 hour and 28 minutes , or 88 minutes, or 316800 seconds. There's got to be a way, but solving it is over my head. Thanks in advance
×
×
  • 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.