View Full Version : LzBrowser question
steve94
04-26-2005, 06:07 AM
Hello Laszlo Community,
I open a new browser window through laszlo's
LzBrowser.LoadURL(url,target) method
example:
LzBrowser.LoadURL('http://localhost:8080/lps-2.2.1/Media/src/AddMedia.html','_blank');
My question is if there is a way to open a new window with some parameters like:
window.open('toolbar = no, scrollbars = no');
Thanks,
Steve
Here is one way .. create an external javascript file like this
openwindow.js .. with no <script></script> tags ..
function load() {
var load = window.open("http://localhost:8080/lps-2.2.1/Media/src/AddMedia.html",
"_blank",
"scrollbars=no,
menubar=no,
height=600,
width=800,
resizable=yes,
toolbar=no,
location=no,
status=no");
}
place openwindow.js in the same location as your lzx app
in your html wrapper page add ..
<script type="text/javascript" src="openwindow.js"></script>
above this line ..
<script type="text/javascript" src="/lps-2.2.1/lps/includes/embed.js"></script>
then in your lzx app use the call to embedded javascript ..
<button onclick="LzBrowser.LoadURL('javascript:load();')">
Launch Window
</button>
You can amend this to pass arguments from your lzx app to embedded javascript .. such as _blank
<button onclick="LzBrowser.LoadURL('javascript:load(argument1, argument2);')">
Launch Window
</button>
and you can launch URL in a co-embedded iframe (instead of using _blank).
...
An alternative approach is to build the LzBrowser.LoadURL('javascript ... call within your lzx app .. avoiding need for external embedded javascript.
...
Note that this forum inserts a rogue space in "javascript" above.
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.