Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

allegutta

macrumors newbie
Original poster
Mar 30, 2010
3
0
Hi!

Im new to programming dashboard widgets.

I am making a simple widget just to learn how to make widgets, but I need some help with programming a button.

I want the program to write something on the screen when I push the button.


my code:



<html>
<head>

<script type="text/javascript">
function = test(){
document.write("test");
}
</script>

</head>
<body>

<input type="button" onclick="test()" value="Write test!">

</body>
</html>


The problem is that the widget closes when I press the button.

Does anyone know how to fix this?

Regards allegutta!
 
Im just learning java but if i remember correctly...

The program terminates after it completes it's task so you need to set up an additional task like "press enter" so it doesn't close.

I'm just learning so i dont know how to write it, so sorry if i wasn't any help.
 
Im just learning java but if i remember correctly...

The program terminates after it completes it's task so you need to set up an additional task like "press enter" so it doesn't close.

I'm just learning so i dont know how to write it, so sorry if i wasn't any help.

This has absolutely, 100% nothing to do with Java at all.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.