Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

php - Check if user hits back button in browser -


i'm trying use javascript onbeforeunload event ask user if want exit page, don't want event fire (edit: "the event" being dialog box pops asking user click ok leave site or click cancel stay on current page) if user hits button since staying on site.

so there way tell if user has hit button using javascript or php?

i've gotten solution using hidden iframe works in ie, need can work firefox, chrome, , safari if possible.

edit: ie solution works because when user hits button iframe sent parent page remains @ same spot. can tell user has indeed hit button, use history.back(). little hack doesn't work in other browser (to knowledge), i'm looking cross-browser solution.

tl;dr i'm using window.onbeforeunload pop dialog asking users if want leave site or not. don't want pop when user hits button. how can tell user has hit button in browser?

thanks, rick

short answer:

no.

long answer:

noooooooooooooooooooooooooooo.

please don't try keep users on website unless have very reason to. saving form fields example of use. checking if they're moving on website bad use.

people don't travel page-to-page as did in days of web. instead use google , social networks find interesting pages, , consume separate distinct pieces of information.


Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -