Where is the onclick function in this HTML snippet defined?

It's not built-in. If you look at the source code, it's defined as.

– mehdi May 10 '11 at 22:10 1 Darn it Kei, you beat me to it :-) mehdi, this is the script it runs, do a right click on the page and choose view source. I've pasted the HTML source in my answer, but kei got there first :-) – Welshboy May 10 '11 at 22:12 your right I saw it. – mehdi May 10 '11 at 22:16 if we define a function in php can I replace with Circle_calc();?

– mehdi May 10 '11 at 22:16 @mehdi Here's an example of that: link. – bacchus May 10 '11 at 22:42.

Unfortunately, that's a pretty crappy tutorial using outmoded techniques and non-standard HTML elements. Circle_calc is not a builtin function... the tutorial has simply neglected to define it, or indicate that it is defined elsewhere. Strongly suggest you find another site for your tutorials, but unfortunately have none to recommend as I haven't needed one in a while :S.

Second to another tutorial - apart from breaking standards it appears to be very old. – maarons May 10 '11 at 22:11 if it possible we define a function in html? – mehdi May 10 '11 at 22:12.

Actually the function is defined, it just isn't showed in the tutorial code - look at the source to find it.

They have been quite naughty methinks, If you do a view page source on that page, and look at the way THEY'VE done the form, then you'll see this: radius: circumference: area: As you can see, you now have the HTML code in context, and you can actually see the script that the HTML executes. And as the script is inside the HTML file, you wouldn't need to have an import (if that's the right phrase) at the top of your HTML file telling it which script file to use. Also I would strongly recommend using the W3c Schools tutorials, they're miles better and they can be found here: w3schools.com/w3c/w3c_html.asp.

In the beginning of the tutorial it is stated: `onClick` gives the script to run when the user clicks on the input. `onClick` applies to buttons (submit, reset, and button), checkboxes, radio buttons, and form upload buttons. The function is defined in the source code of the page: function Circle_calc(GeoForm) { ... } The function accepts the form as an argument that will be used by the JavaScript function to perform read/write operations over the values in the text fields of the form.

I hope this helps.

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