Wednesday, April 18, 2012

Jquery window & pop up

I was trying to hide the widow, while trying to download an exe through FTP protocol...
I was using :
window.open("ftp://10.32.138.74/DiagnosticLauncher.exe", 1, 'width=50,height=30,false');

When I used Jquery equivalent of it, I could fix that problem easily :)


$jq(window).attr("location","ftp://10.32.138.74/DiagnosticLauncher.exe");
This version works well with jQuery 1.6.2.
Or using JS we could achieve the same : 
window.location = "http://www.page-2.com";

For Jquery pop up

popup window

$(selector).popupWindow({options});

jQuery plugin (jquery.popupWindow.js) used to create popup windows.
Demo Code :
> href="http://www.yahoo.com" title="yahoo.com" class="example1demo">open popup 
 type="text/javascript"> 
$('.example1demo').popupWindow({ 
height:500, 
width:800, 
top:50, 
left:50 
}); 

Ref link : http://swip.codylindley.com/popupWindowDemo.html


No comments: