"Sam Samnah" <webmaster123@terraquest123.ca> wrote in message
news:Opg8BXOfFHA.3256@TK2MSFTNGP12.phx.gbl...
>I get the folling error message:
>
> "Microsoft JScript runtime error:'null' is null or not an object"
>
> the error is referring to the following script:
>
> "function moveCurser(divMenu, hidMenu)
> {
>
> var i;
>
> var j;
>
> i=document.getElementById(divMenu);
>
> j=document.getElementById(hidMenu);
>
> j.value=i.innerHTML;
>
> alert(j);
>
> }"
>
> this function is called on the following statement:
>
> "<input name="FreeForm1:_ctl4" id="FreeForm1__ctl4" type="hidden" /><div
> CONTENTEDITABLE="true" width="100%" height="100%"
> onfocusout="moveCurser(oDiv,FreeForm1__ctl4)" id="oDiv"></div>"
>
> Any help with this is much appreciated. I don't know what is wrong with
> this script.
>
> Thank you in advance-
>
> Anyhow for further understanding of whats going on here below is the
> markup for the entire page:
>
> "
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
>
> <HTML>
>
> <HEAD>
>
> <title>Testing</title>
>
> <meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
>
> <meta content="C#" name="CODE_LANGUAGE">
>
> <meta content="JavaScript" name="vs_defaultClientScript">
>
> <meta content="
http://schemas.microsoft.com/intellisense/ie5" > name="vs_targetSchema">
>
> <LINK href="http://localhost/RainbowCentre1/CSSScript/Rainbowcss.css"
> type="text/css"
>
> rel="stylesheet">
>
> </HEAD>
>
> <body MS_POSITIONING="GridLayout">
>
> <form name="Form1" method="post" action="Testing.aspx" id="Form1">
>
> <input type="hidden" name="__VIEWSTATE"
> value="dDw4NTY2MjIyMzg7dDw7bDxpPDE+Oz47bDx0PDtsPGk8MT47PjtsPHQ8O2w8aTwzPjs+O2w8dDw7bDxpPDE+Oz47bDx0PDtsPGk8MT47PjtsPHQ8dDw7aTwwPjtpPC0xPj47Oz47Pj47Pj47Pj47Pj47Pj47PjhxeeTad9uYg+9YCHZJQoV0B3zl"
> />
>
> <script language='javascript' type='text/javascript'>
>
> function moveCurser(divMenu, hidMenu)
>
> {
>
> var i;
>
> var j;
>
> i=document.getElementById(divMenu);
>
> j=document.getElementById(hidMenu);
>
> j.value=i.innerHTML;
>
> alert(j);
>
> }
>
> </script>
>
>
>
> <script language='javascript' type='text/javascript'>
>
> window.onload=doInit;
>
> function doInit()
>
> {
>
> for(i=0;i<document.all.length;i++)
>
> document.all(i).unselectable = 'on';
>
> oDiv.unselectable = 'off';
>
> oDiv.innerHTML='';
>
> oDiv.focus();
>
> }
>
> function callFormating(sformatString)
>
> {
>
> document.execCommand(sformatString);
>
> }
>
> function ChangeFormat(strid)
>
> {
>
> var sSelected2=document.getElementById(strid);
>
> var sSelected3=sSelected2.options(sSelected2.selectedIndex);
>
> document.execCommand('FontName',false,sSelected3.text);
>
> }
>
> function changeFontSize(strid)
>
> {
>
> var sSelected1=document.getElementById(strid);
>
> var sSelected=sSelected1.options(sSelected1.selectedIndex);
>
> document.execCommand('FontSize',false,sSelected.value);
>
> }
>
> </script>
>
>
>
>
>
> <table id="FreeForm1"
> style="background-color:#C0C0FF;border-color:Navy;border-width:1px;border-style:Solid;height:100%;width:100%;">
>
>
> <tr height="1">
>
>
> <td>
>
> <img Src="http://localhost/RainbowCentre1/Images/Bold.gif"
> Onclick="callFormating('bold')" />
>
> <img Src="http://localhost/RainbowCentre1/Images/italic.gif"
> Onclick="callFormating('italic')" />
>
> </td>
>
>
> </tr>
>
> <tr height="1">
>
>
> <td>
>
> <select id="FreeForm1:_ctl3:_ctl0" name="FreeForm1:_ctl3:_ctl0">
>
> </select>
>
> </td>
>
>
> </tr>
>
> <tr bgcolor='#ffffff' height='100%' width='100%'><td valign='top'><input
> name="FreeForm1:_ctl4" id="FreeForm1__ctl4" type="hidden" /><div
> CONTENTEDITABLE="true" width="100%" height="100%"
> onfocusout="moveCurser(oDiv,FreeForm1__ctl4)" id="oDiv"></div></td></tr>
>
> </table>
>
> <input type="submit" name="ButtonClick" value="Submit" id="ButtonClick" />
>
> <span id="FieldTest"></span>
>
> </form>
>
> </body>
>
> </HTML>"
>
>