Reload HTML Area

Questions and answers for designing and implementing forms in Servoy

Reload HTML Area

Postby winnie » Wed Jan 23, 2013 11:14 am

We have a html area on a TabPanel with the form variable "vHtml" as dataProvider.
In the onAction-Event of a button we set the value of vHtml with
vHtml = plugins.file.readTXTFile("c:\\test.txt")

The area does not show Html-Data.
If we reload the page (F5) the data is shown.
Do you have a solution to reload the html area correctly without pressing F5?

Here is the content of "c:\test.txt"

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<title>
Google Visualization API Sample
</title>
<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script type="text/javascript">
google.load('visualization', '1', {packages: ['charteditor']});
</script>
<script type="text/javascript">
var wrapper;

function init() {
wrapper = new google.visualization.ChartWrapper({
dataSourceUrl: 'https://spreadsheets.google.com/spreadsheet/tq?key=tnxuU73jT7eIL-aZke85e3A&pub=1&range=A1:E13',
containerId: 'visualization',
chartType: 'LineChart'
});
wrapper.draw();
}

function openEditor() {
// Handler for the "Open Editor" button.
var editor = new google.visualization.ChartEditor();
google.visualization.events.addListener(editor, 'ok',
function() {
wrapper = editor.getChartWrapper();
wrapper.draw(document.getElementById('visualization'));
});
editor.openDialog(wrapper);
}


google.setOnLoadCallback(init);

</script>
</head>
<body style="font-family: Arial;border: 0 none;">
<input type='button' onclick='openEditor()' value='Open Editor'>
<div id='visualization' style="width:600px;height:400px">
</body>
</html>
winnie
 
Posts: 14
Joined: Thu Jul 07, 2011 6:41 pm

Re: Reload HTML Area

Postby sanneke » Mon Aug 05, 2013 3:40 pm

Are you using plugins.file.readTXTFile in the webclient? This will read the file of the server. Is this what you want?
Sanneke
Yield Software Development: Need help on your project?
yieldsd.com
User avatar
sanneke
 
Posts: 383
Joined: Thu Jun 15, 2006 9:20 am
Location: Amersfoort

Re: Reload HTML Area

Postby jcompagner » Mon Aug 05, 2013 3:41 pm

first of all doing:

vHtml = plugins.file.readTXTFile("c:\\test.txt")

that in a webclient? Thats weird, so on the server (windows) you know that there is a file c:\test.txt ??

But changing a value to another value should update the htmlarea.
If that is not the case then make a case, but don't send in a case with such a strange readTXTFile
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8833
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet


Return to Forms

Who is online

Users browsing this forum: No registered users and 5 guests

cron