I'd like to open a popup window, but without given a link : just open it with some HTML and Javascript code (that I pass trought the function).
Tried with :
window.open($('.my_html').html(), "Booking", "width=950,height=680");
How can I do it?
I'd like to open a popup window, but without given a link : just open it with some HTML and Javascript code (that I pass trought the function).
Tried with :
window.open($('.my_html').html(), "Booking", "width=950,height=680");
How can I do it?
writeConsole('Hello from JavaScript!');
function writeConsole(content) {
top.consoleRef=window.open('','myconsole','width=350,height=250');
top.consoleRef.document.write(content)
top.consoleRef.document.close()
}
function openpopup(content){
winpops=window.open('',"test","fullscreen=no,toolbar=yes,status=yes, " +
"menubar=yes,scrollbars=yes,resizable=yes,directories=yes,location=yes, " +
"width=500,height=400,left=100,top=100,screenX=100,screenY=100");
winpops.document.write(content);
}
openpopup('<h1>This is some test content</h1>');
You can call function on any event, and supply content you want to show.
do you have to use browser popups? They're annoying and can be blocked by ad-blockers.
Why not do it as modal windows instead? like this: http://www.sohtanaka.com/web-design/inline-modal-window-w-css-and-jquery/
or the jQuery plugin jqModal.