No announcement yet.

OnClick event on grid application do nothing once clicked

  • Filter
  • Time
  • Show
Clear All
new posts

  • OnClick event on grid application do nothing once clicked

    Hi all,

    I've a grid and I've added some OnClick events on several fields and icons (html fields).
    I find really strange that all prepared functions/samples code on the right are ALL reds ....

    Also adding code into the editor area when I click on field or on icon nothing happens.
    The only way is inserting a link but it's not my willing.

    Am I doing mistakes ??
    Attached Files

  • #2
    Hi all,
    anybody has a hint for this problem ?? Htlm image fields are not viewed by OnClick event --> Is it the sentence ??

    The alternative is to use link under the field image and connect to a blank application.
    In this case wich is the best way in order to run only the code and don't have problems with opening windows or with using sc_redir ??


    • #3
      You see it red because right pane are snippet of PHP code and you are into a JS event.

      About your other doubt, could be interesting to know what exactly are you trying to achieve.

      Professional Scriptcase Services
      Some Customers opinions


      • #4
        Hi Giu,
        I have an HTLM image field but I can't use it under on Ajax events becouse SC do not see it on the list of available fields of OnClick ...
        My willing is to have the possibility to run a PHP code once clicked the icon image
        In simple words I have to add quantity inserted by user to a selected_product table in order to trasfor it later into an RFQ or and ORDER

        Something like that:
        [order_date] = date('Y-m-d');

        $sql_insert_selected = "
        INSERT products_selected
        (ProductID, CustomerID, ProductName, SupplierID, CategoryID, CompanyID, SelectedDate, Quantity, UnitPrice , ProductID_altern)
        ('[glo_ProductID]', '[glo_CustomerID]', '[glo_ProductName]', '[glo_SupplierID]' ,
        '[glo_CategoryID]', '[glo_CompanyID]', '[order_date]' , [glo_Quantity_row], [glo_UnitPrice], '')
        ON DUPLICATE KEY UPDATE Quantity = Quantity + [glo_Quantity_row]";

        sc_exec_sql( $sql_insert_selected );

        On other post Hiram has suggested a solution out of the SC box too.


        • #5
          2 things. My mistake, don't know exactly why bullets are red, I don't use this snippets.

          Check this screenshots.



          Professional Scriptcase Services
          Some Customers opinions


          • #6
            OK Thanks Giu,
            If I can only use JS on code area how can I do the SQL command I wrote below ?
            Is it possible changing the sintax or it's not allowed ?