I want to send sms from my sajt, i have some code but i don't know enaught.
I have an account in one of sms service server ...
code: -
<a href = "http://www.myaccount.com/artxcenter.com/sendsms.php?username=xxx&password=xxx&from=xxx&to=xxxx&text=xxx"> Click here to send sms </a>
[Please use CODE tags when posting source code. Thanks! --pbmods]
if you write right username and password and to (number of phone you will send sms ) .
My problem:
how to link with TEXT box
plz help me
17 6480
Changed thread title to better match contents.
Heya, aRTx. Welcome to TSDN!
I'm moving this thread to the JavaScript forum where it will get more relevant exposure.
My problem:
how to link with TEXT box
plz help me
Say you have a textbox with an id of "username", then you would access it using: - document.getElementById("username").value
To add this to the URL, you could call a function which retrieves the values from the textboxes and adds them, e.g. - urlparams = "username="+document.getElementById("username").value;
-
urlparams += "&password="+...//etc.
thnx for help, but i don't know how to use your code to resolve this problem, I'm biginer in this area.
Please post an concrete example plz....
I APPRECIATE your knowlodge...
Post some HTML (your form) so we can work with that.
Post some HTML (your form) so we can work with that.
i have upload something about this "sms links" sms-links.zip - <html>
-
<head>
-
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-
</head>
-
-
<body>
-
<form id="form1" name="form1" method="post" action="">
-
<label><br />
-
Mobile number to:
-
<input type="text" name="to" id="to" />
-
</label>
-
</form>
-
<p> </p>
-
<form id="form2" name="form2" method="post" action="">
-
<label>here sms text
-
<textarea name="text" id="text" cols="45" rows="5"></textarea>
-
</label>
-
</form>
-
<p> </p>
-
</body>
-
</html>
i don't know how to use it: - https://myaccount.smsdiscount.com/clx/sendsms.php?username=xxxxxxxxxx&password=xxxxxxxxxx&from=xxxxxxxxxx&to=xxxxxxxxxx&text=xxxxxxxxxx
plz help to do it ....
You have two forms. Make them into one.
Do you only want the "to" and "text" fields in the form. Where will the other fields be set?
Ok, let's assume that you only want the "to" and "text" fields from the form. First of all, in your link, change the href to "#" and add an onclick to call a function:
[HTML]<a href="#" onclick="sendsms()">...</a>[/HTML]
In this function, set the parameters for the url: - function sendsms() {
-
var to = "to="+encodeURIComponent(document.getElementById('to').value);
-
// repeat for the rest of the fields then..
-
location.href = "sendsms.php?" + username + "&" + password ... + "&" + to + ...;
-
}
the code:
[HTML]<html>
<head>
<script>
function sendsms() {
var to = "to="+encodeURIComponent(document.getElementById(' to'). value);
// repeat for the rest of the fields then..
location.href = "sendsms.php?" + username + "&" + password ... + "&" + to + ...;
}
</script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
<form id="form1" name="form1" method="post" action="">
<label><br />
Mobile number to:
<input type="text" name="to" id="to" />
</label>
</form>
<p> </p>
<form id="form2" name="form2" method="post" action="">
<label>here sms text
<textarea name="text" id="text" cols="45" rows="5"></textarea>
</label>
</form>
<p> </p>
<a href="https://myaccount.smsdiscount.com/clx/sendsms.php?username=artx&password=bumbum&to&text" onclick="sendsms()">...</a>
</body>
</html>[/HTML]
this code when excute return a failed mesage:
[HTML] <?xml version="1.0" encoding="utf-8" ?>
- <SmsResponse>
<version>1</version>
<result>0</result>
<resultstring>failure</resultstring>
<description>The parameter to (destination number) is missing</description>
<endcause />
</SmsResponse>[/HTML]
I have write some thing please chek it...
[HTML]<html>
<head>
<script>
function sendsms() {
var username = "account";
var password = "bllablla";
var to = "to="+encodeURIComponent(document.getElementById(' to'). value);
var text = "text="+encodeURIComponent(document.getElementById ('text'). value);
// repeat for the rest of the fields then..
location.href = "sendsms.php?" + username + "&" + password + "&" + to;
}
</script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
<form id="form1" name="form1" method="post" action="">
<label><br />
Mobile number to:
<input type="text" name="to" id="to" />
</label>
</form>
<p> </p>
<form id="form2" name="form2" method="post" action="">
<label>here sms text
<textarea name="text" id="text" cols="45" rows="5"></textarea>
</label>
</form>
<p> </p>
<a href=" what to write here plz..." onclick="sendsms()">...</a>
</body>
</html>[/HTML]
where is the mistake?.
Replace sendsms.php in the sendsms function with the full URL:
https://myaccount.smsdiscount.com/clx/sendsms.php?
Also, you will need to change username and password to include "username=" and "password=". You've also forgotten to add the 'text' to the url.
As for the href of the link, a hash (#) should suffice.
if we have html code:
[HTML]<html>
<form>
<input type="text" name="fieldOne">
</form>
</html>
[/HTML]
how to get contets and with this contets make an link:
example:
http://www.herefromtextbox".com
How to make and call a function wich can take contets from "textbox" by clik on a button
[HTML]
<HTML>
<form>
<input type="text" name="fieldOne">
</form>
</html>
[/HTML]
and then contets convert to a link:
www.contents.com
I have a problem..
I am gona make a html form to send sms from my sajt.
i can send sms because i have an account in www.smsdiscout.com and they let us to send with a code
<a href="http://www.smsdiscount.com/clx/sendsms.php?username="xxx"&password="xxx"&to="xxx" &text="xxx"> Clik to send sms </a>
but how to turn it in a html form with textbox-es
I know i have post this problem more than one time, but i can't find concret code to do it...
if we have html code:
[HTML]<html>
<form>
<input type="text" name="fieldOne">
</form>
</html>
[/HTML]
how to get contets and with this contets make an link:
example:
<A href="http://www.herefromtextbox".com[/QUOTE">http://www.herefromtextbox".com
Where do you want to put this link? Write a function which simply takes the value on the input box and sets it as the href of your link.
[HTML]<HTML>
<head>
<script language="JavaScript" type="text/javascript">
function func_call(linkStr)
{
document.getElementById("link").innerHTML = '<a href="http://www.'+linkStr+'.com">'+linkStr+'</a>';
}
</script>
</head>
<body>
<div id="link"></div>
<form>
<input type="text" name="fieldOne" id="fieldOne" >
<input name="btn" value="CLICK" type="button" onclick="javascript:func_call(fieldOne.value);">
</form>
</body>
</html>
[/HTML]
thnx very much,
you have resolve my problem i have post it in 14 way in this forum but you have do it in good way.
i am gona ask again
how to get from two textboxes and when you will click the link will be exceute in the same page
thnx very much,
you have resolve my problem i have post it in 14 way in this forum but you have do it in good way.
Once you post a thread in the forum, you wont be able to get a answer shortly.You have to wait sometimes until another member comes to the thread.
how to get from two textboxes and when you will click the link will be exceute in the same page
Better if you can further explain it. The most suited way for this,you can post the coding that you made so far here in the forum.
Are you looking for something like this.
for the Onclick event of button you can pass both the text box values like this. - func_call(fieldOne.value,fieldTwo.value)
-
then from your js function you have to accept two parameters. - function func_call(linkStr_1,linkStr_2)
-
{
-
-
}
link will be exceute in the same page
I am waiting for your further details about this.
Merged the threads - same topic.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: nam |
last post by:
could someone please help me with this bizarre problem -
I've created a swf file at the top of my html page. The
swf file (using Swish) is simply a menu of 5 links to 5
anchor points on the html...
|
by: Ang Talunin |
last post by:
Hey,
I've got this code:
<html>
<head>
<style>
a{cursor:hand;text-decoration:none;font-size=10pt;font-family:Verdana;}
a:hover{cursor:hand;text-decoration:underline;}
</style>
|
by: ehm |
last post by:
I have encountered an issue that has me totally confused. I have a
page where the user clicks on a hyper-text link and is then directed
towards another page (passing additional variables, etc.). If...
|
by: eric |
last post by:
I am attempting to create <A HREF> links to <A NAME> targets in a series
of extremely wide web pages composed of tables with text and images
sitting side by side. This is a failure since both...
|
by: Christopher Nelson |
last post by:
I have a menu tree made up of anchors inside list items in a
multi-level list that includes HTML like:
<ul id='xx'>
<li><a href='conf.cgi' class='menu' target='main'
title='Configure stuff'...
|
by: Thomas Maier-Komor |
last post by:
Hi everybody,
I have a problem with a certain link pattern that gets resolved wrong in
the IE, but works find on Firefox. Maybe somebody has an idea, how to
work around it.
I have an .html...
|
by: provowallis |
last post by:
I'm new to this board so I hope this reqest isn't out of line, but I'm
looking for some general advice about creating links in online books.
If the link target didn't involve PIs I don't think I'd...
|
by: Sudhakar |
last post by:
i am using a self submitting for using php
<form action="<?php echo $_SERVER; ?>" method="POST"
id="test2" name="registrationform">
the registration page starts with a lot of terms and other...
|
by: naveenmurthy |
last post by:
Hello All,
I have created a .mht file in following format.
1. The .mht file contains following htmls.
a. MHTLinkingProblem.html
b. Left.html
c. Right.html
d. Start.html
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |