[WB21] - Call a URL from a button

Startbeitrag von JP am 20.07.2016 16:16

Hi All

WB21 - Classic site with Ajax

I have a button which executes some server side code and then I want it to execute a URL somewhere else. I don't need anything to be returned from the URL called and there is no user display for it. It is just a script I want to run which is in a different language. I will pass it some parameters and then it must just do whatever it does. Is this possible?

Antworten:

Hi JP

of course it's possible...

httprequest is your friend

Best regards

von Fabrice Harari - am 20.07.2016 16:43
Hi Fabrice

Yes, I knew it even - was too code-blind to think straight :) My question is this though - will this function wait for a response from the URL called or will it continue with code execution immediately? I ask because I want to make the call and ignore any reply.

In any case, I have thought of a simpler solution in the meantime but I am curious about the above.

von JP - am 21.07.2016 07:07
Yep, it will wait... I do not think that there is any function calling a URL and NOT waiting for the answer (how would you know if your url is even correct?).

But if you found a way, I'm curious :-)

Best regards

von Fabrice Harari - am 21.07.2016 12:27
Fabrice,

Sorry, I don't have a solution to calling a URL but not have to wait for the reply :) I meant I have thought of another way of doing what I need to do. Thanks for the feedback!

von JP - am 21.07.2016 14:13
I just had an idea, if it's really important:

- you create a small windev program
- it receives the URL in the command line
- it does the httprequest
- you call it from your webdev code without waiting for its end

and hop, it's done

von Fabrice Harari - am 21.07.2016 18:13
Fabrice,

Yes, that is basically what I did. The called program does a few other things as well.

von JP - am 21.07.2016 19:01
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.