Is it possible to create a (yes/no) javascript messagebox from code-behind, and also retrieve the return values?
I would like to set the content of a session object based on the client Yes/No.
The idea is to use this approach for redirecting iphone clients from my default web page.
“Do you want to go the iphone version of this site?”
–YES Redirect to “iphone” default page, and set a session object to avoid asking this question again if default page is requested again
within the lifespan of the session object.–NO Set a session object to avoid asking this question again if default page is requested again within the lifespan of the session
object.
Just display the message and set an appropiate cookie. Then make your server-side react to the cookie and render the selected version of the site.
http://www.htmlite.com/JS006.php – Javascript Confirm popup
http://www.w3schools.com/js/js_cookies.asp – Javascript cookies