0

I have the following javascript.

<SCRIPT SRC="http://www.world66.com/export/export.js" LANGUAGE="JAVASCRIPT"></SCRIPT>


<SCRIPT Language="JavaScript">  
Header_Color = "Black";
Header_Size = "5";
Header_Face = "arial,helvetica";    
Nav_Color = "Black";
Nav_Size = "4";
Nav_Face = "arial,helvetica";   
Body_Color = "Black";
Body_Size = "4";
Body_Face = "arial,helvetica";  
printGuide('mauritius','someemail@somwehere.com');
</Script>

I want to preferably use CFSAVECONTENT to save the output of the javascript. Can someone please assist?

  • 1
    Javascript is client side. ColdFusion is server side. There is no clean way to do this. I supposed you could run NodeJS and have ColdFusion interact with that. Would you should do is consider what `http://www.world66.com/export/export.js` is doing and just start doing that in ColdFusion – James A Mohler Jun 23 '16 at 14:57
  • I have had a look at the .js but can't figure out how to get the result. – Marthinus Strydom Jun 23 '16 at 15:03
  • 2
    Pop in a JS handler that takes the output (innerhtml or whatever) and AJAX posts it to another CF action. If you can't just do it in CF to begin with for some reason. – Nikki9696 Jun 23 '16 at 15:45
  • What have you have tried so far? If you have not tried anything yet, it looks like the function calls a url with some parameters. Start with cfhttp and construct a call with the parameters named in the script. If you run into errors, post back with your current code and any error messages. – Leigh Jun 23 '16 at 19:08

0 Answers0