View Complete Thread | FoxWeb Forum Home
Date:    Msg ID:   
From:    Thread:   
mmm, i don´t speak english very well, but i try to help you.
When your code is execute by the browser, it only write HTML formatted text that say the word myscript.fwx?Row=4.
in th bottom of your code Paste this :
<script language="JavaScript" type="text/JavaScript" id="Loader">
all right, this is JavaScript TAG called "Loader"
then, when you need to run some FWX code on WebPage without to another page, execute a JavaScript function like this :
<script language="JavaScript" type="text/JavaScript">
function callpage(thisNum)
   document.all.Loader.src = 'myscript.fwx?Row=' + thisNum
In order to verify this, you´ll need to create a FWX named myscript.fwx and you can make an easy example as :
***** Code of myscript.fwx


It´s easy

Lic. Eloy Marroquín
From Monterrey, México



Sent by Joe Bigelow on 05/25/2003 10:05:39 AM:

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
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 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