Welcome Guest, Not a member yet? Register   Sign In
No Suffix URLs and Shadowbox iframes
#1

[eluser]CodeIgniterNewbie[/eluser]
I just observed a peculiar (at least to me) behavior in CI + Shadowbox.

When opening a web page with Shadowbox within my CI application, the page won't load unless the URL I am opening has a suffix to it (e.g. .html). However, if use a URL outside of my application (e.g. www.google.com), the Shadowbox has no problem loading the page.

Examples:

www.domain.com/MyController/ <-- will NOT load
www.domain.com/MyController.html <-- will load
www.google.com/ <-- will load

Can anyone explain this behavior? Thanks.
#2

[eluser]Unknown[/eluser]
Hi,
maybe it's too late but...
You can force/set the player as "iframe" within the link:

<a href='http://codeigniter/url/without/ext' rel='shadowbox;player=iframe'>

Best regards,
Nacho.
#3

[eluser]yannyannyann[/eluser]
[quote author="Lloptor" date="1242957544"]Hi,
maybe it's too late but...
You can force/set the player as "iframe" within the link:

<a href='http://codeigniter/url/without/ext' rel='shadowbox;player=iframe'>

Best regards,
Nacho.[/quote]

that just worked great for me, thanks!

PS: even one year late answers are usefull for some dude around the world Smile

love it
#4

[eluser]Typeslowly[/eluser]
Yeah, that dude is me, thanks!
#5

[eluser]Unknown[/eluser]
Even later, maybe that helps too Smile

[quote author="CodeIgniterNewbie" date="1216293771"]I just observed a peculiar (at least to www.domain.com/MyController/ <-- will NOT load
www.domain.com/MyController.html <-- will load
www.google.com/ <-- will load[/quote]

I am almost sure that this behaviour you are describing isn't a problem of Shadowbox, but rahter a generic property of the HTTP protocol and the webservers that you pull the content from.
The Shadowbox only opens an iframe and sets its source to be the URL you've specified. It doesn't do anything else with the URL.

On the server side, if you reference an URL like "http://www.domain.com/MyController/", it maps to a directory named "MyController" there. It's fully up to the webserver or the application there to fetch the correct content (look for an index.html or call your controller, for example).
Google, and many other webservers, are configured to look for a default template (such as index.html, index.php or similar) when you "call a folder". That's why Google works like that.
With your controller, it's a matter of configuration to set it to respond to the URLs you wish to call there. Note that one time you call it as a folder ("www.domain.com/MyController/"), another time as a HTML file ("www.domain.com/MyController.html"). I doubt it's configured to respond in both ways.

You can always check if the server responds properly by calling the URL in a new browser window. If it works in a browser window, only then you can start looking for a problem in Shadowbox Smile
Does your application respond to both types of URL when you try to call it in a simple browser window?




Theme © iAndrew 2016 - Forum software by © MyBB