Simple ajax/prototype problem?

You haven't shown us your myValidation. Js file, but here are the typical reasons I see when people move from inline script blocks to external files and things stop working: They put script blocks in the external JavaScript files. You probably didn't do that, but I've seen it often enough to mention it.

Your external script is pure JavaScript, so for instance it should be: function Validate() { // ... } not: script type='text/javascript'> function Validate() { // ... } If you see the JavaScript, great; if not, you probably have more information For issues like this (and hundreds of others), there's nothing like having a decent toolset. For debugging JavaScript on browsers, there are quite a few. There's Firebug (a Firefox add-in), Chrome's and Safari's Development Tools (built into the browsers), Microsoft Visual Studio or Script Debugger for debugging with IE, etc.Firebug and Dev Tools would both tell you about broken src links, as well as any exceptions, etc.

You haven't shown us your myValidation. Js file, but here are the typical reasons I see when people move from inline script blocks to external files and things stop working: They put script blocks in the external JavaScript files. You probably didn't do that, but I've seen it often enough to mention it.

Your external script is pure JavaScript, so for instance it should be: function Validate() { // ... } not: I've seen the latter a fair bit. They put the JavaScript file in a location that doesn't match their script tag src. They left an opening in the script.

Important not to do that, in external JavaScript files those are syntax errors. They're using a web server that's case sensitive and the src attribute and the file's actual name don't match. They're using a web server sensitive to permissions and the file doesn't have the right permissions.In the case of the last two above, it's easy to check: Just open a new tab and actually enter the URL of the JavaScript file.

If you see the JavaScript, great; if not, you probably have more information. For issues like this (and hundreds of others), there's nothing like having a decent toolset. For debugging JavaScript on browsers, there are quite a few.

There's Firebug (a Firefox add-in), Chrome's and Safari's Development Tools (built into the browsers), Microsoft Visual Studio or Script Debugger for debugging with IE, etc. Firebug and Dev Tools would both tell you about broken src links, as well as any exceptions, etc.

Tag is in Js file – phpEnthusiast Sep 12 '10 at 14:46 He's not binding anything. The JavaScript interpreter will look for a Validate function at the point when the user clicks the link, not sooner. (You're thinking of people prematurely trying to hook up handlers in a more modern way, e.g. Prototype's observe method and the underlying addEventListener/attachEvent it uses.

) – T.J. Crowder Sep 12 '10 at 14:49.

Problem solved. In /js/ folder I had one php file, that I put there just because of simplicity. After moving it to other location all worked.

Don't know if that is rule, nut no php files in /js/ folder. Thanks T. J and Tomasz.

Im beginning with Ajax, I have problem with including Ajax files. Ajax code written in original page (like index. Php) and placed in (head) section works fine, but when I try to place code in external file (in js folder, where is placed prototype.

Js file), I don't get any response, not even in Firefox Error Console. I haven't changed Ajax code except url for calling PHP function. I embaded this function call in html.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions