Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

problems with javascript

Hi guys,
I have a web application (.NET 2000, Framework 1.0, ASP.NET. C#, SQL Server 2000) that uses some javascript code to check if textboxes are filled with data (specially during searching) and that the data inserted into the textboxes is correct.
If the textbox is empty or the datatype is incorrect, javascript is executed and it shows a message onscreen.
Since a few days, the javascript code is not ejecuting correctly on the production webserver, everytime we execute the javascript code (for example, leaving the textboxes empty), it shows an error message.
The problem is that the same application works correctly on the testing webserver.
Does anybody knows why is it happening ?
What should be installed or setted on the webserver in order to execute javascript correctly ?

Thank you all
[833 byte] By [Michael] at [2007-11-11 7:06:24]
# 1 Re: problems with javascript
Hello guys,
I couldn't solve the problem yet and I do really don't have any idea why is this happening...
Any idea will be appreciated, please help !

Thank you all
Michael at 2007-11-11 23:14:05 >
# 2 Re: problems with javascript
Are you using validation controls to do this, if so webui validation javascript file should be accessible i guess under your website root in IIS. you should have this file under
aspnet_client\system_web\1_1_4322\WebUIValidation.js . I am guessing you are using validation controls .. if not let me know and I will see how I can help You

Are you using server controls with there own javascript on the web page ?
Or is your javascript in a .js file and included in the html layout
srinivas_s at 2007-11-11 23:14:59 >
# 3 Re: problems with javascript
Hi Srinivas !
First of all, thank you for helping. I just asked the webserver admin to check the settings you sent me.
We are using the Javascript in a .js that is included in the HTML layout.

Thank you again
Michael at 2007-11-11 23:16:04 >
# 4 Re: problems with javascript
Can you see if the folder having the .js file is a virtual folder in your test server, and in your production server. Compare the permissions and settings of these servers , there has to be something different between the two for this to happen. Basically the .js files folder should be available for the client to see

Another thing i may be dumb :) in asking you to check this, the client browser for the production server which did not work, did it have its scripts enabled some people unknowingly might disable the browser script settings ..
srinivas_s at 2007-11-11 23:16:58 >
# 5 Re: problems with javascript
Hi Sri,
We're checking all these settings.
I can confirm that it's not a problem with the client, because I tried it myself with my browser (that is well configured) and it's not working so I agree with you it's a problem on the server side of the application.
I wanna thank you for your help :D
Michael at 2007-11-11 23:18:02 >
# 6 Re: problems with javascript
Hi Sri,
This is what webadmins found On the production server (the one that give us errors) :

WebUIValidation. js located within the following folders: - aspnet_client\system_web\1_0_3705_0\.

-aspnet_client\system_web\1_0_3705_288\

- aspnet_client is a virtual directory - Directory Browsing is not checked . (users cannot browse this directory) but it's not on the testing servers (the ones that work correctly)

Do you think the problem are these ?

Thank you again
Michael at 2007-11-11 23:19:08 >
# 7 Re: problems with javascript
Are you saying on your production server , Directory Browsing is not checked and on your testing server the one that works has this checked..?

There is another Script Source Access checkbox try checking and see if it works.
I am not sure if directory browsing checked is secure because it would allow a user to browse the folders under aspnet_Client folder.. and this means if i delete the .js files your whole site fails and by default these are located at the same place for asp.net so its a security flaw i would say
srinivas_s at 2007-11-11 23:20:06 >
# 8 Re: problems with javascript
Hi Sri,
In testig server Directory Browsing is not checked either.
I really don't understand what's going on :(
The problem is that I'm not the webserver admin, I'm letting the admin know what should he check on the webserver, but I'm not the onethat change settings on the server, so it's difficult for me to unaderstand what's wrong.
I want to thank you for your help, I really appreciated it.
I'll let you know if it worked :D
Michael at 2007-11-11 23:21:05 >
# 9 Re: problems with javascript
Hi Sri !
Just a few lines to tell you... IT WORKS !!!!!!
It was a security problem as you said !
I really really wanna thank you VERY VERY VERY much for your help.

THANK YOU ! :D :WAVE:
Michael at 2007-11-11 23:22:07 >
# 10 Re: problems with javascript
Thats good to know Michael. welcome anyday :) , sometimes asp.net knows how to frustrate you wonder whats in store when we start migrating from 1.1 to 2.0 lol
srinivas_s at 2007-11-11 23:23:08 >