I know this has been talked about a couple of time, but all the
searchresults I found won´t do it for me. They just dont work!!!
The situation:
I need a way to dynamically specify the width and height in the URL’s
parameters for Fancybox iFrames!
This is what i found:
****************************************** SCRIPT
************************************************************
$('a.fb_dynamic').each(function(){
var dWidth = parseInt($(this).attr('href').match(/
width=[0-9]+/i)[0].replace('width=',''));
var dHeight = parseInt($(this).attr('href').match(/
height=[0-9]+/i)[0].replace('height=',''));
$(this).fancybox({
'width':dWidth,
'height':dHeight,
'autoScale' : false,
'transitionIn' : 'elastic',
'transitionOut' : 'elastic',
'type' : 'iframe'
});
});
****************************************** END SCRIPT
**********************************************************
************************************************** URL
*************************************************************
<a class="fb_dynamic" href="
http://darkcrimson.com/?
width=400&height=300">Link</a>
*********************************************** END URL
**********************************************************
The iFrame opens but i get an error Message within the iframe saying:
"Not Found - The requested URL /?width=400&height=300 was not found on
this server."
The dimension settings work though!
What can I do??? I am sitting on this for two days now and can´t get
it to work (no, I am not a programmer, I am a Printdesigner, so that
might be the cause, haha)
I hope someone can help since time is running out for me :(
Thanks!!