Solved

user control with <html> tags

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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ASP.NET Core index.html  LOCALHOST page cannot be found 2 52
ASP.net show message while code is running 3 17
Modal Popup Extender control 1 18
asp enable view state 1 24
I have developed many web applications with asp & asp.net and to add and use a dropdownlist was always a very simple task, but with the new asp.net, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

775 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