Isabelleg Posted November 17, 2011 Report Share Posted November 17, 2011 Hi, Caspio provides the js to auto clear on focus but don't go further to recall the text onblur ... i have a js but can't adapt it to caspio .. any help would be much appreciated. function remName(a, { if(a.value=={ a.value=''; }else if(a.value==''){ a.value=b; }else{ a.value=a.value; } } function chkName(a, { if(a.value==''){ a.value=b; }else{ a.value=a.value; } } var valeur = document.getElementById("InsertRecordEMAIL").value; document.getElementById('InsertRecordEMAIL').onfocus = remName(this, 'valeur'); document.getElementById('InsertRecordEMAIL').onblur = chkName(this, 'valeur'); Quote Link to comment Share on other sites More sharing options...
londoncity Posted November 30, 2011 Report Share Posted November 30, 2011 Hi Isabelleg, can you please provide us more details in order to address this post? Thanks Quote Link to comment Share on other sites More sharing options...
Isabelleg Posted December 11, 2011 Author Report Share Posted December 11, 2011 here is the caspio tutorial http://howto.caspio.com/customization/i ... areas.html but they don't provide the tutorial to reput the text onblur if no value has been entered. Quote Link to comment Share on other sites More sharing options...
ShWolf Posted December 14, 2011 Report Share Posted December 14, 2011 Hi, Try this document.getElementById('InsertRecordEMAIL').onfocus = function( e ) { remName(e, valeur); } document.getElementById('InsertRecordEMAIL').onblur = function( e ) { chkName(e, valeur); }instead of document.getElementById('InsertRecordEMAIL').onfocus = remName(this, 'valeur'); document.getElementById('InsertRecordEMAIL').onblur = chkName(this, 'valeur'); Let me know if this helps. Quote Link to comment Share on other sites More sharing options...
Isabelleg Posted December 22, 2011 Author Report Share Posted December 22, 2011 i tried this and it's not working, am i missing something ? where do you get the function (e) ? function remName(a, { if(a.value=={ a.value=''; }else if(a.value==''){ a.value=b; }else{ a.value=a.value; } } function chkName(a, { if(a.value==''){ a.value=b; }else{ a.value=a.value; } } var valeur = document.getElementById("InsertRecordEMAIL").value; document.getElementById('InsertRecordEMAIL').onfocus = function( e ) { remName(e, valeur); } document.getElementById('InsertRecordEMAIL').onblur = function( e ) { chkName(e, valeur); } Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.