Function e: vs. event

I'm a actionscript / flash noob and had a question about flash.
I've seen different functions written different ways but one thing I don't understand is the "e"
for example.
function name(e:MouseEvent):void {
and
function navOutF(event:MouseEvent):void {
I had thought that "e:" was shorthand for 'event:', but when I tryed to used them interchangeablly (replacing 'event' with 'e:'), the script would could back with errors. And so now I have no idea what it means, and when to use e: and when to use event.
Also, if someone could tell me why I have to put ':void' after each function, that would be helpful...

Ok, for theory sake (forget events for now) say you have a function that accepts two arguments e and event:
function myFunction(e:int, event:String):void{
     trace(e + " :: " + event);
and you call the function like this:
myFunction (3, "aha");
the trace will be:
3 :: aha
Now, say I change the function:
function myFunction(foofoo:int, booboo:String):void{
     trace(foofoo + " :: " + booboo);
you still can use the function exactly the same way:
myFunction (3, "aha");
and the trace will be the same
3 :: aha
With events you say that a function will be called and an INSTANCE of Event will be passed into it. IT DOESN"T MATTER what name you give to the arguments as long as the datatype is some Event. It can be e, event, hisMother, etc. But if you say that the name of the argument is "event" - you have to refer to this argument by name event - not e.

Similar Messages

  • Calendar...list function shows only events for date select instead of events from that date forward.

    Calendar list function shows only events for date selected....instead of events for date selected and events forward from that date.  Is there a setting change needed?  Help!

    Hi,
    Did you check that your universe object referring "Date of Completion" has Date data type?
    Can you also provide the BOE verson you are using?
    I remembered that the calendars were not displayed in XIR2 version.
    Didier

  • Added Jcombobox into awt.frame causing handling event function cannot receive event

    Dear Sir,
    I want to ask how an awt.Choice  can set the number of rows that it can display, like the method setMaximumRowCount in JCombobox. Since I want to set more row can be displayed, but choice no any method can set. And I have tried to add Jcombobox into awt.frame, then, the handling event function cannot receive event for the right-top cornet button(minimize, maximum, close).
    Best Regards,

    please post a Short, Self Contained, Correct Example showing your problem.
    bye
    TPD

  • GP: How to keep action  sleeping until ABAP function module raises event

    Hello experts,
    I'd like to develop a gp process which contains a callable objects which keeps the process instance waiting until an abap function module send something like an event.
    I don't want to put too much load on the machine and block expensive JCO ressources.
    Does anyone have an idea how to solve this?
    Thanks very much
    Stefan

    Hi Mike,
    GREAT! Many thanks! Sometimes solutions may be so simple.
    For all others who have the same problem a bit more in detail:
    In your FM just enter as exception: CX_BO_ACTION_CANCELLED and mark 'Exceptn. Classes'.
    Declare your class method with the exception cx_bo_action_cancelled.
    In your class method just enter your FM via the 'Pattern'-Button.
    The Pattern will show only the Import- and Export-Parameters but not the exception (class).
    Regards,
    Georg

  • Help Please ... with calling functions inside listener events

    I need the window to update itself before another method inside my listener is called. When I make the call to updateUI() it preforms it's function once my listener event is compelete while I would like to to happend.
    paw.updateHasMoved();
    temp.updateUI();// -->Want the update to occure before the next line is called
    piece.CB.board = ComputersMove(piece.CB.board);

    okidoi Mr Helpy!
    let me try with this
    just one more question, the button should be created at
    runtime or inside my
    movieclip?
    Regards
    Rick
    "Mr Helpy mcHelpson" <[email protected]>
    escribió en el mensaje
    news:f46tjk$lg1$[email protected]..
    > flooring.onLoad = function(success) {
    > if (flooring.firstChild.hasChildNodes()) {
    >
    > you can just do
    >
    > flooring.onLoad = function(success) {
    > if (success) {
    >
    > you'll need to create a button on top of your image.
    This for me is most
    > easily done with a predefined custom class, and on the
    instantiation of
    > your
    > image(movieclip) you can define the button actions
    contained in the movie
    > clip.
    >
    > make sense?
    >
    > HmcH
    >

  • Callback function for network events

    Hi all,
    I'm working on a project, and I need to be able to respond to network events. I receive the data through a BufferedInputStream from a socket. What I want is a callback-type thing, i.e. When new data is sent to the socket, a function is called to receive that data. I've looked through the documentation, I can't find anything that could be used for that. The only thing I can think of is linking it to a JTextArea/JTextField, and attaching a change listener to that, but I'd prefer not to have to do that. My current method involves a loop, which I don't like at all:
    while (true) {
    if (server.Available()) {
    do stuff here
    I don't like it because it wastes processor cycles that really should go elsewhere. So what can I do?
    -ReKleSS

    When you read from a socket and there is no data available, it just blocks until something does become available. While the thread is blocked waiting for I/O it won't take up any processor time.

  • Function to retrieve event parameters from job

    Hello,
      Is there a function to retrieve the event parameters for a job.
      This job is triggered by an event.
    Regards, Michel

    Check in TBTCP and TBTCO Table there in some field it i s mentioned..
    TBTCP and TBTCO is the table which stores job details ..

  • Use event function for multiple events

    I've got several movieclip buttons on stage. For one of those buttons I've started of with:
    button1.buttonMode = true;
    button1.useHandCursor = true;
    button1.addEventListener(MouseEvent.MOUSE_DOWN, fl_ClickToDrag);
    function fl_ClickToDrag(event:MouseEvent):void
              button1.startDrag();
    stage.addEventListener(MouseEvent.MOUSE_UP, fl_ReleaseToDrop);
    function fl_ReleaseToDrop(event:MouseEvent):void
              button1.stopDrag();
    Which works. But I would like to have that fl_ClickToDrag function excuted for all my other buttons too, so I don't have to duplicate that several times for each button. So I thought I use something like:
    button1.buttonMode = true;
    button1.useHandCursor = true;
    button2.buttonMode = true;
    button2.useHandCursor = true;
    button1.addEventListener(MouseEvent.MOUSE_DOWN, fl_ClickToDrag);
    button2.addEventListener(MouseEvent.MOUSE_DOWN, fl_ClickToDrag);
    function fl_ClickToDrag(event:MouseEvent):void
      event.target.startDrag();
    stage.addEventListener(MouseEvent.MOUSE_UP, fl_ReleaseToDrop);
    function fl_ReleaseToDrop(event:MouseEvent):void
      event.target.stopDrag();
    But that gives an error. What's the correct way?

    Actually I got it working by using:
    button1.buttonMode = true;
    button1.useHandCursor = true;
    button2.buttonMode = true;
    button2.useHandCursor = true;
    button1.addEventListener(MouseEvent.MOUSE_DOWN, fl_ClickToDrag);
    button2.addEventListener(MouseEvent.MOUSE_DOWN, fl_ClickToDrag);
    function fl_ClickToDrag(event:MouseEvent):void
      event.currentTarget.startDrag();
    stage.addEventListener(MouseEvent.MOUSE_UP, fl_ReleaseToDrop);
    function fl_ReleaseToDrop(event:MouseEvent):void
      stopDrag();

  • Callback functions to handle events for a specific system build block

    I have two questions about customized event handling in Systembuild:
    1- The SystemBuild Utility "sysbldEvent" can bo used to specify additional actions for the "openblock" and "navigate" events. However, it will be applied to all systembuild blocks.
    Is there a way to limit its scope to a specific block or block type?
    This has been done for the Altia block (which is a customized UCB block) - a double-click will open a special dialog box. Is this feature implemented using publicly available systembuild features or there are other special features used?
    2- Is there any way to assign callbacks to other type of block events: copy, paste, etc ...
    Thanks.

    Farshid,
    There are a couple of options for creating custom dialogs/blocks.
    SysbldEvent can be used. As you noted it will generate and event for all the blocks. You can not generate an event only for a specific block. However the Xmath function has two values sent to it. One is the type of event (blockopen or navigate) and the blockId. You can use blockId together with SBA commands to find out which block generated the event. If it is a block that you are not interested in then return 0 and SystemBuild opens the normal dialog. If it is the right block then you can open your own dialog or perform what ever action is needed. Finally return a 0 if you want SystemBuild to still open the normal dialog, or you can return 1 and no dialog is opened.
    The Altia
    block is a custom block. It is a standard UserCode block that has been customized to have differnt default parameters and different icon. In the SystemBuild editor (not catalog browser) select a block and the go to Edit>New Custom Block. The custom block can a have a MathScript function associated with it that gets called when the block is created. For more information on custom blocks see chapter 18 of the SystemBuild Users Guide (Help>Search MATRIXx Bookshelf from Xmath).
    The final method is creating a component. For a component percent vars can remain internal or they can be available to the user. You can also provide a different set of parameters that are available to the user, and then provide equations for how they map to the internal percent vars. Information on Components is in Chapter 17 of the SystemBuild User's Guide.
    Carl L
    National Instruments

  • Standard ABAP functions for creating events?

    Hi,
    I'm a little bit confused which ABAP functions to use for creating academic events with schedules (e.g. lecture takes places each Friday at 4 pm), rooms and instructors attached.
    Data transfer documentation SAP team recently released ("SLCM Data Transfer" archive, "Intro" document, page 18) suggests <b>HRIQ_CREATE_EVENT</b> as a solution. However, after experimenting for a while, I noticed a note attached to this function that "DO NOT USE ANYMORE, USE <b>HRIQ_EVENT_CREATE</b>".
    So which one is the correct/recommended one? Also, if possible, I would prefer an RFC-enabled one.
    Thanks
    Janek

    Hi Janek,
    We've created a custom RFC enabled function module to wrap the SAP function module HRIQ_CREATE_EVENT in.  We are on a 4.7 system.  Here is our code.  Hope it helps.
    FUNCTION zcep_event_create .
    *"*"Local interface:
    *"  IMPORTING
    *"     VALUE(VTASK) TYPE  HRRHAP-VTASK DEFAULT 'V'
    *"     VALUE(EVENTPACKAGEID) TYPE  HROBJID
    *"     VALUE(ACAD_YEAR) TYPE  PIQPERYR
    *"     VALUE(ACAD_SESSION) TYPE  PIQPERID
    *"  TABLES
    *"      MEETING_PATTERN STRUCTURE  ZCEP_MEETINGPATTERN
    *"      EVENT STRUCTURE  ZCEP_EVENT
    *"      RETURN STRUCTURE  BAPIRET2
      DATA: is_schedule TYPE bapisched,
            schedule TYPE bapisched OCCURS 0 WITH HEADER LINE,
            capacity LIKE hri1024,
            wa_capacity LIKE hri1024 OCCURS 0 WITH HEADER LINE,
            location LIKE bapilocdat-locid OCCURS 0,
            new_event_package LIKE p1000 OCCURS 0 WITH HEADER LINE,
            objid  LIKE hrrootob OCCURS 0 WITH HEADER LINE,
            parent LIKE hrhctobjc OCCURS 0 WITH HEADER LINE,
            eventid TYPE hrobjid,
            event_id_out LIKE bapievdat-eveid,
            lt_1739 TYPE TABLE OF p1739,
            ls_1739 TYPE p1739,
            ls_error_record TYPE bapiret2,
            ls_nnnn TYPE wplog,
            open_resources_exits TYPE xfeld.
      DATA:  it_1035 TYPE piq_p1035_t,
             it_pt_1035t TYPE piq_hrt1035_t,
             it_daysoff TYPE piq_pt1035_t,
             it_daysfree TYPE piq_pt1035_t,
             ls_daysfree TYPE pt1035,
             ls_1035t TYPE hrt1035.
      DATA: it_bapiresou TYPE TABLE OF bapiresou,
            is_bapiresou TYPE bapiresou,
            resources TYPE bapiresou OCCURS 0.
      DATA: it_pa0002 TYPE TABLE OF pa0002,
            is_pa0002 TYPE pa0002,
            it_hrp1000 TYPE TABLE OF hrp1000,
            is_hrp1000 TYPE hrp1000,
            lv_dayoff(1),
            bp(12),
            im_begda LIKE sy-datum,
            im_endda LIKE sy-datum,
            sobid LIKE hrp1001-sobid,
            event_counted_dates TYPE dayct,
            event_counted_hours TYPE hrsct,
            ndays TYPE p1035-ndays,
            nhours TYPE p1035-nhours.
      FIELD-SYMBOLS: <ls_1035t> LIKE LINE OF it_pt_1035t.
      CLEAR gt_error_record[].
      SORT event BY short.
      SORT meeting_pattern BY eventname.
    *************************  Get Calender Date  *************************
      SELECT SINGLE begda endda FROM hrt1750 INTO (im_begda,im_endda)
              WHERE peryr = acad_year
                AND perid = acad_session
                AND timelimit = '0100'.
    ***************************  Create Event  ****************************
      LOOP AT event.
        CLEAR resources.
        LOOP AT meeting_pattern WHERE eventname = event-short.
    *********************  Create Schedule for Event  *********************
          CALL FUNCTION 'HRIQ_EVENT_SCHEDULE_BUILD'
            EXPORTING
              plvar                = '01'
              istat                = '1'
              event_begda          = event-begda
              event_endda          = event-endda
              monday               = meeting_pattern-monday
              tuesday              = meeting_pattern-tuesday
              wednesday            = meeting_pattern-wednesday
              thursday             = meeting_pattern-thursday
              friday               = meeting_pattern-friday
              saturday             = meeting_pattern-saturday
              sunday               = meeting_pattern-sunday
              event_beguz          = meeting_pattern-start_time
              event_enduz          = meeting_pattern-end_time
              frequency            = '1'
              event_location       = meeting_pattern-location
            IMPORTING
              pt_1035              = it_1035
              pt_1035t             = it_pt_1035t
              pt_daysoff           = it_daysoff
              pt_daysfree          = it_daysfree
            EXCEPTIONS
              no_date_number       = 1
              frequency_is_initial = 2
              OTHERS               = 3.
          LOOP AT it_daysfree INTO ls_daysfree.
            CALL FUNCTION 'HRIQ_CHECK_MODULOFFER_DAYSOFF'
              EXPORTING
                iv_date             = ls_daysfree-evdat
              IMPORTING
                ev_dayoff           = lv_dayoff
              EXCEPTIONS
                otype_not_supported = 0
                OTHERS              = 0.
            IF lv_dayoff = space.
              MOVE-CORRESPONDING ls_daysfree TO ls_1035t.
              APPEND ls_1035t TO it_pt_1035t.
            ENDIF.
          ENDLOOP.
    * no double entries
          SORT it_pt_1035t.
          DELETE ADJACENT DUPLICATES FROM it_pt_1035t.
          DESCRIBE TABLE it_pt_1035t LINES event_counted_dates.
          CLEAR event_counted_hours.
          LOOP AT it_pt_1035t INTO ls_1035t.
            nhours = ( ls_1035t-enduz - ls_1035t-beguz ) / 3600.
            event_counted_hours = event_counted_hours + nhours.
            ADD 1 TO ndays.
          ENDLOOP.
          LOOP AT it_pt_1035t ASSIGNING <ls_1035t>.
            MOVE-CORRESPONDING <ls_1035t> TO schedule.
            APPEND schedule.
          ENDLOOP.
    *Room
          IF NOT meeting_pattern-room IS INITIAL.
            SELECT SINGLE short stext FROM hrp1000
                     INTO (is_hrp1000-short,is_hrp1000-stext)
                    WHERE plvar = '01'
                      AND istat = '1'
                      AND otype = 'G'
                      AND objid = meeting_pattern-room
                      AND begda LE sy-datum
                      AND endda GE sy-datum.
            SELECT SINGLE sobid FROM hrp1001 INTO sobid
                    WHERE otype = 'G'
                      AND plvar = '01'
                      AND istat = '1'
                      AND relat = '020'
                      AND rsign = 'A'
                      AND sclas = 'R'
                      AND objid = meeting_pattern-room
                      AND begda LE im_endda
                      AND endda GE im_begda.
            IF sy-subrc = 0.
              is_bapiresou-retid = sobid(8).
            ENDIF.
            LOOP AT it_pt_1035t ASSIGNING <ls_1035t>.
              is_bapiresou-resht = is_hrp1000-short.
              is_bapiresou-resxt = is_hrp1000-stext.
              is_bapiresou-resbg = <ls_1035t>-evdat.
              is_bapiresou-resed = <ls_1035t>-evdat.
              is_bapiresou-beguz = meeting_pattern-start_time.
              is_bapiresou-enduz = meeting_pattern-end_time.
              is_bapiresou-resid = meeting_pattern-room.
              is_bapiresou-restp = 'G'.
              APPEND is_bapiresou TO resources.
            ENDLOOP.
          ENDIF.
    * Instructor
          IF NOT meeting_pattern-instructor IS INITIAL.
            SELECT SINGLE nachn vorna FROM pa0002
                     INTO (is_pa0002-nachn, is_pa0002-vorna)
                    WHERE pernr = meeting_pattern-instructor
                      AND begda LE im_endda
                      AND endda GE im_begda.
    **************************  Meeting Pattern  **************************
            SELECT SINGLE objid INTO is_bapiresou-retid FROM hrp1000
                    WHERE plvar = '01'
                      AND langu = 'E'
                      AND otype = 'R'
                      AND mc_short = 'INST-CM'
                      AND begda LE im_endda
                      AND endda GE im_begda.
            LOOP AT it_pt_1035t ASSIGNING <ls_1035t>.
              is_bapiresou-resht = is_pa0002-nachn.
              CONCATENATE is_pa0002-vorna is_pa0002-nachn
                     INTO is_bapiresou-resxt
                SEPARATED BY space.
              is_bapiresou-resbg = <ls_1035t>-evdat.
              is_bapiresou-resed = <ls_1035t>-evdat.
              is_bapiresou-beguz = meeting_pattern-start_time.
              is_bapiresou-enduz = meeting_pattern-end_time.
              is_bapiresou-resid = meeting_pattern-instructor.
              is_bapiresou-restp = 'P'.
              APPEND is_bapiresou TO resources.
            ENDLOOP.
          ENDIF.
        ENDLOOP.
        wa_capacity-kapz1 = event-mincapty.
        wa_capacity-kapz2 = event-optcapty.
        wa_capacity-kapz3 = event-maxcapty.
        capacity = wa_capacity.
        CALL FUNCTION 'HRIQ_CREATE_EVENT'
          EXPORTING
            planversion     = '01'
            event_id_in     = '00000000'
            event_short     = event-short
            event_stext     = event-stext
            status          = '1'
            begin_date      = event-begda
            end_date        = event-endda
            language        = sy-langu
            eventtype       = event-betype
            capacity        = capacity
            location        = meeting_pattern-location
            check_resources = ' '       "'X'
            vtask           = 'B'
          IMPORTING
            event_id_out    = event_id_out
          TABLES
            schedule        = schedule
            resources       = resources
            return          = return.
        IF sy-subrc NE 0.
          CALL FUNCTION 'HRIQ_CLEAR_BUFFER'.
          CALL FUNCTION 'HRIQ_CLEAR_PLOG_TAB'.
          return-type = 'E'.
          return-message = 'Error during save'.
          APPEND return.
        ENDIF.
        LOOP AT return WHERE id = 'HRPIQ000'
                         AND number = '846'.
          return-type = 'E'.
          return-message = 'Resources already in use'.
          APPEND return.
          EXIT.
        ENDLOOP.
    **********************  Create Session offering  **********************
        MOVE-CORRESPONDING ls_nnnn TO ls_1739.
        ls_1739-mandt = sy-mandt.
        ls_1739-plvar = '01'.
        ls_1739-otype = 'E'.
        ls_1739-objid = event_id_out.
        ls_1739-istat = '1'.
        ls_1739-begda = event-begda.
        ls_1739-endda = event-endda.
        ls_1739-aedtm = sy-datum.
        ls_1739-uname = sy-uname.
        ls_1739-infty = '1739'.
        ls_1739-peryr = acad_year.
        ls_1739-perid = acad_session.
        APPEND ls_1739 TO lt_1739.
        PERFORM create_infotype USING lt_1739
                             CHANGING ls_error_record .
        APPEND ls_error_record TO return.
        READ TABLE return  WITH KEY type = 'E'.
        IF sy-subrc <> 0 AND vtask = 'V'.
          CALL FUNCTION 'HRIQ_UPDATE_DATABASE'
            EXPORTING
              vtask          = 'D'
              commit_flg     = 'X'
            EXCEPTIONS
              corr_exit      = 1
              internal_error = 2
              OTHERS         = 3.
          IF sy-subrc NE 0.
            CALL FUNCTION 'HRIQ_CLEAR_BUFFER'.
            CALL FUNCTION 'HRIQ_CLEAR_PLOG_TAB'.
            return-message = 'Error during save'.
            APPEND return.
          ENDIF.
        ELSE.
          CALL FUNCTION 'HRIQ_CLEAR_BUFFER'.
          CALL FUNCTION 'HRIQ_CLEAR_PLOG_TAB'.
          EXIT.
        ENDIF.
    *********************  Create Relationship(E-SE)  *********************
        parent-objid = event_id_out.
        parent-otype = 'E'.
        APPEND parent.
        PERFORM create_relation TABLES parent
                                 USING 'B512'
                                       'SE'
                                       event-begda
                                       event-endda
                                       eventpackageid
                              CHANGING ls_error_record.
      ENDLOOP.
      IF vtask = 'V' AND ls_error_record IS INITIAL.
        PERFORM update_database CHANGING ls_error_record.
      ELSE.
        APPEND ls_error_record TO return.
        CALL FUNCTION 'HRIQ_CLEAR_BUFFER'.
        CALL FUNCTION 'HRIQ_CLEAR_PLOG_TAB'.
      ENDIF.
      DELETE return WHERE type IS INITIAL.
    ENDFUNCTION.

  • How to return error from subscription function of an event

    I am creating a subscription function for an oracle shipped event, oracle.apps.eng.cm.changeObject.submit. The event fires fine, i can do my custom validations in this function. In case the validations fail, I need to return an error message.
    As per the guides and metalink documents, the way to do this is by returning 'ERROR' . But even though I return an ERROR, it does not error out. Whether I return SUCCESS or ERROR , the behaviour is the same.
    While creating the subscription function, for On Error , I selected, "Stop And Rollback ".
    Is it possible to return errors from the subscription functions.
    thanks
    Satya

    You shouldn't be passing ResultSet objects across the EJB layer.
    Instead you should be passing data back and forth.
    All of the data access code should be in one place in one class.
    That class should open the connection, run the query, process/store the results of the query and then close the connection.
    In this case you probably want to return a list of something to your jsp.
    So your EJB call should be more like
    public List<resultBean> check(String id){
      ResultSet rs = Statement.("select * from table1 where id=123");
      List resultList = new ArrayList();
      while (rs.next()){
        Bean myBean = new Bean();
        myBean.setProperty1(rs.getString("field1"));
        myBean.setProperty2(rs.getString("field2"));
        resultList.add(myBean);
      return resultList;
    }

  • Function Modules in Event Linkage

    Dear all,
    In the event linkage of workflow, we can find 3 types of function modules. They are receiver function module, check function module and receiver type function module. Can anybody explain what are they used for?
    Thanks + Best Regards
    Jerome

    Hi Jerome,
    Explanation for each of the FM's(Receiver Fm, Check FM, Receiver Type FM).
    <b>1) Receiver Function Module.</b>
    This is the main function module which will actually link the Object Event and Workflow Or Task.
    Ex Event : BUS2012.ReleaseStepCreated
         Workflow : WS20000075
        FM : ZReceiver.
    An Entry in SWE2(Event linkage) with above values Does mean "The workflow WS20000075 will start when Event BUS2012.ReleaseStepCreated is triggered with the help of ZReceiver ".
    All Receiver Function Module should have standard interface(Same input and table parameters specified by SAP).
    <b>2)Check Function Module</b>
    This function module is used to prevent the event linkage.
    It is called <b>before the Receiver Function</b> Module is being called.
    Lets take the above ex:
    Ex Event : BUS2012.ReleaseStepCreated
         Workflow : WS20000075
    In this case if you want to do some checks before actually linking the  BUS2012.ReleaseStepCreated and WS20000075 using Receiver Function Module then you can use Check function module to do validation and raise the Exceptions.
    If any exceptions are raised in the Check function module then The Receiver Function module will not be called hence no EVent Linkage.
    <b>3) Receiver Type Function Module</b>
    This is the <b>First function module</b> to be called among three if it is specified in SWE2.
    This Function module is used to find the Receiver type Dynamically. ie if you have not specified the reciever type(Workflow or Task) in SWE2 you can determine that at runtime using this Function module.
    Reward if its helps. Feel free to ask for clarifications.
    Thanks
    Praveen

  • How to call this function in onload event

    Hi All,
    I would like to call this function on page load, how to achieve? Thanks in advance.
    var siteUrl = '/sites/MySiteCollection';
    function retrieveListItems() {
    var clientContext = new SP.ClientContext(siteUrl);
    var oList = clientContext.get_web().get_lists().getByTitle('Announcements');
    var camlQuery = new SP.CamlQuery();
    camlQuery.set_viewXml('<View><Query><Where><Geq><FieldRef Name=\'ID\'/>' +
    '<Value Type=\'Number\'>1</Value></Geq></Where></Query><RowLimit>10</RowLimit></View>');
    this.collListItem = oList.getItems(camlQuery);
    clientContext.load(collListItem);
    clientContext.executeQueryAsync(Function.createDelegate(this, this.onQuerySucceeded), Function.createDelegate(this, this.onQueryFailed));
    function onQuerySucceeded(sender, args) {
    var listItemInfo = '';
    var listItemEnumerator = collListItem.getEnumerator();
    while (listItemEnumerator.moveNext()) {
    var oListItem = listItemEnumerator.get_current();
    listItemInfo += '\nID: ' + oListItem.get_id() +
    '\nTitle: ' + oListItem.get_item('Title') +
    '\nBody: ' + oListItem.get_item('Body');
    alert(listItemInfo.toString());
    function onQueryFailed(sender, args) {
    alert('Request failed. ' + args.get_message() + '\n' + args.get_stackTrace());

    Try modifying as
    <script language="javascript" type="text/javascript">
    var siteUrl = 'http://mysite/sites/';
    $(document).ready(function()
    //Call your function here like
    ExecuteOrDelayUntilScriptLoaded(retrieveListItems,"SP.js");
    function retrieveListItems() {
    var clientContext = new SP.ClientContext(siteUrl);
    var oList = clientContext.get_web().get_lists().getByTitle('Project_Issues_and_Risks');
    var camlQuery = new SP.CamlQuery();
    // camlQuery.set_viewXml('<View><Query><Where><Eq><FieldRef Name=\'Project_x0020_Code\'/>' +
    // '<Value Type=\'Lookup\'>NGI-P1</Value></Eq></Where></Query><RowLimit>10</RowLimit></View>');
    // <Query><Where><And><IsNotNull><FieldRef Name="ID" /></IsNotNull><IsNotNull><FieldRef Name="Title" /></IsNotNull></And></Where></Query>
    camlQuery.set_viewXml('<View><Query><Where><And><Eq><FieldRef Name="Project_x0020_Code" /><Value Type="Lookup">NGI-P1</Value></Eq><Eq><FieldRef Name="Project_x0020_Issue_x0020_Status" /><Value Type="Choice">Issue</Value></Eq></And></Where></Query></View>');
    this.collListItem = oList.getItems(camlQuery);
    clientContext.load(collListItem);
    clientContext.executeQueryAsync(Function.createDelegate(this, this.onQuerySucceeded), Function.createDelegate(this, this.onQueryFailed));
    function onQuerySucceeded(sender, args) {
    var listItemInfo = '';
    var close = '';
    var open = '';
    var listItemEnumerator = collListItem.getEnumerator();
    while (listItemEnumerator.moveNext()) {
    var oListItem = listItemEnumerator.get_current();
    listItemInfo += '\nID: ' + oListItem.get_id()+
    '\nTitle: ' + oListItem.get_item('Close')+
    '\nBody: ' + oListItem.get_item('Open');
    close = oListItem.get_item('Close');
    open = oListItem.get_item('Open');
    alert(close);
    alert(listItemInfo.toString());
    function onQueryFailed(sender, args) {
    alert('Request failed. ' + args.get_message() + '\n' + args.get_stackTrace());
    </script>
    <input id="Button1" type="button" value="Retrieve Data" OnClick="retrieveListItems()" />
    Geetanjali Arora | My blogs |

  • Problem with calling a function through onclick event in a tag

    Hi All,
    I have a text which should act as a link.
    On click of this text i need to display the table in the same page.
    this is how i want to do
    !<_ a     !st y l e='cursor pointer' h_ r  ef ='  #' !o n cl ick = " l o a dtc () "  _> display table _<  /  _a  _ >
    !<   % if i_ref = ' X' % _>
    !<   !h t m lb : t a bleVi ew id =" tv_vbak " tabl e= <  %  = it_vbak  % _ >
    !< s_c rip  t t y p e  =   "te  xt/ja  v a s c r ipt" >
    !f unct io n lo a dt c ()
    i_ref='X'.
    !<  _/ s c r i pt _>
    here am setting a flag and if that flag is set i will display the table.
    Please ignore the unewanted characters in my code. i was not able to paste the code directly.
    Thanks,
    Sandeep
    Edited by: SandeepReddy on May 25, 2010 9:22 AM

    Hi Sandeep,
    are you using javascript to get the link in the text view?
    i will tell u onething clearly.
    if you are using javascript in ur code, debugging will not wrk properly , what you need to do is add the alert in between so that you can know whether that particular code is wrking or not ok. 
    2) to call the javascript from the textview or the inputfield you have a attribute called onClientClick you need to call the function there and implement that function in javascript.
    <htmlb:textView text   = "<%= i_str %>"
                            design = "EMPHASIZED"
                            onClientClick = loadtc() />
    add ur javascript code ok
    cheers
    Bhavana
    Edited by: Bhavana Amar on May 25, 2010 10:25 AM

  • Missing Calendar Function for PRIVAT Events

    Hi,
    can't set an event as privat. How can this be done. Don't like to make this visible in our company.
    I'm syncing to exchange via Air.
    Thx
    HW

    I just bought and synced my iPhone yesterday - same issue. I noticed that all the exceptions in my recurring appointments dropped the notes. If I changed the note itself, or the date of one of the recurrences, it deleted the note entirely. I tried deleting the series and recreating and then syncing and editing, but still the same issue. I can't find anything on the web or in the forums.

Maybe you are looking for

  • My laptop crashed, how do I get my folders and everything from my laptop to my desktop firefox?

    My laptop crashed. I am trying to get the information, files, favorites, ects. to my desktop. How do you do this?

  • Adobe Premiere Elements 8 keeps crashing...need IMMEDIATE help?

    I have re-installed multiple times, had our companies IT department re-install the video card and do multiple clean installs to no avail. Any and all help woild be much appreciated.

  • Captivate 5 Quiz pass and fail issues

    Hi all, Still new and working with Captivate 5 (Win7 OS). I have a project with five quiz questions at the end. The goal is for the learner to have to pass the quiz to continue and the passing score required is 80%. I am allowing three tries at the q

  • Ringtones for Iphone 4

    can't find the duplicate version of my shortened song for the ringtone. It used to work for Iphone 3, I don't know what happened. My import settings are set for AAC, I don't know what's wrong. How can I get those settings back? When I click "convert

  • Long pauses between gapless playback tracks

    Hi, I'm using iTunes 8.2 in Leopard PPC on an iMac G4. I'm experiencing annoying pauses between songs on albums that have gapless playback enabled. The pauses typically run for about 30 seconds, during which iTunes is totally unresponsive. I'm pretty