Solved

user control with <html> tags

Posted on 2004-08-12
3
294 Views
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

<html>
<head>
<script language="JavaScript">
function xxx()
...

</script>
<body onload="functionName()">

...
<img onMouseOver="functionName()"
...
</body>
</head>
</html>

 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.


Biang
0
Comment
Question by:Jinghui Li
  • 2
3 Comments
 
LVL 8

Accepted Solution

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

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

window.onLoad= functionName();
</script>

...
<img onMouseOver="functionName()"
...


-Trevor
0
 

Author Comment

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

Expert Comment

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

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
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…

809 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