Oddly enough, works in IE but not FF or Chrome

In that case modal.close(); should work. How can that be undefined?? (I feel a vicious cycle approaching.) :smile:

V/r,

:slight_smile:

I don’t know. I think there is something else going on.

Can you see this? I recreated it with the core pieces.

https://s3.amazonaws.com/cenoris/tempdemo/test.html

If you press the “close button” that is from the ajax.html page, which gets “modal 2” from test2.html and it then closes the dialog from the script inside ajax.html calling modal.close();.

I see that, and the view source does show that modal.close(); works… I just can’t figure out why this isn’t working (except in IE).

Thank you for your help.

V/r,

:slight_smile:

1 Like

Welp… it’s a bit hackish, but I did finally get it to work.

When the form validation is run, if the length of the variable “warn” is 0:

$.post('testform.cfm',$('#thisForm').serialize()).done(function(data){alert(data); closer.click();});

Using jQuery to click the close button if it’s done.

:slight_smile:

1 Like

Isn’t there a tool like modernizr.com that helps with these kinds of issues?

I’ve never worked with modernizr, but if it’s a library like jQuery, I do NOT mix libraries. The exception being something like jQuery and jQuery-UI (which UI was made specifically for jQuery.)

The issue is that the modal is opening a new document that (for whatever reason) isn’t seeing the parent code.

My solution (admittedly) is a bit hackish, but it works. :smile:

V/r,

:slight_smile:

No no no… modernizr I believe, don’t quote me on this, Modernizr is a JavaScript library that detects which HTML5 and CSS3 features your visitor’s browser supports. So I was wondering if there was something similar for JavaScript. I would think there is.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.