<HTML><BODY STYLE="font:10pt verdana; border:none;"><DIV>Yes you can.</DIV> <DIV>it is very common to use array in linear way</DIV> <DIV>x = new array(25, 18,12,8,5,2, 120,100,80,39,400,420....)</DIV> <DIV>y = new array(....................some array values...........)</DIV> <DIV><BR> </DIV> <DIV><BR></DIV> <BLOCKQUOTE style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px"> <DIV style="FONT: 10pt Arial">----- Original Message -----</DIV> <DIV style="BACKGROUND: #e4e4e4; FONT: 10pt Arial; FONT-COLOR: black"><B>From:</B> TomMallard</DIV> <DIV style="FONT: 10pt Arial"><B>Sent:</B> Thursday, April 05, 2001 10:57 PM</DIV> <DIV style="FONT: 10pt Arial"><B>To:</B> javascript@LaTech.edu</DIV> <DIV style="FONT: 10pt Arial"><B>Subject:</B> Re: [Javascript] Passing data</DIV> <DIV><BR></DIV>This is a backend question...you'll need to read the file and build the<BR>array there as a web service or save a file with it for static data. A<BR>webservice can be wrapped around the array builder function to make the data<BR>available to the client page as a stream. It's worth it for so much data for<BR>web applications to reduce the over-the-wire size, so keep working on this.<BR><BR>Most services are coded as dll's or cgi's and have url's like<BR>http://www.domain.com/some.dll?methodName. Then on your client you set a<BR>javascript variable equal to this address to populate it. Also consider an<BR>xml file be created on the server and then an xmldom.open can create it on<BR>the client to use it in a similar way...<BR><BR>tom<BR>----- Original Message -----<BR>From: "Steve White" <steve@VirtualMechanics.com><BR>To: <javascript@LaTech.edu><BR>Sent: Thursday, April 05, 2001 1:33 PM<BR>Subject: RE: [Javascript] Passing data<BR><BR><BR>> Thanks, I will take a look at it.<BR>><BR>> I understand the security problem which is why I was asking if JS has a<BR>file<BR>> read operation. As it is I am simply looking for a way to pass data in<BR>more<BR>> more compact form than a long ASCII list of array assignments. Instead of<BR>><BR>> array[0].x = 22;<BR>> array[0].y = 12;<BR>> array[1].x = 10;<BR>> array[1].y = 5;<BR>> array[2].x = 200;<BR>> array[2].y = 120;<BR>> ..... and so on for 1 or 2 meg<BR>><BR>> or can I find a way to do:<BR>> 22,12 10,5 200,120 ...and so on for 1 or 200k and then parse it after the<BR>> onload event. ( better still as a binary stream)<BR>><BR>> Thanks<BR>><BR>> Steve White<BR>> www.VirtualMechanics.com<BR>> www.DHTMLMagic.com<BR>> www.SVGMagic.com<BR>> www.IMSWebTips.com<BR>><BR>><BR>> -----Original Message-----<BR>> From: javascript-admin@LaTech.edu [mailto:javascript-admin@LaTech.edu]On<BR>> Behalf Of BEKIM BACAJ<BR>> Sent: Wednesday, April 04, 2001 8:28 PM<BR>> To: javascript@LaTech.edu<BR>> Subject: Re: [Javascript] Passing data<BR>><BR>><BR>> THis is what I assked you to be more precize for.<BR>> Because if I understod well, You wan't datda to be read from another<BR>file<BR>> and to be displayed on youre current page. That is my friend a security<BR>> problem that has been very well solved and currently is unbreakable unles<BR>> you use some ASP activity, and even some remote Db that is safe. You can't<BR>> brake the security protocol.<BR>> I have had the same problem and it took me a whole month to find some<BR>way<BR>> to display newr data in the current window withour having to refresh or<BR>> reload the page, correction: moving to another page. The problem was how<BR>to<BR>> read the data (content) of some <DIV> or <LAYER> object into this page<BR>from<BR>> another separate file, and pass it as innerText for instance. There is no<BR>> simple solution, or no solution at all. But there is a simple work-around.<BR>> Pease visit the link above<BR>> http://www.dardaniaonline.com/members/trojani2000/<BR>> You will find a simple Test of dinamicity. And how i solved this problem<BR>> for IE. /it has a little bug but it works after the second click/<BR>> After you view the page go in you're tempIntFolder and find JavaSripts<BR>> asociated you have the names in the bottom of the referencial<BR>> script tags in the page.<BR>> <script language="JavaScript" id=Fili src=""> !<BR>> </script><BR>> <script src="anima.js"></script><BR>> <script src="paleta.js"></script><BR>> <script src="pullat.js"></script><BR>> <script src="dinamika.js"></script><BR>> <script src="lokatori.js"></script> !<BR>> And also the text files named Fajlli.txt with prefix 1, 2, 3, if you try<BR>> to find them with Find files and folders plese specify for example<BR>> anima[1].js or for the text file 1Fajlli[1].txt; That are written and<BR>> named like JS strings.<BR>> And if you have any further question, ask!<BR>><BR>><BR>><BR>> ----- Original Message -----<BR>> From: Steve White<BR>> Sent: Wednesday, April 04, 2001 7:31 AM<BR>> To: javascript@LaTech.edu<BR>> Subject: RE: [Javascript] Passing data<BR>><BR>><BR>> < The problem to know what is you're aim here What do you wan't to do<BR>> exactly?<BR>> <<BR>><BR>> Its graphics and animation data to be used with JavaScript functions<BR>> that drive DHTM and SVG (Scalable Vector Graphics). It is probably a lot<BR>> like Flash and we will output to that as well but I assume Flash uses its<BR>> own encoding/decoding format. There is really no limit to how much data<BR>you<BR>> could have so compacting it as much as possible is important. At this<BR>point<BR>> we don't want to get into streaming but I suppose there is no reason why<BR>the<BR>> data could not be sent in packets. At the moment just putting it into a<BR>file<BR>> (could even be in the HTML or SVG file if that makes sense) and then using<BR>a<BR>> standard JavaScript operation to read it. Decoding or parsing should not<BR>be<BR>> a problem for us if we can find and read it.<BR>><BR>> Thanks<BR>><BR>> Steve White<BR>> www.VirtualMechanics.com<BR>> www.DHTMLMagic.com<BR>> www.SVGMagic.com<BR>> www.IMSWebTips.com<BR>> -----Original Message-----<BR>> From: javascript-admin@LaTech.edu<BR>> [mailto:javascript-admin@LaTech.edu]On Behalf Of BEKIM BACAJ<BR>> Sent: Tuesday, April 03, 2001 5:58 PM<BR>> To: javascript@LaTech.edu<BR>> Subject: Re: [Javascript] Passing data<BR>><BR>><BR>> Hi, Steve!<BR>> The problem to know what is you're aim here<BR>> What do you wan't to do exactly?<BR>> Yes you can put anything in a .txt file. But how do you load it, and<BR>> what type of data do you need.<BR>> JS has a FileSysObject that can read files, and also write to files.<BR>> The split is a command used in strings, why do you need it for?<BR>> Be more specific!<BR>> Regards<BR>><BR>><BR>> ----- Original Message -----<BR>> From: Steve White<BR>> Sent: Tuesday, April 03, 2001 11:37 PM<BR>> To: javascript@LaTech.edu<BR>> Subject: RE: [Javascript] Passing data<BR>><BR>><BR>> I am not familiar with Split() but I assume that it is some type<BR>of<BR>> string<BR>> parser. If so the problem I am trying to figure out is how do I<BR>pass<BR>> the<BR>> data? If I have a SCRIPT in a HTML file how do I include the code<BR>or<BR>> can I<BR>> just put it in a .txt file and read it. Does js even have a Read<BR>> File<BR>> operation?<BR>><BR>> I need to get a good reference book.<BR>><BR>> Thanks<BR>><BR>> Steve White<BR>> www.VirtualMechanics.com<BR>> www.DHTMLMagic.com<BR>> www.SVGMagic.com<BR>> www.IMSWebTips.com<BR>><BR>> -----Original Message-----<BR>> From: javascript-admin@LaTech.edu<BR>> [mailto:javascript-admin@LaTech.edu]On<BR>> Behalf Of TomMallard<BR>> Sent: Tuesday, April 03, 2001 2:23 PM<BR>> To: javascript@LaTech.edu<BR>> Subject: Re: [Javascript] Passing data<BR>><BR>><BR>> If you used ASCII and kept your key=value pairs it would make<BR>> parsing it out<BR>> on the client pretty simple with split().<BR>><BR>> Just a thought,<BR>><BR>> tom<BR>> ----- Original Message -----<BR>> From: "Ian Turner" <ian.turner@romseyassoc.com><BR>> To: <javascript@LaTech.edu><BR>> Sent: Tuesday, April 03, 2001 9:26 AM<BR>> Subject: RE: [Javascript] Passing data<BR>><BR>><BR>> > Certainly the latter is possible. Though your parsing routine<BR>> might be<BR>> > complex and therefore large in its own right.<BR>> > It could be done as a server side include file or by putting a<BR>> string into<BR>> > the HTML file.<BR>> ><BR>> > All the best<BR>> > Ian<BR>> ><BR>> > -----Original Message-----<BR>> > From: javascript-admin@LaTech.edu<BR>> [mailto:javascript-admin@LaTech.edu]On<BR>> > Behalf Of Steve White<BR>> > Sent: 03 April 2001 16:47<BR>> > To: javascript@LaTech.edu<BR>> > Subject: [Javascript] Passing data<BR>> ><BR>> ><BR>> > We generate large graphic data structures to be processed by our<BR>> included<BR>> js<BR>> > code. I would like to reduce the size of the data as much as<BR>> possible.<BR>> ><BR>> > Instead of passing the data as variable assignments it would be<BR>> better to<BR>> > pass it as binary or if that is not possible at least as a<BR>> sequence of<BR>> ASCII<BR>> > values. So instead of:<BR>> ><BR>> > Mctl[2][0].dis=0;<BR>> > Mctl[2][0].cout=43431132;<BR>> > Mctl[2][0].rgb1=33593818;<BR>> > Mctl[2][0].rgb2=10066329;<BR>> > Mctl[2][0].lwid=0;<BR>> > Mctl[2][1] = new Array();<BR>> > Mctl[2][1].sclx=1.00;<BR>> > Mctl[2][1].scly=1.00;<BR>> > Mctl[2][1].rot=-91.00;<BR>> > Mctl[2][1].tim=363;<BR>> > Mctl[2][1].dis=238;<BR>> > Mctl[2][1].cout=43431132;<BR>> ><BR>> > I could do something like:<BR>> ><BR>> > 0,<BR>43431132,33593818,10066329,0,1.00,1.00,91.00,363,238,43431132;<BR>> ><BR>> > Can JavaScript be used to read an attached binary or ASCII file?<BR>> Or could<BR>> it<BR>> > be included within the SVG/HTML document as a huge string and<BR>then<BR>> parsed<BR>> > following the onload event?<BR>> ><BR>> > Thanks<BR>> ><BR>> > Steve White<BR>> > www.VirtualMechanics.com<BR>> > www.DHTMLMagic.com<BR>> > www.SVGMagic.com<BR>> > www.IMSWebTips.com<BR>> ><BR>> ><BR>> > _______________________________________________<BR>> > Javascript mailing list<BR>> > Javascript@LaTech.edu<BR>> > http://www.LaTech.edu/mailman/listinfo/javascript<BR>> ><BR>> ><BR>> > _______________________________________________<BR>> > Javascript mailing list<BR>> > Javascript@LaTech.edu<BR>> > http://www.LaTech.edu/mailman/listinfo/javascript<BR>> ><BR>><BR>><BR>> _______________________________________________<BR>> Javascript mailing list<BR>> Javascript@LaTech.edu<BR>> http://www.LaTech.edu/mailman/listinfo/javascript<BR>><BR>><BR>> _______________________________________________<BR>> Javascript mailing list<BR>> Javascript@LaTech.edu<BR>> http://www.LaTech.edu/mailman/listinfo/javascript<BR>><BR>><BR>><BR>><BR>> --------------------------------------------------------------------------<BR>--<BR>> --<BR>> Get Your Private, Free E-mail from MSN Hotmail at<BR>http://www.hotmail.com.<BR>><BR>><BR>><BR><BR><BR>_______________________________________________<BR>Javascript mailing list<BR>Javascript@LaTech.edu<BR>http://www.LaTech.edu/mailman/listinfo/javascript<BR> <DIV></DIV></BLOCKQUOTE></BODY></HTML><DIV><BR><br clear=all><hr>Get Your Private, Free E-mail from MSN Hotmail at <a href="http://www.hotmail.com">http://www.hotmail.com</a>.<br></p></DIV>