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.
Related
this seems like a simple request, but I've searched the fullCalendar posts and was unable to find anything similiar to this question.
I am using the monthly view of fullCalendar on my .net site and need to add an asp.net link button control to each day in the month.
Is this possible?
I've been doing a lot of work hacking the js for fullCalendar, its a fabulous plugin.
You're not going to be able to do exactly what you want, because fullCalendar builds its HTML dynamically in Javascript. What you can do is to hack the JS, the place you need to look is a function called 'buildSkeleton' which generates the HTML for the table fullCalendar uses for display. Its not too hard to see what its doing.
You would also need to deal with the problem that the calendar might render events on top of your button, probably the easiest way is to give your button a positive z-index in CSS so it was always on top of the event bars.
Why do you need a button? If it's to initiate the adding of an event or something like that have a look at one of the demos which shows an dialog box popup when you click on a day. This can be expanded into a host of other posibilities
I am a little confused and making it alot more complicated than this needs to be! Here is what I have...
A view which displays a drop down of US States. When the user chooses a state it loads a list of data from a database and returns the results (populates the View Model) and the View renders the information.
What I wanted to do was have have the dropdown trigger an Ajax event which performs the data load, but also wanted it to depreciate if the user didn't have Javascript enabled. How would I go about rendering the view with AND without javascript / ajax?
Hope that makes sense. Thanks for your help.
You can't re-populate a drop-down without jscript. You can do a page-reload with a new drop-down though, although the logic to determine which to use is javascript unfortunately. (Not to mention triggering the re-load of the page on click)
No Javascript support though? That seems kind of out of date, most people run javascript-enabled browsers these days. As for paranoia freaks with javascript turned off, a <noscript> block to tell them to get over it may be appropriate.
To do this with ajax, read this article about cascade dropdowns by Stephen Walther.
To do this without ajax, you could put your first dropdown in a form with a button visible only when javascript is disabled (hide this with javascript for that) wich gets to some action (in another window, maybe) wich returns the second dropdown populated according to the element selected on the first (on the first window, if you have 2 - you could know this url using a viewstate variable).
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).
I am using C# and ASP.NET with version 2.0 of the .NET Framework library on this particular project. We are also using the AjaxControlToolkit. The AjaxControlToolkit should have the controls available to make a descent User Interface solution to the problem I'm facing.
I have run into this in a few projects in the last year, and used different solutions in the past. The current design of the project I just picked up, is that there is an <asp:DropDownList> control and on page load a Database call is made to get a list of values. This is then bound using DropDownList's datasource. The problem is that there is 25k items returned from the database. First thing, that's not acceptable for a user to have to scroll through tens of thousands of items. But, even more importantly, is that in every browser that it is tested on (IE 7, FF 3, Safari, and Chrome) the browser completely hangs as it is propagating the dropdownlist items.
What I'm thinking is using a Modal Popup form, which an Autocomplete Extender that allows the user to drill down to a specific company. So, in the field where they have to choose a company, they click on a "select company" icon, the modal form comes up, letting them use the autocomplete extender to select an existing company. They click "Ok" and it save the value to the field.
However, I'm an old school command line/shell/terminal guy, and my ideas of acceptable UI design might be skewed (give me a command prompt on any system, and I'm good to go). I would like the advice of those in the community here as to what they think would be an acceptable solution, or if they have faced other issues like this.
I think your idea for the autocomplete extender is the best solution. I've had this problem as well (sounds similar--a project you are taking over from somebody else). The push-back often comes from the user side. They are used to being able to select from a list of items. Unfortunately as the database grows, this becomes less and less feasible.
But when you have 0.5MB of html downloaded on the page (not including the viewstate), compromises have to be made.
Why do you think you need to create modal popup? Can't you just have the extender on your data entry page?
I had to deal with the same issue. But I ended up using a combobox with paging support and auto complete. Currently this combobox happens to be from Telerik. Its a comboBox for auto complete since you can't type into a droplist.
I agree that no user is going to want to look thru 25,000 items to find the one they want. Is there some way you can limit the data so that they drill down? Like selecting a region or type of company first and then showing the ones that match?
Multiple cascading ListBoxes, each futher refining the resultset of the previous
AJAX AutoCompleteExtender
I have what I imagine to be a pretty standard web-interface.
There are 4 different ListViews (grid controls) which are accessed by a series of Tabs on the top.
I have implemented this as follows:
alt text http://img402.imageshack.us/img402/1530/pagedu8.jpg
Tab 1 will load Page 1 containing Grid 1 into Frame 2, Tab 2 will load Page 2 containing Grid 2 into Frame 2 etc.
However this then means that if you click on an item in the Grid, and I load DetailsPage1.aspx into Frame 2, then Frame 1 and the tabs are still visible and active.
I've been advised that I should just have one Frame, and load the Pages in dynamically based on the tab click, using HttpRequest (or WebRequest in asp.net).
Is this the correct approach to take? If you have any resources or tips at hand, it would be appreciated!
Thanks
Frames are an absolute no-no. There is no benefit to frames that can't be achieved using other techniques.
Does that mean you must use AJAX? Not necessarily. AJAX is a perfectly good solution if you feel the need to provide a rich, seamless interface, but it's not strictly necessary.
You could use server-side includes to separate your tabs into a another (common) sub-page, but since you mention ASP.NET, (assuming you are running on framework v2 or greater) you might want to use Master Pages, where your tabs are in one content section or in the Master itself, and your grids/details are in another content section.
The key difference between the two techniques is that using AJAX, the transition from tab to tab will be slick and seamless, but a) it takes a little extra work (particularly if you are unfamiliar with any give AJAX framework) and b) since you essentially have 4 pages rolled into one, the pages are 'heavier' and are more complex to maintain. If you opt for the non-AJAX route, the key difference is that there will be a small but distinct refresh effect when you click on each tab (since it loads a new page each time).
Of course, Master Pages are useful for maintaining a consistent site style and structure anyway, so there is no reason why you can't use AJAX with a Master Page system.
Frames are lame: you will get problems, if users want to set a bookmark and if users visit your site via google: Then your navigational frame is not visible. So you need a lot of dirty javascript. to check this. If you need javascript, do it right from the start and use AJAX
Ajax is the best pick. But keep in mind to make it browse-able via back/forward. The best pick is to change page hash. I used something like this:
domain.com/#tab1 for first tab
domain.com/#tab2 for second tab
and so on.
If you use jQuery, this can be a good start (i use that and i had NO problem with). I'm sure there is a solution for all popular framework though :)
Instead of using frames, you should just include your navigation page in all of your other pages. The browser will see that you're including the same document in all of your pages and cache it.
Have you tried the TabContainer or loading all 4 detail panes and just showing/hiding panels on tab selection change?
Depending on what screens your users will see, if you load the detail views dynamically (Ajax or postback) you may have trouble persisting any information that the user has entered, and you will incur a wait (users dont like to wait)
I would recommend using jQuery and jQuery UI plugin. No frames will be needed, just div containers.
Like StingyJack, I would suggest having a look at the TabContainer control, but you might want to take care that your ViewState doesn't get too large if you do.
So for example, don't load anything into a GridView until that Tab is being viewed and remove it contents if it is not (saving back to the database of course if required. Using the TabContainer's ActiveTabChanged event would be key to this strategy.You diable ViewState for the grids but leave it on for the container.
You're using ASP.NET, so just load all 4 controls into a mutliview and then on postback set the visible one to be which ever button has been clicked.
http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.multiview.aspx
DO NOT uses frames (or iframes for that matter) unless you absolutely must...
The only valid reasons I can think of to use (i)frames is file upload controls in fact, and I am not sure it's valid there either...