SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 288 | Next

James Kennard

"Mastering Joomla! 1.5 Extension and Framework Development"

This
function is executed when toolbar buttons are used to submit the form.
The first part of the function checks that the button that has been pressed is not
cancel. If it is, then the function stops because no validation is required.
We then continue to retrieve the value of text. We don't used form.text.value to
retrieve the value because some editors don't support this. Instead, we use $editor
->getContent('text'); this returns a JavaScript string, which when executed gets
the value of the editor named text.
Once we have done this we proceed to check the values of the two fields. If either of
them is empty, we present a JavaScript alert box. When we translate the text to show
the alert, we provide a second parameter of true. This makes the translated text
JavaScript safe.
If no validation problems are encountered we proceed to submit the form. In order to
do this, we use a JavaScript function called submitform().
If you require more complex JavaScript form validation, you might want to
investigate the use of the behavior.


Pages:
276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300
druga wojna światowa Free English grammar and study guid hotel jelenia góra Russian bride counter strike 1.6