Results 1 to 2 of 2
  1. #1
    Member
    Join Date
    Dec 2009
    Location
    athens
    Posts
    14

    on field missing error on javascript execution

    Hi
    i use with lightstreamer version 4 the code below
    to change the image to a user field #arrow

    if (updateInfo.isValueChanged("p_last")) {

    var val = updateInfo.getNewValue("p_dif");
    if (val.indexOf("-") > -1) {
    updateInfo.addField("#arrow",imgDown);
    } else {
    updateInfo.addField("#arrow",imgUp);
    }

    }

    with version 5 Colosseo it is possible with StaticGrid to change image for a field up/down !?

    and in version 5 the arrow field is without # is this important !!!??
    because i have some calculated fields , like #value = quantity * last_price
    i have to use DynaGrid or it is posible with StaticGrid !!??


    with the code below the images with StaticGrid are not changing

    //put arrow and handle change style
    var pctChange = info.getChangedFieldValue("p_chng");

    if (pctChange !== null) {
    pctChange = formatDecimal(pctChange,2,true)+"%";
    hotTxtCol = (pctChange.charAt(0) == '-') ? "#dd0000" : "#009900";
    if (pctChange.indexOf("-") > -1) {
    info.setCellValue("#arrow",imgDown);
    info.setCellAttribute("#arrow",cold,cold,"backgrou ndColor");

    info.setCellAttribute("p_chng","black",hotTxtCol," color");
    info.setCellValue("p_chng",pctChange);
    } else {
    info.setCellValue("#arrow",imgUp);
    info.setCellAttribute("#arrow",cold,cold,"backgrou ndColor");

    info.setCellAttribute("p_chng","black",hotTxtCol," color");
    info.setCellValue("p_chng","+"+pctChange);

    }
    info.setCellAttribute("p_chng","bold","bold","font Weight");
    }

  2. #2
    Administrator
    Join Date
    Feb 2012
    Location
    Milano
    Posts
    716
    Hi betasec,

    This question has already been discussed in this thread.
    Did you mean to ask a different question?

 

 

Similar Threads

  1. getting field value directly via javascript
    By pluczak in forum Client SDKs
    Replies: 1
    Last Post: April 3rd, 2012, 10:36 AM
  2. Item vs Field
    By nickponico in forum General
    Replies: 1
    Last Post: March 1st, 2010, 10:38 AM
  3. Replies: 1
    Last Post: November 2nd, 2009, 05:55 PM
  4. Replies: 1
    Last Post: August 27th, 2007, 12:24 PM
  5. StocklistConnectionListener missing
    By sukhdev in forum Client SDKs
    Replies: 2
    Last Post: July 20th, 2007, 06:44 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT +1. The time now is 09:18 AM.