Solved

user control with <html> tags

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

685 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