Issue 94: Size settings won't work with iframe
Status:  Fixed
Owner: ----
Closed:  Oct 2008
Reported by John.D.S...@gmail.com, Oct 12, 2008
What steps will reproduce the problem?
1. Use target="_blank\ class="nyroModal" to link iframe
2. Change min height and width
3.

What is the expected output? What do you see instead?
I expect to have the iframe modal be 700x600 which i set in the settings 
section of the .js file

What version of the product are you using? On what operating system?
1.2.8, vista

Please provide any additional information below.


I have tried changing the settings in the main .js file, as well on the 
page itself with 

$(function() {
	$.fn.nyroModal.settings.width = 700;
	$.fn.nyroModal.settings.height = 600;
});



And i also tried:

$(function() {
	$.fn.nyroModal.settings.processHandler = function(settings) {
		$.nyroModalSettings({
				minHeight: 700,
				minWidth: 600,
				height: 700,
				width: 600
			});
	};
});


No matter what i try the modal is small, looks like 300x300 maybe. I have 
also tried changing the autosizable setting with no luck. Any ideas?

Thanks,
John

Oct 17, 2008
Project Member #1 nyro...@gmail.com
Hi John,

This issue will be fixed in the next release (coming next week)
Status: Fixed
Oct 22, 2008
Project Member #2 nyro...@gmail.com
The new version 1.3.0 fix this bug now
Oct 23, 2008
#3 John.D.S...@gmail.com
I am still having issues after upgrading to 1.3.0.  I have width and height set to 
null and autosizeable set to true. An AJAX call auto sizes perfectly, an iframe is 
still defaulting to the minheight and minwidth settings. 


Oct 25, 2008
Project Member #4 nyro...@gmail.com
Could you send your HTML and javascript code?
It's working great on my test page.
Oct 26, 2008
#5 John.D.S...@gmail.com
Here is the php that generates the link for the modals.


echo "<a href=\"Menus.php?SID=$session_id&client_id=$row[client_id]\" 
class=\"nyroModal\" target=\"_blank\">View Menu</a>";

I have the default settings in the .js file set to null for width and height. 

Thanks,
John
Oct 27, 2008
Project Member #6 nyro...@gmail.com
Please send your whole HTML page and your js files.
I can't help you with only that...
Oct 27, 2008
#7 John.D.S...@gmail.com
Sorry, here you go.

I added all my js files just in case something is causing a conflict so you can 
check it out.

-John
DineIn.html
18.5 KB   Download
jquery.nyroModal-1.3.0.js
40.8 KB   View   Download
jquery-1.2.6.pack.js
30.3 KB   View   Download
MyJS.js
893 bytes   View   Download
Oct 27, 2008
Project Member #8 nyro...@gmail.com
I don't see anything wrong on your files, and everything is working well.
The iframe size is 400 by 300.
If you add 
$(function() {
	$.nyroModalSettings({
		minWidth: 600,
		minHeight: 600
	});
});

the size of iframe is changed as well.
Oct 27, 2008
#9 John.D.S...@gmail.com
Right but I thought the new version would have the iframe be auto-sized like a 
normal AJAX call window.  The reason this is an issue is because I have a search 
form on the same page that I don't want to be a set size, it should be set to auto-
size so it expands depending on how many search results show up.

Correct me if I am wrong but if i put the above code in the head of my html then it 
will change the settings for all modals on that page.  Is there a way to specify 
size settings to a given modal on the page. So i can have the auto-sizeable for the 
search modal and then hard-coded settings for the menu.

sorry for the confusion, I am completely new to jquery and javascript.

-John
Oct 27, 2008
Project Member #10 nyro...@gmail.com
Sorry for the missunderstanding about the auto-sizing of the iframe.
As it's not possible for a foreign domain, I won't implement it.
Please check out this comment to see how you could do it:
https://code.google.com/p/nyromodal/issues/detail?id=4#c4

regarding your question, yes it'll change all the settings.
To apply the setting for only some links or form, you should remove the nyroModal
class and add another (let say myNyroModal).
Then, you'll do something like:
$('.myNyroModal').nyroModal({
 minWidth: 500,
 minHeight: 500
});

don't forget that you could also use the width and height settings.
Jun 21, 2011
#11 sachinar...@webinfomart.com
background-color: black;
position: absolute;
overflow: hidden;
top: 0px;
left: 0px;
height: 100%;
width: 100%;
opacity: 0.75;
how shud i change the background opacity in nyromodal