PDA

View Full Version : how to pass an argument to a function (javascript)


xianwinwin
12-03-2006, 08:45 PM
Hi there,

I have the following javaScript code (below) and wonder how to pass an argument to win1. I would like to change the message 'all information comes here' with something else that is passed in run time from the user.

Thanks for any help.



<script type="text/javascript">

win1 = new Window('1',
{className: "alphacube",
title: "* title *",
width:200,
height:150,
top:70,
left:100});

win1.setCookie();
win1.getContent().innerHTML = "<h1>all information comes here</h1>";

WindowStore.init();
</script>