javascript - How to prevent iframe load event? -


i have iframe , couple of tables on aspx page. when page loads these tables hidden. iframe used upload file database. depending on result of event have show particular table on main page (these tables have "retry","next" buttons...depending on whether or not file uploaded have show respective button).

now have javascript on "onload" event of iframe hiding these tables start with. when control comes after event show particular table. iframe loads again , tables hidden. can 1 me problem. don't want iframe load second time.

thanks

mmm said you're on aspx page, suppose iframe postback, reload page. if can't avoid postback, you've set flag on main page before posting back, , check against while you're loading...

...something like:

mainpage.waittillpostback =  true yourfunctioncausingpostback();   ..  onload=function(){ if(!mainpage.waittillpostback){ hidetables(); } mainpage.waittillpostback = false; } 

Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -