Detect Form Submission

K

kevin.upchurch

Is there anyway to detect whether there has been a postback to the page
with Javascript?

I have a page where it usually does a window.location.reload(), but
when the page is posted to asked if you want to re-post the page. The
function only has to work for IE.

What I need is something like this


function MyFunction(){
if (window.method=="post")
DoPostBack();
else
window.location.reload();
}
 
T

Thomas 'PointedEars' Lahn

Is there anyway to detect whether there has been a postback to the page
with Javascript?

Yes.
Server-side: check out the collection of posted items.
Client-side: pass something distinguishable in the query component
and use the location.search property.


PointedEars
 

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
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top