AJAX :: Injecting Javascript Via Append Into PopupControlExtender?
Jan 18, 2011
I have a page with a grid view that the user can hover over an image within the row and it will retrieve additional information from the database and show it in a panel called by the PopupControlExtender.
I then wanted to add a bing map showing the location within the same panel. This also works correctly EXCEPT I can't seem to get the map to show automatically. If I add a Mouseover or click event it works, but no matter what I try (inline, function, etc.) I can't get it to show when the panel shows. The user has to take action for it to appear which is not what I want.
Here is the section of code with the bolded section the code that is problematic:
Again - I just want the Mouseover requirement removed so that the map will show without further input
I have an aspx page with four UpdatePanels. Incidentally, each UpdatePanel corresponds to a JQuery UI tab. What I am trying to achieve is a JQuery UI modal dialog OUTSIDE the UpdatePanels that can be called from server-side code running INSIDE any of the UpdatePanels. So, inside the first UpdatePanel is an asp:Button which runs some server-side code. When an error ocurrs, I want to be able to inject some JavaScript that will call the modal dialog to display the error message. Here is the code I am using:
Dim script As String = "showPopupMessage('{0}');" script = String.Format(script, errorMessage) ScriptManager.RegisterStartupScript(Me.UpdatePanelBizInfo, Me.UpdatePanelBizInfo.GetType, Guid.NewGuid.ToString, script, True)
The showPopupMessage function on the page looks like this:
function showPopupMessage(msg) { $('#<%=Me.LabelPopupMessage.ClientID %>').text(msg); $('#dialogPopupMessage').dialog('open'); }
When the code runs to inject the JavaScript, nothing happens. I am assuming it has something to do with the fact that the error ocurrs in the code running inside an UpdatePanel. Upon inspecting the resulting HTML, the JavaScript is there. What am I doing wrong?
I have a toolbar at the bottom of my site, wrapped in an lwaysVisibleControlExtender. When I press on the of links on the bottom, I want a popup to appear such that it appears joined to the link on the toolbar (very much like facebook chat). How do I use the popupcontrolextender to position the popup, even when the popup can have variable height?
I use the PopupControlExtender to show a Panel after clicking a ImageButton. The Panel can be closed by clicking the page outside the Panel. This is working fine.I added an Animation Fading Out the Panel when the Panel is clicked (I have no close button on the panel). This is working fine too.The problem comes when I click the Imagebutton (The Panel appears) followed by clicking the Panel itself (The Panel disappears). If I now click the Imagebutton again, nothing happens as if the animation was not considered finished. The Panel should have appeared again.
If I change the focus on the page, then the animation is in some way reactivated and the popup works again. I already tried the following :
- <EnableAction AnimationTarget="ImageButton1" Enabled="true" /> - Setting the focus to a random control on the page using <ScriptAction /> <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/App_Themes/Images/Vraagteken.gif" OnClientClick="return false;" UseSubmitBehavior="false" ToolTip="Kies de bedrijfs sector waarvoor de tekst is bedoeld" />
I know this may be easy, but I have looked at it for a bit of time and maybe my brain is going in circle.OK, I am learing PopupControlExtender. Looks like it is a good thing to have. One (style of) example is to have a TextBox. Click on it and the PopupControlExtender will come up. Sample code may be like the Example 1 in this
Introduction.
Question:
Why there is a need to put UpdatePanel inside the Panel? It is the TextBox which needs to be updated. Why the TextBox is not put into an UpdatePanel? (I try Example 1 and it works without having to put the TextBox inside an UpdatePanel.)
I have a textbox which uses a popupcontrolextender. I would like the textbox text to be populated on page_load with default text. If I do this the page does not recognize the textbox as having text when the form is submitted. Why does the popupcontrolextender do this to the textbox and how can I make this work?
I am using C# Multiview on a log-in/forgot user name page and I would like to avoid new windows each time I change view id inside the Multiview.Right now the page uses "window.showModalDialog" and I would like to remove the js from the page.This lead me to the PopupControlExtender. How do I use the PopupControlExtender and Multiview in combination? e.g. a radiobuttom provides the desired view index and only this view is shown in the pop-up?Did I misunderstand the purpose of the extender?
I need to show a popup when the user hover over a Listview item, for this I am using the PopupControlExtender which is placed inside the Listview ItemTemplate. The popup panel always shows inside the Listview item. How can I control the positioning of the popup panel to show outside the Listview ItemTemplate ?
I use the PopupControlExtender to show a Panel after clicking a ImageButton. The Panel can be closed by clicking the page outside the panel. This is working fine.
I added an Animation Fading Out the Panel when the Panel is clicked (I have no button on the panel). This is working fine to.
The problem comes when I click the Imagebutton (The Panel appears) followed by clicking the Panel itself (The Panel disappears). If I now click the Imagebutton again, nothing happens as if the animation was not considered finished. The Panel should have appeared again.
If I change the focus on the page, then the animation is in some way reactivated and the popup works again. I already tried the following :
- Setting the focus to a random control on the page using <ScriptAction />
Is there a way to reset the animation using Javascript ? Using "setValue(value);" ?
<asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/App_Themes/Images/Vraagteken.gif" OnClientClick="return false;" UseSubmitBehavior="false" ToolTip="Kies de bedrijfs sector waarvoor de tekst is bedoeld" />
As the subject says: I am wondering what the ExtenderControlId attribute of the PopupControlExtender is used for? When I click "Add Extender" through the context menu of an control in the designer, the code of a PopupControlExtender is generated, but the ExtenderControlId attribute is empty. By the way: Is there a documentation of the AjaxControlToolkit-Controls which provides a description to every Member like the ExtenderControlId?
I have two pages with TabControls and the tabcontrols have several tabpanels. On one page there are some popupcontrol extenders on the first tab, and that page works fine. On the second page, the popupcontrolextenders are on the second tab. When that page loads, I get the following jscript error:
Microsoft JScript runtime error: Sys.ArgumentException: Value must not be null for Controls and Behaviors. Parameter name: element
I've tried setting the Enabled property to false for these popupcontrolextenders until that tab becomes visible. This prevents the error on page load, but but then the same error happens as soon as that tab becomes visible.
Is it possible to use a popupcontrolextender on a tabpanel, or should I give up and try something different?
I have a text box with an associated popupcontrolextender.This opens a panel containing a checkboxlist. What i want to do is add the values selected in the checkbox list to the text box when the user clicks out of the panel.I started to use the OnselectedIndexChanged, of the checkboxlist and update the text box after every checkbox has been checked / unchecked.But the checkboxlist is quite long and when you click one of the checkboxes near the bottom,because everything is in an update panel,the checkboxlist scrolls to the top after the autopostback not very user-friendly.
I have a PopupControlExtender inside of the UpdatePanel. I use it to edit some of the values on the website.
Basicly it looks like this. If you have PopupControlExtender inside of th update panel whenever a user triggers a partial postback javascript creates the popup panels outside of the UpdatePanelControl - to make sure they are always on the top of other elements. So after every postback you get more and more elements with the same clinetIDs.
Here is a code from Firebug - you can notice Panel1 and all the controls inside of it being generated 3 times when i load a page (once) and twice after two partial postbacks:
[Code]....
Oh and i use it actually inside the listview that itself is embeded in the update panel so i cant really use it outside of the update panel.
I'm trying to load a listbox with a PopUpControlExtender. I've been able to get the data but not bind it to the listbox, and have fallen short in using the following:
Does anybody have recent information on surmounting zorder problems with the PopupControlExtender? Web searches found a few comments that seem directly related to the problem I'm having, but no solutions... Most-suggested solution is to set the z-order to a high value on the panel containing the popup markup, but that is helping me (and didn't seem to fix the problem for others either). I'm using popup extenders within the EditItemTemplate of a ListView, and however hard I try I always end up with the other records in the listview (i.e. those using the ItemTemplate) overwriting the popup markup.I had high hopes that this problem might have gone away with release 40412 of the toolkit but it appears not
I have a formview tied to a gridview and the formview shows the data selected in the grideview. The Formview has a ajax:popupcontrolextender for an image in the itemtemplate and a hyperlink to open the popupextender. When the formview loads , the popupcontrolextender opens and shows the image in it. I want the popupcontrolextender to remain closed when the form loads and open only when the user clicks the hyperlink.I tried doing popupcontrolextender.Cancel() in formview_Databound event but it did not work. Please advice. this is my markup.
I have an AJAX PopupControlExtender nested within a modal popup. When the pop up control is shown, it is hiding behind the modal popup and have tried setting the z-index of the pop up control but it simply will not appear above the Modal popup.Please suggest me if there is any other way to make pop up extender appear on top of modal extender.
i put PopUpcontrolExtender in my page to learn more about this toolkit base on the Ajax tutorial but ,when i click on the button, popup modal form popped up and disapear by itself fast, here is my code:
and also i can not put DropShadow="true" in my PopupControlExtender because i will get this Error: "AjaxControlToolkit.PopupControlExtender' does not have a public property named 'DropShadow'"
I am wondering if anyone could shed some light on why onclick of the target control does not work. I am asking this mainly out of curiosity because replacing onclcick with onfocus achieves what I need.