1

There is a script file that I wrote. I included it to my page at the top of codes in head tag after 3 other scripts. The others works as well but the last one that I said, never gonna be load into the page. I had same problem like this many times ago but I cant remember how I fixed it.

Here's the question for me. Why others works, but this script not. And of course when I went to the Browser View Source at runtime and I clicked on this script link it gave me this error:

Not Found
The requested URL /dreamfactory/mainsite/scripts/bbcodeeditor.js was not found on this server

I'm running on localhost and all scripts are in the scripts folder. Like jQuery, and a Main script. (There is no conflict).

UPDATE

Sorry for bringing up this question but I should write something that might be helpful to a reader some day. If you've linked your file in the page and it's not getting loaded, the number 1 reason is that you have an error in that script file. For detecting your script you can run developers tool(like Firefox's Web Console) provided in browsers and go to the Console tab to see what line is causing the problem. Be sure to check your file with one or two browsers. I saw that the Firebug does not warn about the syntax(e. g. defining a default parameter ..., arg = '') in javascript which is wrong thing) in your script file so I used FF, IE or Chrome developers tool for example.

4
  • 1
    If you get "File not found" this problem got nothing to do with JavaScript. Something went wrong with your server. Commented Jan 9, 2011 at 9:17
  • 1
    Are you sure you referenced it correctly in the page? Are you certain it is in the right folder? Can you post your HTML, where you are including the file? Commented Jan 9, 2011 at 9:19
  • I hope so ShadowWizard. Because everything in my codes are correct. Commented Jan 9, 2011 at 13:18
  • I examined it for million times ! Oded. I cant send it by single because It's in a bigger project. Commented Jan 9, 2011 at 13:20

1 Answer 1

2

So there is nothing wrong with the way you've included the script on your page. The error message says it all: the script is not being found by your server. Check:

  • The script is there on the filesystem
  • Script name is correct
  • That the path and filename have the correct capitalisations (upper, lower casing)
Sign up to request clarification or add additional context in comments.

1 Comment

You were right. But something happened to me that I never forget it. First I added runat="server" attribute to it and it was fixed. But after that when I omit runat="server", again it was fixed !. I don't know why, but now it's right. And one thing else. I included it again in my page. Maybe it was for my editor. (WeBuilder 2010)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.