Javascript function call from PL/SQL block

Hello,
I am writing this pl/sql block that has checkbox and onselect, it calls javascript function.
I defined javascript function in page header, even though I get error that says function is not defined.
Please help.
Thank you,
H.

I got it resolved...!!!

Similar Messages

  • Calling sql script from pl/sql block

    Hi
    I want to call a sql script from pl/sql block.
    like
    CREATE OR REPLACE procedure DataBaseExport(user_name in varchar2, pwd in varchar2)
    as
    begin
    execute immediate  '@ C:\Documents and Settings\umesh\emp.sql';
    end DataBaseExport;
    /

    Try something like this -
    CREATE OR REPLACE AND COMPILE JAVA SOURCE NAMED "Host" AS
    import java.io.*;
    public class Host
         public static void executeCommand(String command)
         try {
                String[] finalCommand;
                   if (isWindows())
                        finalCommand = new String[4];
                        // Use the appropriate path for your windows version.
                        finalCommand[0] = "C:\\windows\\system32\\cmd.exe"; // Windows XP/2003
                        //finalCommand[0] = "C:\\winnt\\system32\\cmd.exe"; // Windows NT/2000
                        finalCommand[1] = "/y";
                        finalCommand[2] = "/c";
                        finalCommand[3] = command;
                   else
                        finalCommand = new String[3];
                        finalCommand[0] = "/bin/sh";
                        finalCommand[1] = "-c";
                        finalCommand[2] = command;
              final Process pr = Runtime.getRuntime().exec(finalCommand);
             pr.waitFor();
             new Thread(new Runnable()
                public void run()
                      BufferedReader br_in = null;
                   try
                        br_in = new BufferedReader(new InputStreamReader(pr.getInputStream()));
                        String buff = null;
                        while ((buff = br_in.readLine()) != null)
                                  System.out.println("Process out :" + buff);
                               try {Thread.sleep(100); } catch(Exception e) {}
                        br_in.close();
                   catch (IOException ioe)
                        System.out.println("Exception caught printing process output.");
                        ioe.printStackTrace();
                 finally
                     try {
                              br_in.close();
                          } catch (Exception ex) {}
         ).start();
         new Thread(new Runnable()
           public void run()
                BufferedReader br_err = null;
                try
                   br_err = new BufferedReader(new InputStreamReader(pr.getErrorStream()));
                   String buff = null;
                   while ((buff = br_err.readLine()) != null)
                        System.out.println("Process err :" + buff);
                        try
                           Thread.sleep(100);
                         } catch(Exception e) {}
                   br_err.close();
               catch (IOException ioe)
                   System.out.println("Exception caught printing process error.");
                   ioe.printStackTrace();
              finally
                  try
                          br_err.close();
                   catch (Exception ex) {}
          ).start();
         catch (Exception ex)
                  System.out.println(ex.getLocalizedMessage());
      public static boolean isWindows()
              if (System.getProperty("os.name").toLowerCase().indexOf("windows") != -1)
              return true;
              else
              return false;
    CREATE OR REPLACE PROCEDURE Host_Command (p_command IN VARCHAR2)
    AS LANGUAGE JAVA
    NAME 'Host.executeCommand (java.lang.String)';
    --- THE PERMISSIONS ---
    call dbms_java.grant_permission('SYSTEM', 'SYS:java.io.FilePermission', '<<ALL FILES>>', 'read ,write, execute, delete');
    call dbms_java.grant_permission('SYSTEM', 'SYS:java.lang.RuntimePermission', 'writeFileDescriptor', '');
    call dbms_java.grant_permission('SYSTEM', 'SYS:java.lang.RuntimePermission', 'readFileDescriptor', '');And, finally,
    create or replace procedure call_sql_file(usr  in varchar2,
                                              pwd  in varchar2,
                                              host_str in varchar2)
    is
    begin
       host('sqlplus -s usr/pwd@host_str C:\UAX_Auto_Count.sql');
    exception
      when others then
        dbms_output.put_line(sqlerrm);
    end;Now, you can pass all the argument in order to execute that file.
    N.B.: Not Tested...
    Regards.
    Satyaki De.

  • PL/SQL Javascript Function Call

    Can anyone offer some help on this? I am attempting to get a javascript tool tip to work on an application I am developing. I have developed a line calendar using PL/SQL outputting HTML. When I embed a javascript function into my PL/SQL htp.p function, the javascript appears to go a little crazy. Here is an example of my code:
    "htp.p('<td onMouseover="ddrivetip("Yahoos Site", "yellow", 250)"
    onMouseout="hideddrivetip()">Yahoo</td>')
    I have tried a few iterations, using different javascript, and I always get the same result. The double quotes used in the onMouseover and onMouseout function calls are a result of PL/SQL not liking single quotes. The entire code for the tooltip can be found on dynamic drives page:
    http://www.dynamicdrive.com/dynamicindex5/dhtmltooltip.htm
    The CSS and javascript code is placed as appropriate in the HTML page header. Am I missing something on the htp.p command?
    Message was edited by:
    jason97m
    Message was edited by:
    jason97m

    This post covers it well.
    http://inside-apex.blogspot.com/2007/08/using-tooltips-in-oracle-apex.html
    Good luck.
    Brian

  • Is it possible to call a windows batch file from PL/SQL block ??

    Hi gurus,
    Would require your help.Is it possible to call a windows batch file from PL/SQL block ??If yes can you give an example for the same or any workaround for the same.
    Regards
    Vijay

    You didn't specify a database version, but if you are 10g or higher, it's quite straightforward using an external job type in DBMS_SCHEDULER. Funnily enough i'm looking at something similar myself at the moment.
    Useful guide to some of the issues here Guide to External Jobs on 10g with dbms_scheduler e.g. scripts,batch files

  • Java function call from Trigger in Oracle

    Moderator edit:
    This post was branched from an eleven-year-old long dead thread
    Java function call from Trigger in Oracle
    @ user 861498,
    For the future, if a forum discussion is more than (let's say) a month old, NEVER resurrect it to append your new issue. Always start a new thread. Feel free to include a link to that old discussion if you think it might be relevant.
    Also, ALWAYS use code tags as is described in the forum FAQ that is linked at the upper corner of e\very page. Your formulae will be so very much more readable.
    {end of edit, what follows is their posting}
    I am attempting to do a similar function, however everything is loaded, written, compiled and resolved correct, however, nothing is happening. No errors or anything. Would I have a permission issue or something?
    My code is the following, (the last four lines of java code is meant to do activate a particular badge which will later be dynamic)
    Trigger:
    CREATE OR REPLACE PROCEDURE java_contact_t4 (member_id_in NUMBER)
    IS LANGUAGE JAVA
    NAME 'ThrowAnError.contactTrigger(java.lang.Integer)';
    Java:
    CREATE OR REPLACE AND COMPILE JAVA SOURCE NAMED "ThrowAnError" AS
    // Required class libraries.
    import java.sql.*;
    import oracle.jdbc.driver.*;
    import com.ekahau.common.sdk.*;
    import com.ekahau.engine.sdk.*;
    // Define class.
    public class ThrowAnError {
    // Connect and verify new insert would be a duplicate.
    public static void contactTrigger(Integer memberID) throws Exception {
    String badgeId;
    // Create a Java 5 and Oracle 11g connection.
    Connection conn = DriverManager.getConnection("jdbc:default:connection:");
    // Create a prepared statement that accepts binding a number.
    PreparedStatement ps = conn.prepareStatement("SELECT \"Note\" " +
    "FROM Users " +
    "WHERE \"User\" = ? ");
    // Bind the local variable to the statement placeholder.
    ps.setInt(1, memberID);
    // Execute query and check if there is a second value.
    ResultSet rs = ps.executeQuery();
    while (rs.next()) {
    badgeId = rs.getString("Note");
    // Clean up resources.
    rs.close();
    ps.close();
    conn.close();
    // davids badge is 105463705637
    EConnection mEngineConnection = new econnection("10.25.10.5",8550);
    mEngineConnection.setUserCredentials("choff", "badge00");
    mEngineConnection.call("/epe/cfg/tagcommandadd?tagid=105463705637&cmd=mmt%203");
    mEngineConnection.call("/epe/msg/tagsendmsg?tagid=105463705637&messagetype=instant&message=Hello%20World%20from%20Axium-Oracle");
    Edited by: rukbat on May 31, 2011 1:12 PM

    To followup on the posting:
    Okay, being a oracle noob, I didn't know I needed to tell anything to get the java error messages out to the console
    Having figured that out on my own, I minified my code to just run the one line of code:
    // Required class libraries.
      import java.sql.*;
      import oracle.jdbc.driver.*;
      import com.ekahau.common.sdk.*;
      import com.ekahau.engine.sdk.*;
      // Define class.
      public class ThrowAnError {
         public static void testEkahau(Integer memberID) throws Exception {
         try {
              EConnection mEngineConnection = new EConnection("10.25.10.5",8550);
         } catch (Throwable e) {
              System.out.println("got an error");
              e.printStackTrace();
    }So, after the following:
    SQL> {as sysdba on another command prompt} exec dbms_java.grant_permission('AXIUM',"SYS:java.util.PropertyPermission','javax.security.auth.usersubjectCredsOnly','write');
    and the following as the user
    SQL> set serveroutput on
    SQL> exec dbms_java.set_output(10000);
    I run the procedure and receive the following message.
    SQL> call java_contact_t4(801);
    got an error
    java.lang.NoClassDefFoundError
         at ThrowAnError.testEkahau(ThrowAnError:13)
    Call completed.
    NoClassDefFoundError tells me that it can't find the jar file to run my call to EConnection.
    Now, I've notice when I loaded the sdk jar file, it skipped some classes it contained:
    c:\Users\me\Documents>loadjava -r -f -v -r "axium/-----@axaxiumtrain" ekahau-engine-sdk.jar
    arguments: '-u' 'axium/***@axaxiumtrain' '-r' '-f' '-v' 'ekahau-engine-sdk.jar'
    creating : resource META-INF/MANIFEST.MF
    loading : resource META-INF/MANIFEST.MF
    creating : class com/ekahau/common/sdk/EConnection
    loading : class com/ekahau/common/sdk/EConnection
    creating : class com/ekahau/common/sdk/EErrorCodes
    loading : class com/ekahau/common/sdk/EErrorCodes
    skipping : resource META-INF/MANIFEST.MF
    resolving: class com/ekahau/common/sdk/EConnection
    skipping : class com/ekahau/common/sdk/EErrorCodes
    skipping : class com/ekahau/common/sdk/EException
    skipping : class com/ekahau/common/sdk/EMsg$EMSGIterator
    skipping : class com/ekahau/common/sdk/EMsg
    skipping : class com/ekahau/common/sdk/EMsgEncoder
    skipping : class com/ekahau/common/sdk/EMsgKeyValueParser
    skipping : class com/ekahau/common/sdk/EMsgProperty
    resolving: class com/ekahau/engine/sdk/impl/LocationImpl
    skipping : class com/ekahau/engine/sdk/status/IStatusListener
    skipping : class com/ekahau/engine/sdk/status/StatusChangeEntry
    Classes Loaded: 114
    Resources Loaded: 1
    Sources Loaded: 0
    Published Interfaces: 0
    Classes generated: 0
    Classes skipped: 0
    Synonyms Created: 0
    Errors: 0
    .... with no explanation.
    Can anyone tell me why it would skip resolving a class? Especially after I use the -r flag to have loadjava resolve it upon loading.
    How do i get it to resolve the entire jar file?
    Edited by: themadprogrammer on Aug 5, 2011 7:15 AM
    Edited by: themadprogrammer on Aug 5, 2011 7:21 AM
    Edited by: themadprogrammer on Aug 5, 2011 7:22 AM
    Edited by: themadprogrammer on Aug 5, 2011 7:23 AM
    Edited by: themadprogrammer on Aug 5, 2011 7:26 AM

  • Execute Oracle Package Function call from FORTE

    Has anyone EVER successfully execute an Oracle Package Function call from FORTE
    via " sql execute procedure "?
    Here's my question, I am able to execute a stored procedure but hasn't figured
    out a way to execute a function which defined in a package. The syntax goes
    like this: sql execute procedure <PackageName>.<FunctionName> ( input
    input_parm, output output_parm). If anyone EVER successfully execute a
    function, please let me know, thanks.

    You'll need to provide a column alias for the function call:
    select func(val) as alias from dual

  • Avoid procedure or function calls between a SQL operation and an implicit cursor test

    when i analyse this code with code expert

    atpidgeon wrote:
    when i analyse this code with code expert
                            UPDATE P_PM_CONTROL_COUNT
                            SET AVAIL_SEG = AVAIL_SEG -1,
                                ALLOCATION = ALLOCATION -1
                            WHERE PM_UNIT_TYPE_ID = vrectab(1)
                            AND USAGE_DATE = vrectab(2)
                            AND SEGMENT_CODE = vrectab(5)
                            AND ALLOCATION - UNITS_RESERVED > 0;
                            IF sql%rowcount = 0 then --Added block and exception to prevent invetory going negative when placing multi units in same unit type out of service.
                                vErrMsg := 'Could not process your out of service request because your selection for unit '|| vrectab(3) || ' at ' || pvPropertyId || ' for ' || vrectab(2) || ' would cause segment ' || vrectab(5) || ' to be over allocated.';
                                RAISE SegOverAllocated;
                            END IF;
    i get "Avoid procedure or function calls between a SQL operation and an implicit cursor test.",as far has i know
    iff you're doing a sql%rowcount    after an update.. trying to see how many rows were updated...  you dont want procedure or function calls between the update and the sql% line
    correct me if im wrong and how would i fix it?or maybe i shouldnt
    You correct it by NOT executing function calls as part of the UPDATE statement.
    1. Issue the function calls BEFORE the update statement
    2. save the function results into variables
    3. use those variables in the UPDATE statement.
    v_rectab1 := vrectab(1);
    v_rectab2 := vrectab(21);
    v_rectab5 := vrectab(5);
    UPDATE P_PM_CONTROL_COUNT 
                            SET AVAIL_SEG = AVAIL_SEG -1,
                                ALLOCATION = ALLOCATION -1
                            WHERE PM_UNIT_TYPE_ID = v_rectab1
                            AND USAGE_DATE = v_rectab2
                            AND SEGMENT_CODE = v_rectab5
                            AND ALLOCATION - UNITS_RESERVED > 0;

  • Initialization section vs call from another code block in package.

    hi,
    why is it intialization section in package body is more than call from another code block the package .

    The initialization section is only called once upon the initial loading of the package into memory, which is just once per session. So, accessing any function or procedure etc in the package causing it to load into memory will automatically run the initialization section first. It doesn't have to be called specifically.

  • Object synchronization method was called from an unsynchronized block of co

    I have installed DotNETWebControlConsumer_3.0_sp1
    in my machine I am very much new to Plumtree
    I am building the application in vs 2005 or .Net 2.0 environment and plumtree 6.0
    here is my web.config file code
    <httpModules>
    <add type="Com.Plumtree.Remote.Loader.TransformerProxy, Plumtree.WCLoader, Version=3.0.0.0, Culture=neutral, PublicKeyToken=d0e882dd51ca12c5" name="PTWCFilterHttpModule"/>
    </httpModules>
    and I get the error Object synchronization method was called from an unsynchronized block of code
    I just removed the html format for posting purpose i mean all the less than and greater than sign
    please I need it so badly

    Regarding your first issue (because it looks as if you removed the <httpModules> node from your web.config to move on from that issue), I changed 'Aqualogic.WCLoader' to 'Plumtree.WCLoader' in <httpModules ../>, added a reference to Plumtree.WCLoader in my project , then added another <add assembly="Plumtree.WCLoaderyadayada...> accordingly to the <assemblies> node in the web.config and then it worked. Well, almost, now I'm seeing a new error:
    [NullReferenceException: Object reference not set to an instance of an object.]
    Com.Plumtree.Remote.Transformer.PTTransformer.HandleRequest(HttpContext ctx) in e:\buildroot\Release\wcfilter\3.0.x\filter\src\Com\Plumtree\Remote\Transformer\PTTransformer.cs:60
    Com.Plumtree.Remote.Transformer.PTTransformer.BeginRequestHandler(Object sender, EventArgs e) in e:\buildroot\Release\wcfilter\3.0.x\filter\src\Com\Plumtree\Remote\Transformer\PTTransformer.cs:54
    System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +92
    System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64
    Mine is a .net 2.0 portlet that will work if I don't try to use the WCC 3.0SP1 (by pulling the <httpModules> node. But then I'm guaranteed no inline refresh. I have no fix yet, but when I do, I'll post it. I've contacted Plumtree Support in the meantime because others must be having the same problem.
    p.s. Also using edk 5.3 signed, though I'm going to upgrade to 5.4 and see if that does anything.

  • Running sqlldr command from PL/SQL Block

    DECLARE
    BEGIN
    END;

    In SQL * plus we can run DOS commands using the following command
    HOST DIR
    HOST DIR/P
    But When we can't run the HOST command in PL/SQL Block..
    I have to Run sqlldr command from PL/SQL Block..
    i tried as follows
    DECLARE
    BEGIN
    EXECUTE IMMEDIATE ' host sqlldr control= bad= ';
    END;
    By
    BalaNagaRaju

  • Exec SQLPLUS command from PL/SQL Block

    Good Morning:
    How I can execute a SQLPLUS command (like SPOOL or DESCRIBE) from PL/SQL Block Procedure?:
    DECLARE
    BEGIN
    ls_command = 'DESCRIBE '||ls_table_name;
    EXECUTE SQLPLUS(ls_command);
    END;
    Thanks a lot for any idea.

    That's correct.
    However, in the case of the given example we can use DBMS_DESCRIBE package to get table descriptions. And we can use UTL_FILE to spool PL/SQL stuff to a file.
    Cheers, APC

  • Calling function from PL/SQL block

    Hi,
    A very simple question.
    A have a function called "test1" in my database. It is there i double chekked.
    I would like to call this function from a block:
    DECLARE
    BEGIN
    TEST1(1202);
    END;
    This gives me an error.
    Why is this?

    user610868 wrote:
    Hi,
    A very simple question.
    A have a function called "test1" in my database. It is there i double chekked.
    I would like to call this function from a block:
    DECLARE
    BEGIN
    TEST1(1202);
    END;
    This gives me an error.
    Why is this?Hello
    A very very basic thing to do when you get an error is to include details of it. That helps narrow it down from one of the 1000s of potential Oracle errors it could be.
    Anyway, a function returns a value, and in PL/SQL you need to capture that otherwise you'll get "an error". Modify your code like so
    DECLARE
       l_Test1Val     VARCHAR2(4000); --CHANGE THIS TO BE THE SAME AS THE RETURN TYPE FOR YOUR FUNCTION
    BEGIN
       l_Test1Val :=  TEST1(1202);
    END;HTH
    David
    Edited by: Bravid on Oct 25, 2011 3:57 PM
    removed a ;

  • Call DLL from PL-SQL block

    Hello all,
    I want to call a function located in an external DLL from a PL-SQL block. I execute the followin steps :
    1. Create a database library pointing to the external DLL :
    create or replace library libstk as 'C:\SUMMIT\libstkdte_s_trade1.dll'
    2. Create the definition and the body package :
    CREATE OR REPLACE PACKAGE dllcall IS
         FUNCTION s_trade (
              s_in VARCHAR2 )
    RETURN VARCHAR2;
    PRAGMA RESTRICT_REFERENCES(s_trade, WNDS);
    end dllcall;
    show errors
    CREATE OR REPLACE PACKAGE BODY dllcall IS
    FUNCTION s_trade (s_in IN VARCHAR2) RETURN VARCHAR2
    IS EXTERNAL
    NAME "s_trade"
    LIBRARY libstk
    PARAMETERS (s_in           STRING,
    RETURN STRING);
    END dllcall;
    show errors
    set serveroutput on
    3. Start the PL-SQL block calling the external function. And I got the foolowing error :
    1 begin
    2 dbms_output.put_line ( dllcall.s_trade ( '<Request> ' ||
    3 '<CurveId>MYCURVE</CurveId> ' ||
    4 '<Mode>02</Mode> ' ||
    5 '<ExpCcy>GBP</ExpCcy> ' ||
    6 '<AsOfDate>20001023</AsOfDate> ' ||
    7 '<Entity>***SUMMIT-XML***</Entity> ' ||
    8 '</Request>') );
    9* end;
    10
    11 /
    begin
    ERROR à la ligne 1 :
    ORA-06520: PL/SQL: Error loading external library
    ORA-06522: Unable to load DLL
    ORA-06512: at "V31.DLLCALL", line 0
    ORA-06512: at line 2
    The "Read - Execute permissions" of the DLL file was given to "Authentified users" .
    What's wrong ?
    TIA
    PS : NT2K environment, DB 8.1.7
    R. Charles Emile

    Yes, a RPC was set up.
    Listner.ora
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = Server1)(PORT = 1521))
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = NMP)(SERVER = Server1)(PIPE = ORAPIPE))
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = E:\Oracle\Ora81)
    (PROGRAM = extproc)
    tnsnames.ora
    extproc_connection_data =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
    (CONNECT_DATA = (SID = PLSExtProc))
    Thanks
    RCE

  • Applet function call from javascript

    Hi,
    I'm haveing a problem with accesing applet's functions from Javascript in Mozilla. IE works fine but in Mozilla I get the following error:
    Error: document.applets[0] has no properties
    The code used is: document.applets[0].test();
    The applet has the following 2 tags defined, I don't know if they are necessary here but I'm doing the reverse too (applet functions call javascript).
    <PARAM name="MAYSCRIPT" value="Y">
    <PARAM name="SCRIPTABLE" value="Y">
    If you have any ideea please help.
    Thanks

    in javascript try document.getElementById("idOfTheApplet")
    use object tag instead of applet tag:
         <object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
                  height="300" width="450" >
            <param name="code" value="appTest.class" />
            <!--[if !IE]> Mozilla/Netscape and its brethren -->
            <object classid="java:appTest.class"
                    height="300" width="450"
                    >
              <param name="mayscript" value=Y" />
            </object>
            <!-- <![endif]-->
          </object>or check out HtmlConverter.exe in the jdk bin dir.

  • Function call from SQL SELECT

    I am calling a function from a SELECT statement. I want to call this function 3 times in the same select statement, to get 3 different levels in a hierarchy for a particular licence number. This function has a hierarchy query using a START WITH.. CONNECT BY clause and a SYS_CONNECT_BY_PATH function to get the full hierarchy path in the SELECT clause. Then the SUBSTR/INSTR functions are used to get the 1st, 2nd or 3rd element in the hierarchy.
    The query is now running very slowly. Is there a better way of doing this -- should I just use in-line views in the SQL statement. Am I trying to do something stupid!!?

    a) you are calling the PL/SQL engine from the SQL engine 3 times for every row of data you are processing. This WILL have a performance impact.
    b) If you can do something purely in SQL then do it that way as this will be the most peformant.
    If you post an example of your data (provide us with CREATE TABLE/INSERTs or WITH statement) and an example of what you are trying to get as output then we may be able to help.

Maybe you are looking for

  • How to changed my security question

    hi good morning, i need help pls. i would like to changed my security question  pls..

  • Importing 10g dmp in Oracle 9i

    hello, just wanted to know, if the dmp file created with Oracle exp utility can be safely imported into Oracle 9i DB. regards

  • Increasing the iCal client timeout time?

    Is there a way to increase iCal's time-out period? We've got a Mac Mini serving out about 2600 events though an iCal calendar and while we've got about 10 users on it currently, we'd like to add another 50 users although we'll probably have to upgrad

  • Library disappeared, everything gone

    Just opened itunes and my entire library is gone! I hadnv'e installed any new software, no changes or updates (windows 7, 64 bit)... hours and hours of music and audio books... all my purchased audiobooks and music, hours of favorite podcasts... gone

  • Possible to communicate to server when user terminates an app?

    Hi, We have a location based messaging app which utilizes CoreLocation updates.  When the app goes into background state, we use significant location changes. We mark users as 'online' and 'offline'.   We are trying to alert our server that a user is