Sending short messages long distance away
May 3, 2009 3:01 PM Subscribe
HTML question: As a complete newbie can someone tell me an easy way to send SMS messages using my account with a service provider which allows me to use a specific string to send text messages? more inside
My service provider allows me to send cheap text messages using a string which looks like this [https://xxxx.ssss.com/xxxxxxxxxxxxxxxxxx/usernamexxxxpasswords/message]. Is it possible (with absolutely no programming experience) to set up shortcuts or bookmarks which bring up a page with all fields filled with predetermined fields and a blank filed for message. If I simply bookmark it then as soon as the page loads a blank message goes out causing a lot of confusion.
Thanks
My service provider allows me to send cheap text messages using a string which looks like this [https://xxxx.ssss.com/xxxxxxxxxxxxxxxxxx/usernamexxxxpasswords/message]. Is it possible (with absolutely no programming experience) to set up shortcuts or bookmarks which bring up a page with all fields filled with predetermined fields and a blank filed for message. If I simply bookmark it then as soon as the page loads a blank message goes out causing a lot of confusion.
Thanks
Yeah it should be easy, my javascript is a little rusty but you can do an HTML page with something like
<html>
<script>
function go(form){
document.location = "https://[long url]/" + form.inputbox.value
}
</script>
<form name="myform" action="" method="GET">Enter something in the box: <BR>
<input type="text" name="inputbox" VALUE=""><P>
<input type="button" name="button" Value="Click" onClick="go(this.form)">
</form>
</html>
I'm basing the code on what I found here.
Just replace "[long url]" with the base URL you need (in your example: "https://xxxx.ssss.com/xxxxxxxxxxxxxxxxxx/usernamexxxxpasswords/") and post it somewhere online, then send your friends there.
posted by delmoi at 3:26 PM on May 3, 2009
<html>
<script>
function go(form){
document.location = "https://[long url]/" + form.inputbox.value
}
</script>
<form name="myform" action="" method="GET">Enter something in the box: <BR>
<input type="text" name="inputbox" VALUE=""><P>
<input type="button" name="button" Value="Click" onClick="go(this.form)">
</form>
</html>
I'm basing the code on what I found here.
Just replace "[long url]" with the base URL you need (in your example: "https://xxxx.ssss.com/xxxxxxxxxxxxxxxxxx/usernamexxxxpasswords/") and post it somewhere online, then send your friends there.
posted by delmoi at 3:26 PM on May 3, 2009
I'm not sure if I understand correctly what you want to do, wouldn't you have to enter a number, too? But maybe a javascript bookmark(let) might help, something along the lines of
javascript:s=prompt('The Message:','');if(s!=''){smswindow=open('https://.../'+escape(s),'','resizeable=yes');smswindow.focus();}
could be enough. - Tested in firefox, you can add more options like 'width=500,height=400,scrollbars=yes,resizeable=yes'
posted by dnial at 3:33 PM on May 3, 2009
javascript:s=prompt('The Message:','');if(s!=''){smswindow=open('https://.../'+escape(s),'','resizeable=yes');smswindow.focus();}
could be enough. - Tested in firefox, you can add more options like 'width=500,height=400,scrollbars=yes,resizeable=yes'
posted by dnial at 3:33 PM on May 3, 2009
Oh one problem with my solution is that anyone who can view the source of that page can find out your password. A better solution would be to take the form elements in a form and then use PHP to fetch the page, rather then simply redirecting the user.
You ought to learn some PHP, a little programming knowledge never killed anyone.
posted by delmoi at 3:49 PM on May 3, 2009 [1 favorite]
You ought to learn some PHP, a little programming knowledge never killed anyone.
posted by delmoi at 3:49 PM on May 3, 2009 [1 favorite]
This thread is closed to new comments.
posted by tamarack at 3:22 PM on May 3, 2009