Announcement

Collapse
No announcement yet.

Message script type='text/javascript'> not SHOWN at all ????

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Message script type='text/javascript'> not SHOWN at all ????

    Dear all,

    I got a BUTTON with Php code.
    I'm doing the check if rows exist in order to show messages
    If 1 --> Create rows
    If 2 --> Message 'No rows available....'

    Why I see only echo "I AM HERE "; and nothing about <script type='text/javascript'>alert
    It's strange becouse if I'm not wrong it worked... (I'm running 8.1 now)

    //Check rows
    $sql_check_div = "SELECT IF( EXISTS( SELECT * FROM products_selected_rfq WHERE CustomerID= 'glo_CustomerID' ) , '1', '2' )";
    sc_lookup(my_data, $sql_check_div);
    $result_sql = {my_data[0][0]};

    if ($result_sql == 2)
    { echo "I AM HERE ";
    echo "<script type='text/javascript'>alert('Non ci sono righe da elaborare - Selezionarne almeno un prodotto !\nThere are not rows to be elaborated - Select at list a product first !');</script>";
    // sc_exit(sel);
    }
    else
    {
    echo "<script type='text/javascript'>alert('Attenzione ora verrą creata una RDO che comprenderą tutte le righe selezionate\nTutte le righe dei prodotti precedentemente selezionate verranno poi cancellate\n\nAttention, now it will be create an RFQ which will contain all rows selected \nAll row previously selected will be deleteted');</script>";
    //sc_exit(sel);
    ....
    ....

  • #2
    Don't know right now, but if you will show an alert in all situations, use the same button context.
    Change button to show on modal.
    Do echo "Non ci sono righe da elaborare - Selezionarne almeno un prodotto !<br>There are not rows to be elaborated - Select at list a product first !"; // changed \n by <br>
    Don't add sc_exit.

    Result "it's the same"
    /Giuseppe

    Professional Scriptcase Services
    Some Customers opinions

    Comment


    • #3
      Hi Giu,
      after three testing hours set on DESPERATION... mode I founded the LIGHT !!
      It was only a sintax problem ..... UMBELIEVABLE for me loosing all that time for a message !!!

      In this version all works as expected. Your suggestion are good the same !!!

      $sql_check_div = "SELECT IF( EXISTS( SELECT * FROM `products_selected` where CustomerID = 'glo_CustomerID' ) , '1', '2' )";
      sc_lookup(my_data, $sql_check_div);
      $result_sql = {my_data[0][0]};

      if ($result_sql == 2)
      {
      echo '<script>alert("Non ci sono righe da elaborare - Selezionarne almeno un prodotto !\nThere arenow rows to be elaborated - Select at list a product !");</script>';
      sc_exit(sel);
      }
      else
      {
      echo '<script>alert("Attenzione ora verrą creato un ordine che comprenderą tutte le righe selezionate - Tutte le righe dei prodotti precedentemente selezionate verranno poi cancellate\n\nAttention, now it will be create an Order which will contain all rows selected \nAll row previously selected will be deleteted");</script>';
      //sc_exit(sel);

      Comment


      • #4
        In your query replace 'glo_CustomerID' with '[glo_CustomerID]'
        -----------------------------------------
        Arthur Klisiewicz
        dATA POINT SOFTWARE
        www.datapointsoftware.com

        Comment


        • #5
          Ok. Thanks

          Comment

          Working...
          X