• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

cfhttp and javascript

New Here ,
Dec 11, 2006 Dec 11, 2006

Copy link to clipboard

Copied

Hi I need to call a page "as if it were by a web browser" which means that the Javascript in the page must be interpreted.

I use a JS tag which provides me statistics about the command process on my website (how many display the shopping cart, how many fill the adress form, ...) (same process as google analytics)
At the end I need to make the visitors display a page with the javascript tag inside to retrieve the information "ok the order has been paid and is xyz dollars".
As I use an external payment system (like paypal for example), there is no page called at the end of the process.
- the client can stay on the bank page that says "ok your order has been paid" and never come back on my site
- The bank calls a page on my server to say "ok the order number abcd has been paid" ... in this page I can do whatever I want like calling a page using cfhttp...

So I tried to call a page where I have my JS tag... too bad It returns raw html and does not interpret the Javascript.
I tried to embed the page in a flashpaper cfdocument... but nothing new... it still doesn't work.

I have no solution to change the Javascript called by my tag (hosted on another server, not managed by me ; the tag use javascript variables (url parameter, screen resolution...so it couldn't be changed by something else))
So I really need a way to (server side) call a page and makes it interpreted like a web browser do.

Some Suggestions ?
TOPICS
Advanced techniques

Views

1.0K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Dec 12, 2006 Dec 12, 2006

Copy link to clipboard

Copied

LATEST
When the server uses CFHTTP, it simply sends an http request to a host and receives a response. As you noted, this is data in ASCII text format. As a programming language designed to be executed by a browser, JavaScript would be hard to interpret on your server. It uses variables and commands specific to the browser environment (screen resolution, windows, back/forward, etc.). Is there some other way you can approach your problem?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation