Web Hosting Talk







View Full Version : jquery and javascript, window.open () problem


bambinou
04-11-2010, 08:11 AM
Hi,


I have existing code on my page:
window.open("<?=$path["webroot"]?>ecommerce/VOTE.html",null,"height=50,width=400,status=yes,toolbar=no,menubar=no,location=no");

And this nice Jquery window:

<img src="<?=$artist_img_path?>listen.gif" style="cursor:pointer" onclick="javascript:listen('<?=$myrow[0]?>')" >&nbsp;&nbsp;<a href='#' class='confirm' style="text-decoration:none;"><img src="<?=$artist_img_path?>Free.gif" style='border:0px;'>
</a>
</div>
<div id='confirm'>
<div class='header'><span>Confirm</span></div>
<p class='message'></p>
<div class='buttons'>
<div class='no simplemodal-close'>Close</div>
<div id='confirm_yes' class='yes'>Open Account</div>
</div>
</div>
<script type='text/javascript' src='<?=$path['webroot']?>js/jquery.js'></script>
<script type='text/javascript' src='<?=$path['webroot']?>js/jquery.simplemodal.js'>
</script>
<script type='text/javascript' src='<?=$path['webroot']?>js/confirm.js'></script>
}



If there a way to have this jquery script inside the window.open()?


Thank you,


BamBam

Host Ahead
04-11-2010, 09:04 AM
window.open in javascript applies to an actual new browser window. The jQuery window you refer to is not a window actually, but just a piece of HTML which behaves more or less as a window.

So in short, no, with window.open you can't open a jQuery "window".

bambinou
04-11-2010, 10:57 AM
Dang, ok, got it,

Thanks for your help Host Head