Date:  05/03/2007 12:44:17 PM Msg ID:  003412
From:  FoxWeb Support Thread:  003407
Subject:  Re: java script from foxweb
So if I understand you correctly, you want to be able to trigger a call to some javascript code, without forcing the user to click on a button, right?  You can do this via the OnLoad event in the body element:
<body OnLoad="PrintMyData()">
As soon a the page is fully loaded, it will call the PrintMyData function.
FoxWeb Support Team email
Sent by Wonmi KOh on 05/02/2007 02:01:47 PM:
I am sorry. I described only the part I am interested in so it must have given you the hard time.
Basically I want to print out the label from the web program. I have a java script that connects to the specific printer and sends the job to that printer.
In order to do this, I created a form in test.htm to get the request  from user. When a user enters information at the form it calls test.fwx. From test.prg, it connects to the database and get the right information that will be printed on the label.
Now I have to call javascript to print the label from test.prg. From test.prg, if I send the output to output.htm and put this javascript in this output.htm it works. 
But this output.htm is redundant for users. I am not familiar with javascript so I am using as it is, for example I am using <INPUT TYPE="BUTTON" NAME="PrintBtn" VALUE="Print Label" OnClick="PrintBtnClicked()"> to run javascript PrintBtnClicked(). So a user has to push the button again on this ouput.htm page to print the label. Any better idea?
Sent by FoxWeb Support on 04/30/2007 02:47:58 PM:
I'm having a hard time understanding your question.  Can you please be a bit more specific about what you are trying to do?
FoxWeb Support Team email
Sent by Wonmi KOh on 04/30/2007 01:35:58 PM:
I call foxweb to open database and find the value from main html page. Then I need to run javascript to work with this value. How can I do this?
I can call html from foxweb and put this javascript on this html. But I don't want to open another html page only to run javascript. Can I call javascript from foxweb?