Date:  05/25/2003 10:05:39 AM Msg ID:  001461
From:  Joe Bigelow Thread:  001461
Subject:  Calling FW Script from within JavaScript
Ok, I'm having another problem. Trying to describe the situation in brief, I'm working on creating a DHTML web page that contains a presentation that is actually generated by a foxweb script. The foxweb script returns text, actually HTML, but text, not a full page, something like:
 
"<table><tr><td>something or other</td></tr></table>"
 
To accomplish the DHTML the web page generates <div></div> to contain the presentation through a javascript. This is necessary for cross platform compatability. The JavaScript does something like this:
 
document.write('<div name="whatever" id="whatever">' + HtmlStr + ;</div>')
 
The problem I'm running into is the JavaScript varialbe HtmlStr. By looking lower in this forum I noticed some code you posted and have tried it:
 
HtmlStr = 'myscript.fwx?Row=' + row;
 
(with "row" being another JavaScript variable which we will set to "4" for the purpose of this question)
 
In an answer to Gene Gerard, subject 'JS variable to FP variable' you gave this syntax saying it would "Dynamically creates a URL that points to script MyScript.fwx and includes totPrice in the queryString as a field named "cost"."
 
So, my JavaScript looks like:
 
var row = '4';
var HtmlStr = 'myscript.fwx?Row=' + row;
document.write('<div name="whatever" id="whatever">' + HtmlStr + '</div>')
 
What I get on the screen is
 
whatever.fwx?Row=4
 
instead of the results of the script. In fact, the script is never executed, still sits on the server as an uncompiled fwx. I realize that there is a slight difference in what I am doing in that I am trying to save the results of the FWX to a memory variable instead of redirecting the browser as was the case in Gene's question, but I should think the syntax and execution logic is the same?
 
Any ideas or suggestions? If you want to see all the code and the action it is online at www.hvnet.com/features/riverboating.htm. Needless to say, this is rough and early in the development of this page. Trying to test the functionality before I go too far. Thanks in advance,
 
Joe Bigelow
HV/Net
www.hvnet.com