0

Hi to all,

I have function (called Cal() ) which is in another function that called when the page is onload.


The problem is the Cal() should call when the button is onclick .
but in the program, it can't work ,
(I attaches file )


Can any body help me !!!!


Thank you.....

3
Contributors
6
Replies
7
Views
6 Years
Discussion Span
Last Post by mini programmer
0

if you want Cal to run you must put parentheses at the end of it

<input type="button" onClick="Cal()"> // with parentheses at the end that will work
0

Thank you ,
I did not know why I deleted () from the calling. I sure that this wrong is in writing quickly .


OK , I corrected the error but still the problem , and re-updated the attachment .

I hope to check it , if you can

Edited by mini programmer: n/a

0

Ok from what i see, you are calling a function from a button. The only problem is that the function itself is missing. do something simple like

function Cal() {
    alert("hi");
}
0

the function itself is missing. do something simple like

Ok, I did this :

function Cal() {
   
      alert("hi");
   
      }

and I deleted the rest sentences , but it don't present the alert message


Thank you ..

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.