3.2.0

how can i do activewidget programming with out "textarea id"

<script>if(window.site) site.example("grid1");</script>


here "grid1" is the textarea id .
how can i programme with out this textarea field or i just dont want to display that text area in GUI ..


help me.
shaan1
February 9,
Your request is vague. What exactly do you want to accomplish? Are you trying to have a grid that is not displayed to the user? Give us a little more information and we'll see what we can do for you.
Jim Hunter
February 9,
<html>
<head>
<title>ActiveWidgets Tutorial</title>
<link href="C:/Documents and Settings/shankarnag1/Desktop/widgets/site.css" type="text/css" rel="stylesheet" />
<script src="C:/Documents and Settings/shankarnag1/Desktop/widgets/site.js"></script>
</head>
<body class="tutorial">
<script>document.write(window.$header)</script>
<div class="image-home">
</div>
<div class="location">:: Documentation &gt;&gt; Tutorial &gt;&gt; Grid &gt;&gt;
</div>
<h1>
Loading XML data.
</h1>
<p>
Lets look how to load simple XML data into the grid.
</p>
<p>
Here is the XML:
</p>
<iframe src="C:/Documents and Settings/shankarnag1/Desktop/widgets/simple.xml" style="HEIGHT:200px">
</iframe>
<p>
To load and transform XML data you need an XML table model.
</p>
<pre>var table = new Active.XML.Table;</pre>
<p>
Assign a URL of the XML file.
</p>
<pre>table.setProperty("URL", "simple.xml");</pre>
<p>
By default the model looks at the documentElement as the data root.
Then all child elements of the root are treated as rows and
the child elements of each row node become the table cells.
Exactly as this simple example looks like.
</p>
<p>
Just load the file.
</p>
<pre>table.request();</pre>
<p>
After the grid object is created
</p>
<pre>>var obj = new Active.Controls.Grid;
obj.setProperty("column/count", 5);</pre>
<p>
it is assigned our new external data model.
</p>
<pre>obj.setModel("data", table);</pre>

<p>
Don't forget to write the grid HTML to the page as usual.
</p>

<pre>document.write(obj);</pre>

<p>
Full script:
</p>

<textarea id="grid1" type="hidden" wrap="off" style="HEIGHT:200px" target="height:300px">

var table = new Active.XML.Table;
table.setURL("simple.xml");
table.request();

var obj = new Active.Controls.Grid;
obj.setProperty("column/count", 5);
obj.setModel("data", table);

document.write(obj);

</textarea>
<script>if(window.site) site.example("grid1");</script>
<script>document.write(window.$column)</script>
<script>document.write(window.$tutorial)</script>
<script>document.write(window.$footer)</script>
</body>
</html>
----------------------------------------------------

q1)any possibility to hide that text area... that is displaying on screen
------------------------------------------------------------
----------------------------------------------------------


For eg i am using the above code


in the above code the core thing is "text area"

we are passing that text area id in to

site.example();

the line that is doing is


<script>if(window.site) site.example("grid1");</script>



what i want is i dont want to display the text area
-------------------------------------------------------------------
q2)

and if possible,i dont want to pass the text area id to that function

site.example();
--------------------------------------------------------
---------------------------------------------------
how i can do this






help me plz


shaan1
February 10,
The examples which run inside tutorial pages allow changing javascript code interactively from within the web page. Most likely you don't need this if you just want to have the grid with some data on your page.

Look at the /examples/grid/ directory in the distribution package - it contains several simple examples how to use the grid with different data sources.
Alex (ActiveWidgets)
February 10,

This topic is archived.

See also:


Back to support forum