I'm using Javascript in PDF-XChange Editor to post information to a web service where it is read using php. It's all working great except I can't work out how to successfully post my data in the body of the post, using the oRequest parameter, and read it using php on the server. The only thing I could get to work is posting in the header using a redundant header field (I picked PRAGMA). This is obviously far from ideal.
This is my Javascript triggering the post (I want to use oRequest but instead have to use aHeaders):
postData = app.trustedFunction(function(f) {
app.beginPriv();
var urlStr = "http://mywebsite.com/postdata.php"
Net.HTTP.request({
cVerb: "POST",
cURL: urlStr,
// oRequest: util.streamFromString(JSONstr),
aHeaders:[{ name: "PRAGMA", value: syncs[f].JSONstr }],
oHandler: ajaxCallback
});
app.endPriv();
});
This is my php on the server (I want to use the first line, but have to use the second):
// $dataPOST = file_get_contents('php://input');
$dataPOST = $_SERVER['HTTP_PRAGMA'];
Is there something I'm doing wrong here?
Posting data using Javascript Net.HTTP
Moderators: TrackerSupp-Daniel, Tracker Support, Paul - Tracker Supp, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan
-
- User
- Posts: 6
- Joined: Wed Feb 06, 2019 1:44 am
- Ivan - Tracker Software
- Site Admin
- Posts: 3550
- Joined: Thu Jul 08, 2004 10:36 pm
- Location: Vancouver Island - Canada
- Contact:
Re: Posting data using Javascript Net.HTTP
There was an issue with handling oRequest parameter in Editor's code.
We have fixed this issue and the fix will be available in the next build.
We have fixed this issue and the fix will be available in the next build.
Tracker Software (Project Director)
When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
-
- User
- Posts: 6
- Joined: Wed Feb 06, 2019 1:44 am
Re: Posting data using Javascript Net.HTTP
Hi Ivan,
That's great! Thanks for the help. I'll download the next build when it's available.
Mark
That's great! Thanks for the help. I'll download the next build when it's available.
Mark
- Will - Tracker Supp
- Site Admin
- Posts: 6815
- Joined: Mon Oct 15, 2012 9:21 pm
- Location: London, UK
- Contact:
Re: Posting data using Javascript Net.HTTP
If posting files to this forum, you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded.
Thank you.
Best regards
Will Travaglini
Tracker Support (Europe)
Tracker Software Products Ltd.
http://www.tracker-software.com
Thank you.
Best regards
Will Travaglini
Tracker Support (Europe)
Tracker Software Products Ltd.
http://www.tracker-software.com
-
- User
- Posts: 6
- Joined: Wed Feb 06, 2019 1:44 am
Re: Posting data using Javascript Net.HTTP
Hi,
My company is looking to buy the corporate global pack of PDF-XChange Editor Plus, but having this fix implemented is necessary prior to making the purchase. When do you expect the new build with the fix will be released?
Thanks
My company is looking to buy the corporate global pack of PDF-XChange Editor Plus, but having this fix implemented is necessary prior to making the purchase. When do you expect the new build with the fix will be released?
Thanks
- TrackerSupp-Daniel
- Site Admin
- Posts: 8613
- Joined: Wed Jan 03, 2018 6:52 pm
Re: Posting data using Javascript Net.HTTP
Hello Marksanders,
We are hoping to release the next build close to the end of this month, give or take a few days for fine tuning. I hope that is not too long of a wait for you.
Kind regards,
We are hoping to release the next build close to the end of this month, give or take a few days for fine tuning. I hope that is not too long of a wait for you.
Kind regards,
Dan McIntyre - Support Technician
Tracker Software Products (Canada) LTD
+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
Tracker Software Products (Canada) LTD
+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
-
- User
- Posts: 6
- Joined: Wed Feb 06, 2019 1:44 am
Re: Posting data using Javascript Net.HTTP
Hi Daniel,
No, that's great. I'll come back and check for it then.
Thanks,
Mark
No, that's great. I'll come back and check for it then.
Thanks,
Mark
- Will - Tracker Supp
- Site Admin
- Posts: 6815
- Joined: Mon Oct 15, 2012 9:21 pm
- Location: London, UK
- Contact:
Re: Posting data using Javascript Net.HTTP
If posting files to this forum, you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded.
Thank you.
Best regards
Will Travaglini
Tracker Support (Europe)
Tracker Software Products Ltd.
http://www.tracker-software.com
Thank you.
Best regards
Will Travaglini
Tracker Support (Europe)
Tracker Software Products Ltd.
http://www.tracker-software.com