Navigating to a different page based on a timer in MVC2 - asp.net-mvc-2

I was hoping that I could be able to send a user to a different page if they have not executed any functions in a certain time frame. Is there some kind of timer that I can execute to accopmlish this?
Thanks,
Derek

You could use the jQuery idle plugin.

Related

Can I use deep linking in flutter as a trigger?

I am deep linking into my app, or at least trying to. Let's make a fictional example:
// my clock app
myapp://timer?102seconds
If I understand deep links correctly, they kind of work like URLs on websites. Go to the page described in the link. This I don't need and honestly I don't think it would work even. I have a few screens on the App which I want to be able to be called like a Trigger.
In the example above I want the app to receive timer?102seconds, so that my app itself can
-be opened with the uri
is it a timer or a stopwatch or an alarm
if it is a timer, how long should it be
push the timer page on the navigator
give the bloc the info of time that I need here
I am not sure how possible that is, but it is the easiest way I can imagine implementing this here. Thanks!
If you use Firebase Dynamic Links you can encode another link, from which you can extract data. Check out this link to see documentation on how to do that.

how to show eclipse console in my jsp page?

I have a method in action page, it will take more time to execute so I have write some description on console window. But now i want to show the description on text area in jsp page. how to show like as console.
Two possible solutions are the "execAndWait" interceptor and using ajax.
Execute and Wait will be the easier to implement but will present less functionality...
http://struts.apache.org/2.3.4.1/docs/execute-and-wait-interceptor.html
Ajax can provide continuous feedback of the state of the request (although managing that feedback is entirely up to you and it will typically require you to think in terms of services, one page will typically make use of multiple services).
For this you will not have to worry about the amount of time it takes your action to return because it is being called asynchronously. You could even make a queue showing how many request you've sent and pop them off as they are received.
To implement ajax services it is easiest to start with json and for that see the struts2-json-plugin http://struts.apache.org/2.2.3/docs/json-plugin.html

How does the Notice Area on Facebook works?

How does the notification area on Facebook works?
I'm taking about the automatically red box that appears.
If I have a message/something new on my wall.
I believe it is also in Stack Exchange, is that a Javascript interval?
Please see this thread
How does one do realtime updates of a web page?
Not sure about this, but I'd wager that both Facebook and SO use an implementation of Comet. Basically, you make a request to the server which is designed to be kept open a really long time, and the server only responds when it has something to say. When the request times out (or receives data back) you simply start up another one. This way you get as close to real-time data as you can without wasting a ton of bandwidth on empty requests.

Server Real Time on Website

I would like to grab the time (something like): 16:08 from the server - and display it on the website real time. (Like, each minute do the update, and display the new time.
I'm not sure however, what would be a good way for accomplish this nor if there is any nice plugin that I should be aware of. :D
Can I have some insights about the possibilities here?
I'm using PHP and I can use Jquery as library.
Thanks a lot,
MEM
Use Javascript and set a timer for every minute. Have the timer call a function that uses Ajax to call the correct page on the time server which gets the time and then have the Javascript replace the existing time.
You could also just get the actual time from the server when you load the page, then use Javascript to increment the minute/hour section appropriately by using a timer that 'ticks' every minute.
If the problem is just to display the time you can use Date.getTime() javascript function.
But if you want to get the time from the server and display it to the client you can use an ajax request using JQuery.

iPhone: How to Implement a HTML Welcome Panel

I'd like to integrate something like a welcome panel (welcome screen) into our iPhone application to inform our users about updates and new offers when they launch the application. I have the following thoughts and doubts:
No user input required
Shows generic HTML without any action from the user point of view, the thing closes after 2 or 3 secs and has a close button if you want to close it manually. This is for advertising and tips.
This should be very simple to implement
User input required
Shows generic HTML with an action required from the user point of view, for example a survey. The user should be able to skip it
same as above, but is it possible that the user submits something on a HTML page and that causes also something to happen within the iPhone app (maybe via Java Script)? For example the user submits a survey on the HTML page and then app closes the current screen and continues to the next screen (i.e. the real application)?
Is it also possible to receive parameters (e.g. an ID) via a HTML website? e.g. if the user receives an offer on the HTML welcome panel, then he clicks on it and it takes him directly to a screen in the iPhone app with content loaded from a server (via JSON) depening on the offer id retrieved through the HTML page.
We prefer implementing it via HTML, because it gives us more flexibility. But I'm also open to hear other suggestions.
Thanks
Rengers answer is the correct one to accomplish what you want. However, the real correct answer is "Don't do that in the first place."
From a design perspective, a "Welcome Panel" or any kind of startup/splash-screen is a bad idea and the Apple Documentation tells you explicitly not to use them. Even for games, they're a bad idea that should be avoided if possible.
It's not a "Welcome Panel" it's a "wade-through-all-our-marketing-crap-before-you-can-actually-use-our-app" panel.
Mobile apps aren't like apps for regular platforms. Non-mobile hardware is faster so the obtrusive startup screens load faster and can be dismissed faster. Non-mobile apps tend to accomplish many task and people use them sitting down for prolonged periods. Users will tolerate a few seconds wasted clicking through startup screens so they can get into an app they will use for many minutes or even hours.
By contrast, mobile apps are often used by people on the go and in a hurry. The apps are small and ideally perform a single task. As quickly as possible, people need to be able to get into the app, perform what ever task the app accomplishes and then get back out again. If you're only using an app each time for 30 seconds or so, having to spend 5 seconds each time wading through startup screens is massively annoying.
Mobil hardware is slower and operations can take longer. Depending on its complexity and resources an app can take as much as 10 seconds to launch. In your case you want to add to a startup screen that has to load, connect to a url, display and then have the user perform an operation. That will take another 5-10 seconds minimum. So you're looking at users having to spend 20 seconds or more just getting into your app.
That doesn't sound like much but try mocking up your app and then using it on the go i.e. while walking, waiting for an elevator, going up the stairs, waiting for a red light etc. Test it in social situations. In the middle of conversation say, "Let me check on that" then take out the iPhone launch your app and try to get some information from it. 20 seconds becomes a very long time in all these circumstances.
Even shorter launch times are very annoying if you have to take some action every single time you open the app just to get to the functional part of the app. It's arguably even worse to spring a startup screen on them intermittently so they never know when they open your app how long it will take to get in it. User surprise is not good design.
Instead of forcing users to do something, you should embed advertisements and update notices unobtrusively in the app itself so that people can see them while they are using the app. In the case of advertising, this has the added advantage of putting the adds in view the entire time the user is looking at the app.
I don't know how many times some idiot from marketing has come in and started a feature request with, "We need to force the user to..." The only response to those types of request is to set the marketing weeny on fire. Do that several times and they'll stop trying to systematically alienate your customers.
UIWebViewDelegate has a method that allows you to respond to interaction in a HTML page:
- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType
Using this, you can catch any links clicked and respond to them in your application by presenting a different view.
Recieving parameters like an id can be done in a few different ways.
1) You can parse the HTML and determine it from the source.
2) You can have a javascript function in the HTML that returns the id. Call it by using
- (NSString *)stringByEvaluatingJavaScriptFromString:(NSString *)script
3) You can also use the delegate method I mentioned.
If you make a link like this: get offer you can catch it in the delegate and retrieve the id from the NSURLRequest.
I hope this will point you in the right direction.
If you do need some kind of startup screen a good option is to use the default.png. The app loads and displays that image before it does anything else.
It's usually used to display the illusion of the user interface before the UI loads completely. However, you could use it to display startup information. Since it displays almost instantly (within 1 sec) it does give your user something to look at while the app loads. In the case of a mock interface, it lets the user see the location of the interface elements and begin moving to activate them before the elements finish loading.
The catch is that the image disappears as soon as the first view loads so you have to load a view behind it that is a duplicate of the image (more ofter the image is screenshot of the view)
In your case you would need to dynamically generate the default.png when the web page updated. Upon launch it would display the information and buy the time the user read it, made a decision and touched the interface, the real web page would have replaced it.
Of course, this system won't work if you want new info at the start of each launch. Instead you'll have to generate the image during one run for use in the next.
In any case, if you launch into a web page the user did not select, I advise that you create a default.png that displays a message along the lines of "Checking for Updates and Info" (or whatever your doing) so the user won't think your app launched and hung.