validator not working when page is served from a different machine

D

Don

I have a page with a required field validator and it is working fine.
We put this project on another developer's machine and the validators
do not work. We get a javascript error that says 'Invalid Character
at line 24' but that line is not even javaScript.

This project is in sourceSafe and we both have done 'get latest
version' so I know the code is the same. This is not a browser
config issue because if I browse to his machine the valdiator does not
work and if he browses to my machine they do work.

I've noticed that the onsubmit property of the form tag is different
when my machine serves then page than it is when the page is served by
his machine. Below are the onsubmit properties:

Good onsubmit:
"if (!ValidatorOnSubmit()) return false;"

Bad onsubmit:
"ValidatorOnSubmit();"

Why would the same code generate different HTML?

Don
 
A

Andrea Zani

Don said:
I have a page with a required field validator and it is working fine.
We put this project on another developer's machine and the validators
do not work. We get a javascript error that says 'Invalid Character
at line 24' but that line is not even javaScript.

If machina is Win 2003, install Framework Service Pack 1 for win 2003.
 
D

Don

The machine is XP. I see that I have a hotfix (KB886904) and the other
machine does not. I'm going to try to find this hotfix and install it
on the other machine. Is the service pack 1?
 
W

WJ

I have a problem that is not very similar to yours but is close. Here goes:
my PC is Windows xp pro.sp2. IE6.x (lattest), pn certain websites such as
http://dictionary.com, when I enter a word that it does not know, a message
says:

<<<
A Runtime error has occurred. Do you wish to debug ?
Line: 1
Error: Syntax error
But then I went to other PC and attempted the samething, it works fine. So I
rebuilt by PC, it ran for a while and the same thing happenned again ! Very
weird!

*** I then tried to view the source code of the page, sometimes I could view
it in NotePad, othertimes (on the same website), the "view source" menu itm
is grayed out. When I could view the source, I saw nothing wrong with Line 1
and or I donot know where "Line: 1" is to begin with. Windows does have its
own mind ! I quit debugging it.

John
 
J

John Rivers

this is the sort of problem

that is likely to arise when

using a badly designed platform

such as asp.net's htmlcontrols, usercontrols, servercontrols

if you continue to use these controls

your job will contain many unhappy hours of debugging and

reverse engineering, just to achieve a lesser result

my recommendation is to avoid them and implement such
features yourself

you will gain:

- predictability
- save time learning arbitrary technology with doubtful value
- ability to fix your code (you can't rewrite broken microsoft stuff,
you have to wait for them to fix it)
- protection from future "updates" that break your apps

would you trust a third party component to generate javascript on the
fly?

of course not! so why trust these controls?

top end websites do not use *these features* of asp.net - they just use
the good bits

the fact that you need to install a hotfix proves my point perfectly -
ms first attempt was
flawed - hardly surprising they have bitten off more than they can
chew!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top