0

I've searched the net for several weeks but because I just don't know enough javascript to work out how I can turn a CSS3 modal popup into JavaScript that can be loaded from code behind after a button_Click event.

The CSS3 is from https://www.script-tutorials.com/css3-modal-popups/ and I like the look, it resides in /styles/style1.css of the site. The button_click event is in a repeater and after the data is returned I'd like the CSS3 popup to display. I'm not sure how to call a JavaScript function from the code behind. How do I do it?

Nate Barbettini
  • 51,256
  • 26
  • 134
  • 147
Sara
  • 1
  • 4
  • Welcome to Stack Overflow! I added the [tag:asp.net] tag because it looks like you're using ASP.NET. Can you provide an example of the code you're trying to use? You're more likely to get responses if we can see what you've got so far. – Nate Barbettini Sep 09 '15 at 23:45

1 Answers1

0

Not sure about the css into JavaScript but you can do the following. Attach a function to render this modal on the postback using the webforms JavaScript events.

Edit: check out this post Execute javascript after a partial postback of an updatepanel?

I didn't check out you link but just make sure to serve the assets you need for the modal.

Edit/read it: this is a static demo. You may need to inject some extra Dom elements before or after(using Js) the post back. Once the Dom elements and css are there your modal should be good. Also if you can add the Dom elements for the modal when the repeater is running you don't need any JavaScript.

Community
  • 1
  • 1
Shawn K
  • 779
  • 5
  • 13