Our prices are compared Canadian pharmacy online ;[&{ Canadian pharmacy cialis when offering pharmacist tips. Menu. Index of drugs. Directory diseases. Pharmaceutical Dictionary. Clinico-pharmacological qualifier on the canadian pharmacy {{$ order diflucan IMPORTANT! Purchased medicines exchange and non-refundable. How to close a jQuery pop-up window within itself? | Web 4 Identity

How to close a jQuery pop-up window within itself?

Imagine that you have a beautiful jQuery pop-up window (or commonly called Lightbox) created for image slide shows or to display plain text. You have a “close” image icon on the pop-up window which would allow the website visitors to click and close the window (or you can just simply click elsewhere on the web page to close the Lightbox pop-up). But suppose you have a form, a contact form for example, that needs to be submitted from this jQuery pop-up and you need to close the window and return to the parent page by clicking on a button in the popup page. How would you do that? Here is a simple and easy fix.

In most cases, the popup window would be a DIV which would hide and show on an onClick event. So first you have to assign an ID to the DIV. Or you could use the one you have already used.

Now within this DIV comes your form. Here is an example:

Now we need to add a Javascript function to the Save button to do the action. So I edited the 5th line to add an onClick event:

Now the javascript function closePop to add in the head with hacks for different browsers:


That’s it! Now you can just show case your HTML mockups with some spice. :-) Leave us a comment if you like it.

Responses are currently closed, but you can trackback from your own site.

Comments are closed.