I have a javascript which I would like to use with links (on the add.html page). I am able to get the script working fine outside of links, but when I add it to add.html, I receive the following error:
Error: 'Type' is null or not an object
Code: 0
URL: http://domainname/cgi-bin/links/add.cgi
the javascript uses a .js file, url if you would like to download:
http://www.mattkruse.com/javascript/colorpicker/
I don't know enogh about javascripts to be able to edit them, but I am thinking that the problem may be with the href. I have included the code that I added to add.html below:
<head>
<title><%site_title%>: Add a Resource</title>
<link rel=stylesheet href="<%css%>" type="text/css" title="style sheet">
<SCRIPT LANGUAGE="Javascript" SRC="/javascript/ColorPicker2.js"></SCRIPT>
<SCRIPT LANGUAGE="JavaScript">
var cp = new ColorPicker('window'); // Popup window
var cp2 = new ColorPicker(); // DIV style
</SCRIPT>
</head>
<body>
<form>
<tr>
<td colspan="3"> <A HREF="#" onClick="cp.select(document.forms[0].header_font_colour,'pick');return false;" NAME="pick" ID="pick">Click
here to select colour</A>
<INPUT TYPE="text" NAME="header_font_colour" SIZE="20" VALUE=""> </td>
</tr>
<tr>
</form>
I have read that a few other members have had a similar problem to the one I have at the moment regarding javascript, but I have not been able to find the solution yet. I would be really greatful if someone could offer some help.
Thanks once again
Hamsterpants
Error: 'Type' is null or not an object
Code: 0
URL: http://domainname/cgi-bin/links/add.cgi
the javascript uses a .js file, url if you would like to download:
http://www.mattkruse.com/javascript/colorpicker/
I don't know enogh about javascripts to be able to edit them, but I am thinking that the problem may be with the href. I have included the code that I added to add.html below:
<head>
<title><%site_title%>: Add a Resource</title>
<link rel=stylesheet href="<%css%>" type="text/css" title="style sheet">
<SCRIPT LANGUAGE="Javascript" SRC="/javascript/ColorPicker2.js"></SCRIPT>
<SCRIPT LANGUAGE="JavaScript">
var cp = new ColorPicker('window'); // Popup window
var cp2 = new ColorPicker(); // DIV style
</SCRIPT>
</head>
<body>
<form>
<tr>
<td colspan="3"> <A HREF="#" onClick="cp.select(document.forms[0].header_font_colour,'pick');return false;" NAME="pick" ID="pick">Click
here to select colour</A>
<INPUT TYPE="text" NAME="header_font_colour" SIZE="20" VALUE=""> </td>
</tr>
<tr>
</form>
I have read that a few other members have had a similar problem to the one I have at the moment regarding javascript, but I have not been able to find the solution yet. I would be really greatful if someone could offer some help.
Thanks once again
Hamsterpants