Link to home
Create AccountLog in
Avatar of tangteng78
tangteng78Flag for Malaysia

asked on

How to check for postback using javascript?

Hi,
Is there a way to check for postback in Javascript, just like in ASP.NET that uses the page_load events (see below)?
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
 
           If Not Page.IsPostBack Then
                'DO something here, if page is not postback
           End If
End Sub

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of contactkarthi
contactkarthi
Flag of United States of America image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer