Jquery load external page on dialog box help

Hello forums I’m trying to load an external page inside a jquery UI dialog box and can’t seem to get it ro work

function openMyDialog(){
var $link = "weh.php";
var $dialog = $('<div></div>').load($link.attr('href') + '#modBox');
$($dialog).dialog();

}

call the function:

<a  href="#" onclick="openMyDialog()" >test</a>

weh.php:

<div id="modBox">
<h2>Test</h2>
</div>

when I do this:

function openMyDialog(){
var $dialog = $('<div>Test Test</div>');
$($dialog).dialog();
}

The dialog opens, how do I put weh.php inside the newly created div? Please help totally stumped.

Thanks

Nevermind I got it

function openMyDialog(){
var $dialog = $(‘<div></div>’).load("weh.php’);
$($dialog).dialog();
}

Jeez! Jquery Rules !!