Page 1 of 1

object expected error message

Posted: Sat Dec 03, 2011 1:43 pm
by lipun4u
whats wrong in the following code at line 26 ??

Code: Select all

<html>
<HTA:APPLICATION
APPLICATIONNAME="Simple HTA"
SYSMENU="yes">
<head>
<title>Simple HTA</title>
<style type="text/css">
body { background-color:#0099CC;}
p { font:bold 18px Arial, Helvetica, sans-serif;}
</style>
<style language="javascript" type="text/javascript">
window.resizeTo(640,480);
function validate()
{
	RunScript();
}
function RunScript()
{
	alert("form is okey");
}
</style>
</head>
<body>
<p>Simple HTA</p>
<form>
<input type="button" name="btnStrt" value="Start" onclick="validate()"/>  //line 26
</form>
</body>
</html>
it gives error message objects expected.

Re: object expected error message

Posted: Sun Dec 04, 2011 12:53 am
by Gopesh
Hi,Use <script> instead of <style>.
<style language="javascript" type="text/javascript">
window.resizeTo(640,480);
function validate()
{
RunScript();
}
function RunScript()
{
alert("form is okey");
}
</style>
Try this

Code: Select all

<script language="javascript" type="text/javascript">
window.resizeTo(640,480);
function validate()
{
        RunScript();
}
function RunScript()
{
        alert("form is okey");
}
</script>

Re: object expected error message

Posted: Sun Dec 04, 2011 1:41 am
by lipun4u
thankx a lot