![]() |
|
|
|||||||
| Javascript and Ajax Questions and information about working with Ajax and Javascript in Delphi for PHP. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Heres what I have for code the rest works except fot the first line and I'm not sure what I am missing?
function emailJSFocus($sender, $params) { ?> document.Vendor('email').select(); findObj('email').style.backgroundColor= '#fdfbd9'; <?php } function emailJSBlur($sender, $params) { ?> if (document.getElementById("email").value == "") { findObj('email').style.backgroundColor= '#ffcaca'; document.getElementById("email").value = "Required!" } if (document.getElementById("email").value.indexOf ('@', 0) == -1) { findObj('email').style.backgroundColor= '#ffcaca'; document.getElementById("email").value = "Not valid!" } else { findObj('email').style.backgroundColor= '#d0ffca'; } |
| Sponsored Links |
|
|
|
|||
|
Does this work with and edit field on a pagecontrol? I tried this earlier without any luck.
Also something else I noticed when you double click an edit box it wont highlite the text either. I think I read somewhere today that you have to use text box's instead of edit box's with pagecontrols is that correct? Last edited by Dennis445; 16th April 2009 at 23:59. |
|
|||
|
Ok answered my own question the edit field has issues on a pagecontrol.
I did notice one other thing both controls on an empty canvas will accept the select command but behave different. Edit field will select all text when clicked with the mouse and when tabbed. Text field will only select all text when tabbed not when clicked with the mouse. 405hp - thanks for the answer, my head hurts. Last edited by Dennis445; 17th April 2009 at 00:27. |