Announcement

Collapse
No announcement yet.

Javascript in PHP events

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

  • Javascript in PHP events

    To work with Javascript inside PHP events you should use an "echo" from PHP to call a script tag.

    example:

    echo "<scrip>alert('Testing Javascript in PHP events');</script>";

  • #2
    Re: Javascript in PHP events

    Hi Vitor,

    the Syntax is not correct (as well as in the most procedures, that are created with the sc_macro-wizzard):

    echo "<script>alert('Testing Javascript in PHP events');</script>";

    Changed "<scrip>" to "<script>"...

    regards,

    Steffen

    Comment


    • #3
      Re: Javascript in PHP events

      Thanks Steffen, a "t" was missing.



      echo "<script>alert('Testing Javascript in PHP events');</script>";

      Comment


      • #4
        Re: Javascript in PHP events

        Hi Vitor,
        Same way JS inputbox can be used in SC v5.1

        var answer = prompt ("What is your age?","20");
        alert ("You are " + answer + " years old.")

        advise
        Regards
        Dhana

        Comment

        Working...
        X