user control with <html> tags

Posted on 2004-08-12
Last Modified: 2010-04-07
Our designer comes up with a page header with javascript code in it.  The script makes image rollover.  Its code looks like

<script language="JavaScript">
function xxx()

<body onload="functionName()">

<img onMouseOver="functionName()"

 I have made the header as an user control and put it in every page.  But the html page viewer gets has <html> tags embeded in <p> tags since the user control introduces them.

Please advise how I can solve the problem.

Question by:Jinghui Li
  • 2

Accepted Solution

trevorhartman earned 500 total points
ID: 11788898
get rid of the <html> tags.  something like this:

<script language="JavaScript">
function xxx()

window.onLoad= functionName();

<img onMouseOver="functionName()"


Author Comment

by:Jinghui Li
ID: 11788906
So no onload in the <body> tag?

Expert Comment

ID: 11788915
you don't need it.  the window.onLoad=functionName() takes care of that

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now