Dev.Opera - Follow the standards, break the rulesDev.Opera - Follow the standards, break the rules

Login

Lost password?

Forums » Article Discussions

Discuss the articles posted on Dev.Opera.

Note: You need to login to post in the forums. if you don't have an account you first need to sign up.

By operadev anchor Wednesday, 21. May 2008, 07:25:29

Adding a docked mode to your widgets



( Read the article )

By IceArdor anchor Sunday, 25. May 2008, 06:25:16

avatarThe links in this article are broken for people outside of the LAN.

Post edited Sunday, 25. May 2008, 07:18:12

By moginspace anchor Wednesday, 18. June 2008, 04:12:16

avatarI am wondering how to add functionality to a button or even a text link to dock the widget.

I have two separate divs, one for widget and one for docked in my index, like the article says.

I have placed the line <widget dockable="yes"> into the config.xml file, like the article says.

I have added all the Javascript to my script/example.js file like the article says.

So now what do I do? I am kind of new with adding active/event listeners and calling them or however they are accessed in javascript. I tried adding something like these to the top of my index.html code but they did not work:

<button onclick="handleDockedMode();">Dock it</button>

then I also tried:

<button onclick="handleModeChange(widgetmodechange);">Dock it</button>

I guess I just would like to know how to code the dockable button portion.

Any assistance is appreciated.

Post edited Wednesday, 18. June 2008, 14:56:47

By Profnovice anchor Wednesday, 18. June 2008, 13:47:17

avatarWidget emulator - Access denied. ?????????????????????????????????????????????????????????????????

By torbencj anchor Wednesday, 18. June 2008, 19:06:33

avatarYeah SDK introduction page ( http://dev.opera.com/articles/view/opera-widgets-sdk/ ) points to this:

http://dev.opera.com/articles/view/widget-emulator/

"Access denied"

Where to get?

By RainerHillebrand anchor Friday, 27. March 2009, 09:18:28

avatarI apologise that I did not test your example in the Opera widget emulator. However, I wonder whether this example could really work. My experience is that ...style.display does not work on Opera Mobile, even in version 9.51 Beta (Build 2723). Here is some very simple sample code:

<!DOCTYPE html>
<html>
<head>
<title>Test style.display</title>
<script type="text/javascript">
function handleDockedMode()
{
document.getElementById("widget").style.display = "none";
}
</script>
</head>
<body onload="javascript:handleDockedMode();">
<div id="container">
<div id="widget">This text should be hidden.</div>
<div id="docked">This text should be visible.</div>
</div>
</body>
</html>

Moderators: pepelsbey | dstorey | mcx | operadev | chrismills | shwetankdixit | brucelawson | iheni | andreasbovens | zibin | mollydotcom