I'm creating a webapp for Android mobile phones with ASP.NET and the Ajax Control Toolkit.
I've included a CalendarExtender-Control which popups a calendar when focusing the associated Textbox-Control.
If I select this textbox on my mobile phone, the Android webbrowser highlights it with an orange border. The problem is that this border is shown in front of my Calendar popup. Has anybody any idea how to fix this issue?
Thanks!
Puh...that behavior is done by the Android OS on all input fields. It doesn't depend on your web application and I doubt you have a possibility to disable this behavior, at least for sure not through your web application.
As a workaround, have you tried to use an additional calendar button and make the date picker just pop up if you click on that calendar button? For sure less usable, but it might work.
Related
I'm writing a process to alert the users when their session is about to end. I want a popup window (or alert) to appear, and I've got that much working, but more importantly I want them to be alerted even when their browser is in the background - either by having the popup come right to the foreground - on top of any other application, Or having their browser window flash in the taskbar.
Any ideas or suggestions how to do this? Is there maybe a property of the AJAX popup extender that controls this?
Thanks,
Paul
You can't put a popup in front of another application, however you can make the tab / title "blink" until they take notice.
Take a look at this solution https://stackoverflow.com/a/156274/935779
It is a JavaScript solution that may help.
A modal popup would be best for this. You don't need AJAX as you're not posting to the server.
Are you using jQuery? If so you can quickly and easily set up a timer which shows a modal dialogue box when the time expires.
On each page load, or on specific user actions you can reset the timer.
As for having the browser flash in the taskbar, I don't believe that's possible.
My calendar extender from the Ajaxtoolkit is sometimes being blocked by nearby dropdownlist controls.
My company uses asp.net 2.0 and IE6 (I know... it sends shivers down my spine too), and at certain scroll positions the problems occurs.
When it is at correct scroll points the calendar pops up at an acceptable distance away from other controls such as dropdownlists.
I'm not sure if newer versions have this problem but is there a way to avoid it with my current versions? Preferably the popup calendar covers other controls instead of the other way around.
Upgrading is not an option.
This is a very annoying issue that I ran into as well; my company had IE 6 for the longest time.
Even if you set the z-index on the calendar item to be above that of the drop down list, it will still be blocked by the drop down lists below it (ie6 rendering issue).
The 3 options that I know of are:
1 - Use custom drop down lists
2 - overload the render for the calendar to include an iframe layer behind the calendar itself; the iframe will cover all the other elements
3 - use javascript (preferable jquery) to insert the iframe on the client side
Hopefully someone else can provide better options.
The bgiframe jQuery plugin was made exactly for those issues.
Is there a way prevent an ASP gridview from always relying on javascript for the edit and delete LinkButtons? If I disable javascript in my browser the edit and delete commands still seem to link to "javascript: _doPostBack". (I'm using VB and .NET framework 2.0)
Thanks in advance.
You could implement the edit and delete buttons yourself using an <asp:TemplateField>. Then you are free to have them do the postback however you like, with <input type=submit> buttons, perhaps.
You are limited to smaller subset of controls when Javascript is not available. See MSDN. The postbacks function conveys to the runtime what was clicked and that is how the server side events are triggered. If you really want to develop an app without Javascript support, you will have to stay away from most server controls. The rendering is fine but any interaction (like editable grid) would be one of those controls to stay away from. You might also want to look into ASP.NET MVC framework.
I wanna have, when a user clicks an button, the screen should go black and in the middle should be a new webpage.
I know this is very often used for Images, but I know it is possible with webpages too.
How is the name of this feature and how I can get it for my asp.net page?
Are you talking about a "Lightbox" effect ?
http://line25.com/articles/rounding-up-the-top-10-jquery-lightbox-scripts
Modal window
ASP.NET AJAX Toolkit has the ModalPopup control,
Or can use many jquery plugins (ThickBox for example).
I'm looking for a calendar control (AKA date-picker) that works on mobile devices. The problem is most devices are without JavaScript, or with poor JavaScript support.
ASP.NET's built-in control uses JavaScript to do post-backs. ASP.NET has a mobile calendar control, but it isn't fully localizable (on low-end devices where it displays a step-by-step date picker, its buttons are always in English).
I am thinking of overriding the built-in calendar control to replace the JavaScript post-back directly with parameterized links.
My compound question is -
Is there a good JavaScript-less calendar control, of a way to get rid of JavaScript in ASP.NET's built-in control, or of a way to localize ASP.NET's mobile calendar control?
If all of the above doesn't exist, is replacing the post-back with parameterized links a good way to go? What would other suggestions be?
Currently, I'm not concerned with formatting - the device I'm targeting displays the date-picker well. I'm concerned only with the small problem of getting it to work...
What I ended up doing is building a custom calendar control.
For now, I used a table, but it will have to change when I want to support more devices. Since I'm targeting right-to-left languages, a table is already a pain.
#troelskn - I didn't go for <select> because they're not comfortable for a user using a mobile device, but thank you for the advice.
You can generate some dropdown (<select>) boxes and use them as a simple datepicker. You'll need to do some server side validation though, since no JavaScript would mean that the user could pick an invalid date (for example, 31st of Feb).