- This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
- The forum ‘JavaScript’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › JavaScript › Dynamic Page with external source
Hello all,
I used this tip for my site:
https://css-tricks.com/6336-dynamic-page-replacing-content/
But to be perfect it would be nice to use external contents for the dynamic pages!
And as im already using Jquery for this tip, i would like to know if i can easily add (im talking about someone posting here, to do this, replace this, use this, =D) and make my dynamicpage.js to be able to get external contents without using iframes…
Something like index.html#http://google.com.br, to get http://google.com.br
thankful Chinchila.
for now im using PHP…
.....
....
- Home
- Music
- We Are
- Contact
....
$s = $_SERVER; if (empty($s)) { include "home.php"; } else { if (file_exists("$s.php")) { include "$s.php"; } else { include "home.php"; } }?>
First: including a variable directly from the user is a HUGE security hole.
Second: javascript has a security feature in it, so you cannot access content from contents other than your own. There are some workarounds, you can google them. You can use PHP file open functions to read stuff from other servers.
Thank You
Well, So do you know how to integrate some frame autoresize script into this script?
i.e
I tried many ways to autoresize the frame inside the dynamic content but i think it has some conflit with this dynamic page script.
Pleaaase i really need this