Re: [Javascript] Problem with ¿uncompatible code?

Roger Roelofs rer at datacompusa.com
Sun Aug 22 22:47:51 CDT 2004


Alejandro,

On Aug 22, 2004, at 10:05 PM, Alejandro Celery wrote:

> Well, the problem i´ve been having, is that Netscape (and Mozilla 
> Firefox,
> just tried it) doesnt seem to follow on the link. The link calls (i´m
> guessing here) a validation routine for the text message, it checks 
> for the
> right amount of character in the destination number, the message, if 
> there
> is a sender, etc. If you´d like to try it, enter anything in any 
> field, and
> if you get any sort of error, then it´s just me. BUt i´m thinking
> something´s off or not compatible with the code. Firefox also has 
> source
> code highliting, and it also shows black a good chunk of the code, it 
> looks
> like a function (i know C, not javascript sorry). MSIE works perfectly 
> with
> it, i´m guessing it was written for MSIE only; but I thought i could 
> do some
> research. Perhaps bash the designer a little, it seems pretty mediocre 
> to
> me. Perhaps there is a good reason to do it that way, you tell me.

I'm sorry my spanish isn't good enough to be much help, but let me try 
anyway.

When I look at the code, I don't understand why it works in any 
browser.  The form has a submit handler 'validainfotext(this)', but 
there is no submit button on the form.  If I press the enter key while 
I'm in an input field, the form submits and the validation code runs 
just fine.

In short, move the submit handler to an onclick on the input type 
image, or replace the image with a submit.

The javascript code the page is using could be much improved.  it looks 
like the designer just found code on the web and stuck it in.

Roger,

Roger Roelofs
Datacomp Appraisal Services



More information about the Javascript mailing list