ScottishDuck13 Posted December 10, 2015 Share Posted December 10, 2015 Hi guys,In my work we have to send texts to people through emails. The format needs to be +447123456789@sms.com (as an example).I have an HTML page with some helpful notes, links etc I keep open for quickness. What I want is to have a textbox on the page that I can type a standard mobile number into as '07123456789' and a copy button under it that will copy it as +447123456789@sms.com.So it needs to replace the '0' with '+44' and add the '@sms.com' on the end.I have seen it done before but can't figure out how. I know basic coding but I am better at tearing apart and rearranging to make it how I want than writing from scratch. Might be something really simple but I am just missing it!Any help would be much appreciated! Thanks Link to comment Share on other sites More sharing options...
Ingolme Posted December 10, 2015 Share Posted December 10, 2015 Have you learned any Javascript? Reading through the W3Schools Javascript tutorial should give you enough knowledge to do this. Link to comment Share on other sites More sharing options...
ScottishDuck13 Posted December 11, 2015 Author Share Posted December 11, 2015 Yeahhh not really looked at Javascript yet but looks like I might have to go down that route. Thanks for your reply, was just wondering if there was any simple way to do this. Link to comment Share on other sites More sharing options...
Ingolme Posted December 11, 2015 Share Posted December 11, 2015 Each language has its purpose. HTML give the page a structure, CSS give it appearance and Javascript is for behavior. HTML alone can't do anything to process form elements. With Javascript it's very simple to do what you're asking. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now