views:

145

answers:

4

I develop a web application which uses a lot of JavaScript. I developed first portion of code on my machine and everything works just fine. Problems occured after deploying to remote machine to IIS - the page runs but i.e. whole validation that I wrote doesn't run - I've checked under FF, IE6, IE7.. Are there any IIS properties to set to make it run?

EDIT I've just found out that the problem is here:

<script type="text/javascript">
   function validate() {
      return validateTrees();
   }
</script>

The validate() function is called here:

<asp:Button ID="btnSubmit" CssClass="button" runat="server" OnClientClick="return validate();" Text="Send for approval" />

And validateTrees() function is loaded dynamically from .js file by the control:

<cust:CustomTreeControl ID="CustomTreeControl 1" runat="server" />

which is placed just before this submit button. It seems that after deploy the browser can't find validateTrees() funtion.

+2  A: 

IIS shouldn't affect your JS in anyway (as long as the JS files are present and accessed properly).

Could you post some code examples of what you have (simple test cases, preferably) and what you expect it to do and what it isn't doing, and what, if any, errors you are getting.

Jonathan Fingland
+1  A: 

IIS has nothing to do with this.

Your javascript files are downloaded by the browser on the client machine and runs there, not on the server.

Make sure you published your files correct.

pixel3cs
A: 

Javascript typically runs on the client not the server. What makes you think this has anything to do with IIS?

Use a tool such as fiddler to confirm the browser is receiving all the content your expect.

AnthonyWJones
Please check my edits.
rafek
A: 

Ok, that was silly, I didn't update paths to scripts after deployment.

rafek
suggest you close the question, it's too localised to be relevant to anyone else
annakata