Now fixed - the error is a firefox 1.0 bug and the problem was a typo!

Daz

On 03/03/06, Darren West <[EMAIL PROTECTED] > wrote:
Thanks Richard and Jesse for your earlier help, thats all working now.  I hope you don't mind but I could do with your assistance again :-)

I am now trying to clear the default value of a field (which works fine) and then restore the default value if there is no user input. The problem is I get the following error:

Error: [Exception... "'Permission denied to get property XULElement.selectedIndex' when calling method: [nsIAutoCompletePopup::selectedIndex]"  nsresult: "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)"  location: "JS frame :: http://ta.rt-ms.net/teamengine/assets/js/global.js :: anonymous :: line 10"  data: no]
Source File: http://ta.rt-ms.net/teamengine/assets/js/global.js
Line: 10

The files are:

http://ta.rt-ms.net/teamengine/home.html
http://ta.rt-ms.net/teamengine/assets/js/global.js

Thanks guys

Daz



On 02/03/06, [EMAIL PROTECTED] <[EMAIL PROTECTED] > wrote:
Hi Daz,

The problem is, your form is being submitted. That's why it looks like it
only highlights for a second.

The easiest fix is to change to >validateForm()". The 'onclick' call itself needs to return false to stop
the submit.

You may want to consider using the onsubmit event on the form instead.
This would catch the form being submitted by users hitting Enter.

You also might want to consider attaching the event completely in
_javascript_ instead of as an attribute in the HTML. But this is up to you.

Cheers,
Jesse Skinner
http://www.thefutureoftheweb.com/

> Hello All,
>
> I am slowly learning the DOM and _javascript_, and have started applying
> scripts for validation, the validation part works fine (I think)
> however the problem is I am trying to highlight fields which do not
> validate and they only highlight for a second (I think while the field
> is checked against a the regular _expression_).
>
> The pages are:
>
> http://ta.rt-ms.net/validate/emailagent.html
> http://ta.rt-ms.net/validate/assets/js/support.js
>
> Thanks
>
> Daz


******************************************************
The discussion list for  http://webstandardsgroup.org/

See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
******************************************************



Reply via email to