Welcome to WebmasterWorld Guest from 54.162.109.245

Forum Moderators: open

Message Too Old, No Replies

How can i display external info with javascript ?

is it possible to display a content of external folder in a page?

     
2:45 pm on Sep 19, 2010 (gmt 0)

New User

5+ Year Member

joined:Sept 19, 2010
posts:2
votes: 0


Hi,
I need your help since i am not experienced with coding...

I have a movie review website which is running under vBulletin.

http://www.my_domain.com


And i have imdb script which fetch movie information from imdb.com website. That script is located in a different folder since i could not make it compatible with vBulletin.

http://www.my_domain.com/imdb


The result url of movie information page is :

http://www.my_domain.com/imdb/info.php?id=MOVIE_ID (movie id is numeric)


I can show the movie information with the iframe.

<iFrame src="{param}" width="100%" height="500"></iFrame>


Usage of the iframe in my forum :

[imdb]MOVIE_ID[/imdb]


Since each movie has different information, the iframe size may not be static. Ok, i can keep it static with a bigger size but then it will not look good in my page due to the space between iframe and rest of the message in post.

Is that possible to fetch the data through javascript and show it in my forum page as a part of message ?

Thanks in advanced...
Regards
8:45 am on Sept 20, 2010 (gmt 0)

Junior Member

10+ Year Member

joined:Mar 5, 2004
posts:198
votes: 0


Welcome to the Webmasterworld.

It won't be possible to use JavaScript for that, due to the crossdomain policy security restrictions.

But you can use PHP (or any other server-side language) to retrieve the information you need from IMDB.
10:29 am on Sept 20, 2010 (gmt 0)

New User

5+ Year Member

joined:Sept 19, 2010
posts:2
votes: 0


Well thanks a lot for your kind answer alias.

But actually i don't want to retrieve information from IMDB. I already do that with a php script. What i would like to do is, i need to find a better way to show this information in my forum page instead of using IFRAME.

The imdb script is located at another folder of my website. (not in root directory but in a directory called imdb)

And each movie information page is something like : [my_domain.com...]

Above page is customizable. I can change the look and the size of the table.

So i would like to learn if there is any other way to show the above page instead of using IFRAME.

Regards
4:58 am on Sept 21, 2010 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Nov 3, 2005
posts:1585
votes: 0


You should be able to do that with AJAX. I understand vBulletin uses the Yahoo YUI library ? so check the YUI documentation on AJAX, I am not familiar with vBulletin OR YUI.