Changes

Jump to: navigation, search

Savefunc

526 bytes added, 15:30, 31 July 2009
no edit summary
'''Example1:'''
<pre>
function savefunc()
RunAnotherFunction()
do that
return Truetrue
}
</pre>
* Note that [[JavaScript]] is case sensitive.
 
'''Example 2:'''
* The following sample [[JavaScript]] function will prompt the user to confirm if they really want to save the record.
<pre>
function savefunc()
{
var answer = confirm ("Do you really want to save this?")
if (answer)
{
alert ("Consider it done")
return true
}
else
{
alert ("Keep filling it in then")
return false
}
}
</pre>
* ''The "return false" isn't strictly necessary. If the function does not return true then false is assumed.''
[[Category:JavaScript]]
0
edits

Navigation menu