• Post Reply Bookmark Topic Watch Topic
  • New Topic

Unable to write .Js file in the client machine

 
Saravanamuthu Krishnan
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All,
We have a requirement wherein data retrieved from the database needs to be written to a .js file and stored in the client machine. This is to achieve optimum performance. When i try to access the site from the same machine that hosts the webserver the file gets written and I m also able to read values from the written file thro' client-side Javascript. But when I attempt to load the site from a different machine, the file doesn't get written on the client machine. Any suggestions.

ALso request your comments on the following..
Which is the best way to handle multiple page reultsets.
1. Assuming 10 is max-number of records to be displayed- retrieve the first 10 records for the first page and when "NEXT" is pressed get the next 10 from the database and so on (or by using cachedRowSet).
2. Write data to a .js file and read its contente from client-side Javascript.
3. Store the retrieved values in a client-side Javascript variable.

Regards,
SM
 
Ajay Krihnamurthy
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi saravana,
For the you have to use the paging logic for your problem.
The paging Logic is

recno = (PageNumber * NumberOfRecordsPerPage)+1;

so using the rs.absolute(recno);
you can directly fetch the n'th record from the ResultSet..

regards
Ajay krishnamurthy
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65530
108
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
These are two very different questions that should each be asked in in their own topic.

Question #1: you can't write to the client system. Imagine the mayhem caused by viruses that would ensue if you could.

Question #2: had been asked many times before. Search through this forum for previous discussions.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!