help needed

K

kalyan

Hi All

I have two pages say page 1 and page 2...on clicking a button in
page-1...i mean during page sumbit...page 2 is called and some 100
records are inserted into database...then after the process page2 is
redirected to page1 and a message is displayed in page 1 like
"Insertion Completed"..

now after the submit click in page-1 i have to open up an window
showing the record number inserted like "Record 1 inserted"..."Record
2 inserted"..etc...

can anybody help me how to achieve this via javascipt..


earlier help is highly appreciated..

Thanks & Regards
Kalyan
 
K

kouPhax

now after the submit click in page-1 i have to open up an window
showing the record number inserted like "Record 1 inserted"..."Record
2 inserted"..etc...

My suggestion isn't JavaScript related but surely hitting the DB 100+
times sounds completely crazy. Why would you not push all the app
layer data to the database and let it do all the grunt work. It'll
generally be much more performant than having to go back and forward
so many times. Many DB's will allow you to send XML or CSV data sets
to stored procedures to achieve this. Obviously you won;t get
constant feedback that you want but maybe you NEED that because of all
the time wasted doing atomic calls to the DB.

James
 
E

Evertjan.

kalyan wrote on 06 jul 2010 in comp.lang.javascript:
I have two pages say page 1 and page 2...on clicking a button in
page-1...i mean during page sumbit...page 2 is called and some 100
records are inserted into database...then after the process page2 is
redirected to page1 and a message is displayed in page 1 like
"Insertion Completed"..

now after the submit click in page-1 i have to open up an window
showing the record number inserted like "Record 1 inserted"..."Record
2 inserted"..etc...

can anybody help me how to achieve this via javascipt..


This clearly is a serverside question,
as your database surely resides on the server.

Did you mean serverside javascript?

earlier help is highly appreciated..

Google is your friend for earlier answers,
we can only comment after you ask the OQ.
 
K

kalyan

kalyan wrote on 06 jul 2010 in comp.lang.javascript:




This clearly is a serverside question,
as your database surely resides on the server.

Did you mean serverside javascript?


Google is your friend for earlier answers,
we can only comment after you ask the OQ.

I can get the response for each record from DB via XMLHTTP and can
assign it to a variable in javascript...i tried 2 refresh this script
in the pop window using meta refresh...but it doesn't work..any other
ideas...
 
E

Evertjan.

kalyan wrote on 06 jul 2010 in comp.lang.javascript:

[please do not quote signatures on usenet]
I can get the response for each record from DB via XMLHTTP and can
assign it to a variable in javascript

You could, but why use messy serverside solutions that are easily done
serverside?
...i tried 2 refresh this script

[This is not SMS, please use ordinary language and only uusenet
abbrivations.]
in the pop window using meta refresh...but it doesn't work..any other
ideas...

How can we say if you just say "doesn't work"?

Why would you want to refresh a javascript script?

If you refresh a html page with javascript all clientside variables are
lost but the cookies.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top