Please how can i run external url

5 views
Skip to first unread message

sharaola

unread,
Jun 29, 2009, 9:04:34 PM6/29/09
to ModalBox
Please i have a php file and i have a link in it , i want the pop
window shown when the user click the link.

Please in details as um beginner in JS

Thanks in advance

Justinas Urbanavicius

unread,
Jun 30, 2009, 6:14:01 AM6/30/09
to moda...@googlegroups.com
look at the main site examples, everything is there. the first example is what you need, if you want modalbox to load content from file like in this example frame_send-link.html.

<a href="frame_send-link.html" title="Simple form" onclick=" Modalbox.show(this.href, {title: this.title, width: 600}); return false; "> Send link to a friend</a>

if you have content already in your site just hidden away in some div try this:
<a href="javascript:;" title="Simple form" onclick=" Modalbox.show($('id-of-my-div'), {title: this.title, width: 600}); return false; "> Send link to a friend</a>

$('id-of-my-div') in the brackets is the id of the div element you wan to load content from.

sharaola

unread,
Jun 30, 2009, 8:05:45 AM6/30/09
to ModalBox
Thanks Justinas very much,but can i make it more clear
i have hyperlink in php(www.bbc.com) , i want when the user click this
hyperlink,the bbc site appears in the pop up window

On Jun 30, 1:14 pm, Justinas Urbanavicius <justin...@gmail.com> wrote:
> look at the main site examples, everything is there. the first example is
> what you need, if you want modalbox to load content from file like in this
> example frame_send-link.html.
>
> <a href="frame_send-link.html" title="Simple form" onclick="
> Modalbox.show(this.href, {title: this.title, width: 600}); return false; ">
> Send link to a friend</a>
>
> if you have content already in your site just hidden away in some div try
> this:
> <a href="javascript:;" title="Simple form" onclick=" Modalbox.show(*
> $('id-of-my-div')*, {title: this.title, width: 600}); return false; "> Send
> link to a friend</a>
>
> $('id-of-my-div') in the brackets is the id of the div element you wan to
> load content from.
>

Justinas Urbanavicius

unread,
Jun 30, 2009, 8:24:40 AM6/30/09
to moda...@googlegroups.com
what do you mean by saying that your link is in php ?
you click the link that launches the php script that fetches data from bbc.com or smth ?

Sherif Galal

unread,
Jun 30, 2009, 8:47:47 AM6/30/09
to moda...@googlegroups.com
sry justin for inconvenience,
I want to open external link on the new pop up window
a.href"http://www.bbc.com" rather than a.href"example.html"

Thanks

2009/6/30 Justinas Urbanavicius <just...@gmail.com>

Justinas Urbanavicius

unread,
Jun 30, 2009, 8:49:51 AM6/30/09
to moda...@googlegroups.com

Sherif Galal

unread,
Jun 30, 2009, 8:52:11 AM6/30/09
to moda...@googlegroups.com
Thanks,i take a look at it before but unfortunatly um a begineer and can't understand which part to edit :(
Please i need it urgent so help me

2009/6/30 Justinas Urbanavicius <just...@gmail.com>

Justinas Urbanavicius

unread,
Jun 30, 2009, 8:59:38 AM6/30/09
to moda...@googlegroups.com
if you want to display the external content in your modalbox you need to create a php file whitch fetches the content from the extenrnal site. it isn't very easy and fast to do. there are some links in that page to examples how to create cross-domain proxy.

the most simple way to do so is to use fopen() php functions to fetch content. there are some examples out there in the php manual too.

unfortunately I don't have a ready to use code and i don't have time to write it for you, so you are on your own.
Reply all
Reply to author
Forward
0 new messages