Announcement

Collapse
No announcement yet.

How call a method php from a button javascript

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

  • How call a method php from a button javascript

    Hi, i have a form and i need when a user click on a button type javascript, it call a method php and return a value.
    thanks you..
    Does exists a macro in sc for that? or How can i do it?
    Last edited by alvagar; 08-16-2014, 06:58 PM.

  • #2
    Is possible do it? does exits a macro SC for this case?

    Comment


    • #3
      No afaik there's no macro for that. In fact what you are trying to do is just a standard ajax event. You click on a javascript button, and then you need to communicate to the server and get a value back. Should be doable not not with the standard scriptcase components. But I'm not a javascript guru so if it's possible then someone else might react.
      Albert Drent
      aducom software netherlands
      scriptcase partner, reseller, support and (turn-key) development
      www.scriptcase.eu / www.scriptcase.nl

      Comment


      • #4
        Ok. Albert Thanks you. I will test others options with javacript and ajax.

        Comment


        • #5
          Hi,

          I used workaround for it:

          1. Try to create blank application with yours PHP code with return value at the end (e.g. as [var_global_value]) (out)
          2. in JS code: 2a) send header to: yours_blank_app_http_path, 2b) {value} = [var_global_value] (in)

          daretzki
          Last edited by daretzki; 08-20-2014, 07:05 AM.

          Comment

          Working...
          X