My favorites | Sign in
Project Home Downloads Issues
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 205: nyromodal not working from loaded ajax code, please help
4 people starred this issue and may be notified of changes. Back to list
Status:  WontFix
Owner:  ----
Closed:  Jul 2009


 
Reported by sneak...@gmail.com, Mar 27, 2009
I have a file named test.php, which remotely loads a page: modal.php:

$("#something").load("modal.php");

Inside of modal.php I have a link to a nyroModal window. 

<a href="somefile.php" class="nyroModal">pop somefile</a>

I had hoped that the nyroModal window would "pop-up" correctly (and it does
in IE), but in Firefox and Safari, when the link is clicked, it opens
modal.php in the browser window, not as a popup.  When I open modal.php
directly, not through test.php, then the nyroModal window works beautifully.

I then tried to use jquery.livequery to solve the problem using the
following code inside of test.php:

	$(function() {
		$('a[class*=nyroModal]').livequery('click',function(e) {
			e.preventDefault();
			$(this).nyroModalManual();
			return false;});
	});

However, all I get is a javascript error:
Error: $(this).nyroModalManual is not a function

I'm using version 1.4.2 of nyroModal with version 1.3.2 of jquery, which
are both loaded in the headers of test.php and modal.php

Please advise, and thank you in advance.

Apr 9, 2009
Project Member #1 nyro...@gmail.com
Could you provide a test page please?
May 14, 2009
Project Member #2 nyro...@gmail.com
any news about this issue?
Jun 30, 2009
#3 sas.mes...@gmail.com
I've similar problem...! I'm using the v1.5.0 and get a DIV content via
XMLHttpRequest... This DIV content lots of HTML code like this:
<div class="something">
  <a href="/images/pics.jpg" id="id_a_vp_1" class="nyroModal" title="Desc"><img
src="/images/thumbs/tn_pics.jpg" id="id_img_vp_1" alt="desc" border="0"></a>
</div>

It's working fine with Firefox (3.0) but in Opera (9.x), IE7, Safari (4), Chrome
doesn't work... If I click on link the picture open in a simple browser-tab.

If I try the same code directly in the page (not via XMLHttpRequest) it's working
fine everywhere.

Could you please help me? Thx!


Jul 2, 2009
#4 sas.mes...@gmail.com
Sorry... it doesn't work in Firefox too... :(
Jul 9, 2009
Project Member #5 nyro...@gmail.com
@sneakooi: that's normal that nyroModal doesn't work once you loaded the content
through javascript.
Then your code should with livequery should work. Are you sure to execute it once
nyroModal is loaded?



@sas.mester, could you provide a test page please?
Jul 9, 2009
#6 sas.mes...@gmail.com
A made a new issue for this:  Issue 279 

Jul 23, 2009
Project Member #7 nyro...@gmail.com
(No comment was entered for this change.)
Status: WontFix
Nov 29, 2010
#8 jyotipaw...@gmail.com
For me it worked
like
$(function() {
		$('a[class=nyroModal]').live('click',function(e) {
			e.preventDefault();
			$(this).nyroModalManual();
			return false;});
	});

Powered by Google Project Hosting