PDA

View Full Version : call to undefined method 'LoadURL'


thriputapriya
01-18-2006, 01:54 AM
Hello,

<canvas height="140" debug="true">
// Load the Laszlo site in a new window
<button onclick="LzBrowser.LoadURL('http://www.laszlosystems.com/', '_blank')">
Click me
</button>
<script>
// List the player version
Debug.write('Player version: ' + LzBrowser.getVersion());
</script>
</canvas>
If i run this code on lps-3.1,i am getting this error in debug.

WARNING: loadurl.lzx:4: call to undefined method 'LoadURL'

Could you rectify the above code.What is the wrong in that method.

Thanks,
-thriputapriya

d~l
01-18-2006, 01:56 AM
case sensitive syntax ..

use LzBrowser.loadURL .. not LzBrowser.LoadURL

Baphomet
01-18-2006, 02:59 AM
nah i dont think it's that because in the documentation it's also written with capitals. I think the slash is wrong, try this:

<button onclick="LzBrowser.loadURL('http://www.laszlosystems.com','_blank');" text="Click Me!"/>

thriputapriya
01-18-2006, 03:10 AM
Thanks to all!! -:)

Baphomet
01-18-2006, 03:25 AM
cheers :D

d~l
01-18-2006, 04:27 AM
nah i dont think it's that because in the documentation it's also written with capitals.

What old documents are you reading?

See LZX Reference (http://www.laszlosystems.com/lps-3.1.1/docs/reference/) .. LzBrowser

loadURL()
LzBrowser.loadURL(url, target)

the error message call to undefined method 'LoadURL' meant what it said .. LoadURL is incorrect!

The forward slash is a "red herring" .. the loadURL works with or without end slash.

Baphomet
01-18-2006, 05:09 AM
oh sorry i misread it i thought you typed "url" instead of "URL"