JavaScript and client side scripting.
Moderator: General Moderators
-
lipun4u
- Forum Commoner
- Posts: 82
- Joined: Wed Jul 01, 2009 3:35 am
- Location: Mumbai
-
Contact:
Post
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.
-
Gopesh
- Forum Contributor
- Posts: 143
- Joined: Fri Dec 24, 2010 12:48 am
- Location: India
Post
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>
-
lipun4u
- Forum Commoner
- Posts: 82
- Joined: Wed Jul 01, 2009 3:35 am
- Location: Mumbai
-
Contact:
Post
by lipun4u »
thankx a lot