Hey Friends, after a FORM POST to WCB.PHP, would you know of a method to convert, what appears to be a JSON response into a JAVASCRIPT object? Is this possible?
Hey Tom, I’m not, no. I’m using a very simple form that only takes in the phone number and sets a static id which I append to the POST. It works great, and I do receive what I assume is a JSON response from the PBX - “{“Response”:“Success”,“Message”:“Originate successfully queued”}” so I’m looking for a way to extract the response and assume I can do that with $.parseJSON() function, then write in some PHP to pop up a message. Might be easy for you, but we are all at different levels of understanding and learning. Thanks for your response!
Tom, I’m just posting it directly:
I do. The response stays in the same pop-up window I had designed and put together for accepting the phone input. I hit the Call button, it established the call, when I hang up the JSON appears, in the same window.
I hear you. But working with the form on the pbx means I have to find a way to submit the id value from the local form the server. Is this what you are suggesting?
Tom, I have tried that, but I do get a CORS error. The server isn’t accepting the data. Did you suggest at one time wrapping the DIV FRAME element in a FORM?
#frame { background-image: url('/admin/modules/webcallback/assets/images/c2c-1.png'); background-repeat: no-repeat; background-size: 200px; height: 65px; cursor: pointer; cursor: hand; } #webcallbackinput { position: relative; left: 66px; top: 30px; width: 125px; }Perfect, back to the drawing board. I understand this in principal, let me look research this a see if I find a solution. Thanks for your response, Tom, appreciate it!
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.