Showing posts with label running. Show all posts
Showing posts with label running. Show all posts

Wednesday, March 28, 2012

Modal Popup and Formview. first click not responding

i'm running into an issue when i put a modal popup in a formview where when i first click on the linkbutton, the modalpopup does not appear but instead it postbacks. But then on the second click and any clicks after that, the modalpopup will appear.

anyone run into this problem before and does anyone know how i could fix this issue? thanks.

My Immediate suggestion would be wrap the gridview and formview .Net UI code in a ajax Update Panel. Unless you are handling the select and the display of the FormView servser-side - it would be safe to assume that would be the default behavior. The reason I say that is until the Modal is actually invoked - its not really resident - just part of the DOM and not part of the ASP.Net page... If you tie what event you are using to invoke the formview to showing the modal using the serverside show() hide() methods - and you have that all wrapped up into a updatepanel on the UI side - you should get a seamless ModalPopUp experience... There may be better ways - but that is at least how I handle it...


http://forums.asp.net/thread/1441672.aspx might be relevant, too.

Wednesday, March 21, 2012

ModalPopup and empty Listbox

I'm running into an issue where I have an empty listbox within a ModalPopup window. For some reason, the Listbox shows up with an XX appearing in it. The XX is not a ListItem as it is not selectable and can't be edited or removed via code. I even tried to add a ListItem and then clear the Listbox, but clearing the ListBox results in the XX showing up again.

Has anyone else run into this? Is this a known bug? Any workaround?

Thanks in advance,

Matt

I had a similar issue: I tried to put an asp:Button control in a ModalPopup and assign a method to it - it appeared, but didn't perform the desired code. Instead I tried a plain-ole HTML button control and assigned a javascript function similar to what I wanted it to do and it worked.

Later, on ScottGu's blog,he posted the new release of the toolkit and in the post there was mention of the Modal having some updates/fixes performed to it, specifically in regard to positioning, however, I thought I saw somewhere something about the use of server side controls. Hmm... I'll keep looking and update you if I find more.

In the interim, are you able to use a client-side listbox and see if that resolves anything? Or does your LB need to be databound or what? Can you show us some code to see if we can spot anything simple that you may have overlooked (as we all do at times)?

regards,
(bs.)



Thanks for the reply. The listbox does need to be databound in certain circumstances, so the client-side won't work.

Strange, though ... noticing the 'XX' in FireFox 1.5 but not in IE or FF 2.0. Grrrrrrrrrrrrrr ......


Hi,

I tried it on FF 2.0.0.4, this problem still exists. It's hard to tell the exact cause, but you can solve it by adding an item to it when there is no items in the list.

For example:

function pageLoad()
{
var list = $get("ListBox1");

if(list.options.length < 1)
{
list.options.add(new Option(""));
}
}

Hope this helps.