At 22:28 11.11.2002, Mohsin Rahman said:
--------------------[snip]--------------------
>1) How to pass the STARTTIME only when the START TASK button is pressed?
>
>Apprently using
>
>echo "<input type=button value=\"Start\"
>onclick=\"window.open('popup.html?clientid=$starttime=strtotime(\"now\")&$th
>isclientid&projectid=$thisclientid','TEST','height=200,width=300,resizable=y
>es,toolbar=no,status=no,menubar=no,scrollbars=no')\">";
>
>does not pass the unixtime (now) to the popup.

You're merging the function call "strtotime()" into a string - that won't
work. The other query parameters seem also not to be correctly identified.
Try this:

        $starttime = =strtotime('now');
        $uri = 'popup.html?' .
               "clientid=$thisclientid" .
               "&projectid=$thisprojectid" .
               "&starttime=$starttime";

        echo '<input type=button value="Start"',
             'onclick="window.open(\'', $uri, '\',\'TEST\',',
             '\'height=200,width=300,resizable=yes,toolbar=no,',
             'status=no,menubar=no,scrollbars=no\')">';

>2). Since this is a Java popup, how do I get the close form action back
>and insert my endtime into the database from the popup?

I don't know - this depends on how the Java applet is written. Basically it
should issue a request to an URI passing either the time, or the elapsed
time, as a parameter.

Caution - this would pass the time at the client workstation which might
differ considerably from the server time. I'd suggest a solution where the
server generates some kind of client token that's passed to the Java
applet. The server would then associate this token with what he knows as
"project start time". Upon hitting the stop button at the client's the
applet would just pass back this token, annotated by the action (stop,
reset, cancel, whatever). The server would then have a chance to take the
appropriate action.

>3). How do I mix php in a Java function?

You don't. PHP is a server side issue, Java runs at the client's (at least
in this scenario). The client browser starts the Java applet on behalf of
the HTML code your server-side application outputs. The Java applet can
only communicate with the server using URI requests.


-- 
   >O     Ernest E. Vogelsinger
   (\)    ICQ #13394035
    ^     http://www.vogelsinger.at/



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to