on 2004 Oct 18 8:42 AM
I am trying to add an error-page to my BSP-application.
is there a way to check which browser (and version) the user uses?
i would like to show a error page for all users that don't use IE..
Hi Daniel,
in event handler or controller try
CALL METHOD request->GET_USER_AGENT
IMPORTING
user_agent_type = user_agent_type
user_agent_version = user_agent_version.
Also see cl_bsp_login_application->check_browser for a coding example.
regards,
Ulli
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Daniel,
I'm not really sure if I understand what your problem is.
What do you mean with "normally shown .."?
Brian has once written a weblog about messages handling(/people/mark.finnern/blog/2003/09/16/bsp-in-depth-message-statement-handling). If this isn't what your looking for, then give a little example, what you'd expect to display.
regards,
Ulli
Hi Daniel,
I wouldn't recommend to manipulate http status codes in cases where you want to give feedback to the user regarding supported browser versions and types. Either you leave it completely to the server (I suppose WebAS gives some messages in case htmlb/xhtmlb etc. isn't supported) or you render your self-defined error page with a meaningful message.
regards,
Ulli
no, if you access a htmlb-page with another browser (e.g. mozilla), a shortdump is being generated and a "standard" http500 page is shown.
my plan was to add a try/catch somewhere on my startpage, catch that error, show an error-page if the error occurs, check in the error-page if the user really uses a different browser and show the "normal" error page otherwise.
would you recommend that?
Might be more work than you need.
In your login mask you can do a simple JavaScript check for the browser type and redirect as needed for a browser that doesn't work and to the login for one that does.
You can also give them a link to proceed to the login anyway as some browser/people hide the actual browser type they use or they use a browser that gives a strange type but is IE compliment and would work anyway.
User | Count |
---|---|
66 | |
10 | |
10 | |
10 | |
10 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.