If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Enjoy an ad free experience by logging in. Not a member yet? Register.

ajax really not needed, nor an iframe for that matter. Someone wants to upload an image called "dogface.png". You have that name and should know where your php is going to place it. I'd put it into a folder. When ajax tells you success has happened display the image.

Only if you are studying history - most of the JavaScript that site teaches is the antiquated way you had to do it for Netscape 4. Modern browsers support the far superior modern unobtrusive version of JavaScript that can be attached to the bottom of the HTML and interact with the entire page.

Try to put two scripts written the w3schools way into the one page and likely they will break one another - that's the cause of perhaps 25% of the beginner posts about JavaScript - clashes caused by using antiquated coding methods.

@esthera: Sorry my mind reading skills are so bad. No way to know you were putting image on another page without code (Show the importance to paste code here) and your insistence on not refreshing the page thew me.

@felgall: I do understand that W3School is not the be all, end all, but it is a great site to learn from, it is my first go to page for advice. It does answer my questions 90%+ of the time. If I knew of a good site that kept up to date on javascript I'd go there. I find sites with bits and pieces, but never one with all or most of the current info.

or just google whatever it is you're learning: "mdn websockets" or "mdn localstorage" or "mdn a ping" almost always gets the latest info out there and well-written comprehensive documentation, up-to-date compat tables, and relevant examples.

i would not use w3fools for anything, they are outdated in their references, the tutorials demonstrate improper ways of doing things, and then there's all the advertising... yuck.

Create, Share, and Debug HTML pages and snippets with a cool new web app I helped create: pagedemos.com