• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Unable to write .Js file in the client machine

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Sheriff
Posts: 67756
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic