Jason28 Posted December 7, 2008 Share Posted December 7, 2008 Hello, could you please provide me with a working example of how to make it so javascript removes http:// from a form field before submitting it? Thanks Link to comment https://forums.phpfreaks.com/topic/135899-solved-remove-http-from-a-field-using-javascript-function/ Share on other sites More sharing options...
Jason28 Posted December 7, 2008 Author Share Posted December 7, 2008 Yay nevermind I figured it out myself from searching and combining different codes I found function removeAst(fieldObj) { fieldObj.value = fieldObj.value.replace("http://",""); } and add: onchange="removeAst(this);" to the form field and it works Link to comment https://forums.phpfreaks.com/topic/135899-solved-remove-http-from-a-field-using-javascript-function/#findComment-708444 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.