"Samir" <Sa***@hotmail.com> writes:
1. Here is my javascript
<script language="JavaScript">
Should be
<script type="text/javascript">
The "type" attribute is required in HTML 4, and it is always
sufficient.
function link(linkname){
strvar1 = linkname
window.main.location=""+strvar1+".asp"
This could be just:
window.main.location = linkname + ".asp";
although I would prefer:
frames["main"].location = linkname + ".asp";
}
</script>
2. Here is part of my code
<img onclick="link(editoffice)" border="0" src="test_m1_i3.png" />
You want the string "editoffice" to be sent to the link function. However,
what you have written is a variable called "editoffice", and its value
(if it had any) to be sent to the link function. Since the variable doesn't
exist, this will just throw an error.
Use:
<img onclick="link('editoffice');" style="border:none;"
src="test_m1_i3.png" />
(Are you sure you want to write XHTML?)
/L
--
Lasse Reichstein Nielsen -
lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'