| Issue 94: | Size settings won't work with iframe | |
| 2 people starred this issue and may be notified of changes. | Back to list |
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
Status:
Fixed
Oct 22, 2008
The new version 1.3.0 fix this bug now
Oct 23, 2008
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
Could you send your HTML and javascript code? It's working great on my test page.
Oct 26, 2008
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
Please send your whole HTML page and your js files. I can't help you with only that...
Oct 27, 2008
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
Oct 27, 2008
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
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
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
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 |