Forum Moderators: open
[quote]<html>
<head>
[b]<script src="../spellChecker.js"></script>
<script>
function openSpellChecker( txt ) {
var speller = new spellChecker( txt );
speller.openChecker();
}</script>[/b]
<style type="text/css">
<!--
.text { background-color:#000066; color:#CCFFFF; border-style:dotted; border-color:#0000FF; }
.button { background-color:#000066; color:#CCFFFF; width:110; }
-->
</style></head>
<body>
<div align="center">
<form action="" method="post" name="form" id="form">
<table width="85%" border="0" cellspacing="1" cellpadding="1">
<tr>
<td width="73%"><h1>New Article</h1>
<h3>Title:
<input name="title" type="text" class="text" id="title" size="100" maxlength="100">
</h3>
<p align="center">By:<?=$penname?> </p></td>
<td width="27%"> </td>
</tr>
<tr>
<td><h3>Article:</h3>
<p align="left">
<textarea name="article" cols="110" rows="25" class="text" id="article"></textarea>
</p>
<p align="right">
<input name="Submit" type="submit" class="button" value="Preview">
<input name="Submit" type="submit" class="button" value="Submit">
</p></td>
<td align="center" valign="middle"><p><a href="#" onClick="window.open('stylecodes.php','style')">Style Codes</a></p>
<p><a href="#" onClick="window.open('insertpicture.php','pic')">Insert Picture</a></p>
[b]<p><a href="#" onClick="openSpellChecker(this.form.article)">Spell Check </a></p></td>[/b]
</tr>
</table>
<p> </p>
</form>
<p> </p>
</div>
</body>
</html>[/quote]
when i click the spell check button it returns an error that says
this.form.article is null or not an objectand doesn't open the spell check window
HELP
You could also use: document.forms["form"].article or "document.form.article" as well as the options other people have mentioned above.