Showing posts with label modal. Show all posts
Showing posts with label modal. Show all posts

Monday, March 26, 2012

Programmatically trigger modal popup

I want to write a page that checks for a cookie via Javascript and then possibly opens a modal dialog box. How do I trigger the modal popup via client side javascript?

I saw the example that comes on the modal dialog that sample page, however that works with a client side event such as a click. Can I do it without listening for an event?

Hi theregit,

In the javascript where you check the cookie, you can trigger a button.

That button's click event can then be another javascript that opens a modal window.

Trigger the button like:
var myButton = document.getElementById('myButton');
myButton.click();

Is this an answer to your question?
if you have comments/remarks/questions .. please do so!

Kind regards
Wim


Try this ,

Show and Hide ModalPopupExtender from JavaScript

Hope this helps


Phanatic,

Thank you sooo much for that post. I was having the problem with the 'null' is null or not an object error. Once I used the pageLoad() method it worked great.

Wednesday, March 21, 2012

Question About using a modal popup for each row in a gridview

Hello, I'm trying to have a modalpopup control fire in a gridview, but I dont know how to approach the problem. Basically I have a linkbutton in each row of my gridview. The code for this is:

<asp:ButtonField HeaderText="Primary Subject" SortExpression="subject" ButtonType="Link" commandname="Subject" DataTextField="subject" />

which does not have an ID attribute, but of course modal popup control needs the attribute TargetControlID="something"

How do I make the buttonfield have an id? or be able to use it inside a modal popup?

Thanks

Use a TemplateField with a LinkButton instead.


Question About using a modal popup for each row in a gridview

Do you really need the trigger (the button is inside the panel, so it should trigger without it)?

Does it work if you remove the Popup extender?

Question on DynamicUpdate properties...

When using this feature - my understanding is that the principle around it is to use a web service.

Say for a popup form modal or otherwise... one was to use it...

how do you go about setting security principles and otherwise preventing someone that shouldn't have access to it beyond the mere fact you can authenticate prior to...my concern is security using this feature...are there any examples to look at that do not use the profile services that guards against someone using a tool like fiddler from manipulating and querying or otherwise being able to submit when using Atlas dynamic behaviors in this manner?

I'm not sure I understand what security issues you feel DynamicPopulate introduces (that aren't already present). Could you outline a scenario, perhaps?

Question regarding updatepanel and modal popup

Good morning everyone I have a question regarding a page that I am working on at the moment. My project uses one masterpage. On this masterpage I have placed a modal popup extender which is called from several content pages. On one of my content pages I have placed an update panel. When I call the show method of the modal popup extender from the update panel the data that is being retrieved in the modal popup, does not appear. I have tried removing the update panel and calling the show and it works fine. What exactly am I missing or not doing?

Thanks in advance.

Wrap the ModalPopupExtender's Panel with another UpdatePanel.


Thank you for your response, I appreciate it. I did actualluy figure out that this was the cause.