By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,583 Members | 1,084 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,583 IT Pros & Developers. It's quick & easy.

Body onLoad Problem (ASP .NET & JavaScript)

P: n/a
Hi all.
I have a simple default.aspx file where I declare a JavaScript
function:

<script type="text/javascript" language="JavaScript">
....
function rotate() {
....
}
</script>
</head>

and, after that, I insert

<body ID="body1" runat="server">.

So, this is my problem: why does the validator tell me that "body1 is
not a member of _default" (error BC30456) if in default.aspx.vb I write
the following statement?

Me.body1.Attributes.Add("onLoad", "rotate()")

What I am trying to do is to call "rotate" function on body load..can
anyone help me?

Thanks in advance!!

Nov 21 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Try doing it the "old fashioned" way:

<body onload="rotate();">

Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"ce*****@libero.it" wrote:
Hi all.
I have a simple default.aspx file where I declare a JavaScript
function:

<script type="text/javascript" language="JavaScript">
....
function rotate() {
....
}
</script>
</head>

and, after that, I insert

<body ID="body1" runat="server">.

So, this is my problem: why does the validator tell me that "body1 is
not a member of _default" (error BC30456) if in default.aspx.vb I write
the following statement?

Me.body1.Attributes.Add("onLoad", "rotate()")

What I am trying to do is to call "rotate" function on body load..can
anyone help me?

Thanks in advance!!

Nov 21 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.