Welcome to WebmasterWorld Guest from

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Help needed urgently

Help needed urgently

12:12 pm on Nov 12, 2010 (gmt 0)

New User

5+ Year Member

joined:May 29, 2010
posts: 29
votes: 0

Hello Sir/Madam
I have a problem that I am using an sms service of another website from which user can send free sms and when some submit the form it redirects the page to the site from which I got this code
its a big problem for me that I am redirecting my users to another website and loosing a lot of traffic.
What I want to do that by using AJAX Jquery when some submit sms from my site, html form will submit the data to the sms service providing's site and then get the result message on my site with redirecting so that I don't loose my site traffic. The coding is mention in the below please Help me. I'll be very thankful to you on this act of you kindness.
Thanks in advance


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Send Sms to Mobilink, Ufone, Telenor, Zong and Warid Mobile Phones in Pakistan</title>
<script language="JavaScript" src="http://www.urdumaza.com/validate.js" type="text/javascript"></script>
<script language=javascript>
//Edit the counter/limiter value as your wish
var count = "100"; //Example: var count = "175";
function limiter(){
var tex = document.myform.SmsMessage.value;
var len = tex.length;
if(len > count){
tex = tex.substring(0,count);
document.myform.SmsMessage.value =tex;
return false;
document.myform.limit.value = count-len;
<style type="text/css">
.style1 {font-weight: bold}
<table border="0" align="center" cellpadding="2" cellspacing="2">

<td><form id="myform" name="myform" method="post" action="http://www.urdumaza.com/sms/API/index.php?custom=geoinbox">
<div id="formTable">
<table width="100%" border="0" cellspacing="2" bordercolor="#CCCCFF" style="border-collapse:collapse;" cellpadding="2">
<td colspan="2" align="left" valign="top" nowrap="nowrap" class="redHeading"></td>
<td colspan="2" align="right" valign="top" bgcolor="#CC99FF"><strong>BUG FIXED :</strong> Now you can send sms via Internet explorer as well </td>

<td align="left" valign="top" nowrap="nowrap"><strong class="MainText">Your Name : <font size="2" face="Tahoma"> </font></strong></td>
<td align="left"><label>
<input name="name" id="name" size="30" type="text" maxlength="10" style="border: 1px solid #000000" value="" />

<td width="30" align="left" valign="top" nowrap="nowrap"><strong class="MainText">Receiver's
Number : </strong></td>
<td width="74%" align="left"><div id="ownRec" style="display: inline;">
<select name="code" size="1" style="border: 1px solid #000000">
<option value="">Select Code</option>
<option value="0300" >0300</option>
<option value="0301" >0301</option>
<option value="0302" >0302</option>

<option value="0303" >0303</option>
<option value="0305" >0305</option>
<option value="0306" >0306</option>
<option value="0307" >0307</option>
<option value="0308" >0308</option>
<option value="0312" >0312</option>

<option value="0313" >0313</option>
<option value="0314" >0314</option>
<option value="0315" >0315</option>
<option value="0321" >0321</option>
<option value="0322" >0322</option>
<option value="0323" >0323</option>

<option value="0331" >0331</option>
<option value="0332" >0332</option>
<option value="0333" >0333</option>
<option value="0334" >0334</option>
<option value="0336" >0336</option>
<option value="0342" >0342</option>

<option value="0343" >0343</option>
<option value="0344" >0344</option>
<option value="0345" >0345</option>
<option value="0346" >0346</option>
<option value="0347" >0347</option>
</select> <input name="number" id="number" size="14" type="text" maxlength="7" style="border: 1px solid #000000" value=""/>

<div id="dbRec" style="display: none;">
<select name="recipient_number" id="recipient_number" >
<option value="">Select Recipient </option>

<td align="left" valign="top"><span class="style1"><font size="2" face="Tahoma" class="MainText">Message</font> : </span></td>
<td align="left"><!-- Script by hscripts.com -->
<textarea name="SmsMessage" rows="7" cols="30" onkeyup="limiter()" style="border: 1px solid #000000" wrap="virtual"></textarea>
<br />
<font color="#FF0000">* Max 100 character message allowed</font><br />
Character Remaining :
<script language="JavaScript" type="text/javascript">
document.write("<input type=text name=limit size=4 readonly value="+count+">");

<!-- Script by hscripts.com --></td>
<td colspan="2" align="left">&nbsp;</td>
<td colspan="2" align="left" valign="top" class="MainText"><span class="MainText">
<label>Terms & Conditions </label>

<li> Your Location is saved, we will contact FIA incase of any abuse.<br />
<li> You agree that you will not use abusive language during texting.<br />
<li> This is a free service, being a muslim, use it with great care.<br />

<li> You agree that you will not send threat message to anyone.<br />
<li> You agree that you will not hurt any one's feeling with this service.<br />
<li> You agree that you will not send spam messages </li>

<div align="center" class="BrightLinksCopy"> you are sending this message from IP Location <br />
:</div> </label></td>
<td align="left"><strong class="MainText">Did you read agreement? </strong></td>

<td align="left"><input name="terms" type="radio" value="yes" />
Yes &amp; i agree
<input name="terms" type="radio" value="no" checked="checked" />
No, i don't agree </td>

<td align="left"><strong class="MainText">Your Code : </strong></td>
<td align="left"><img src="http://www.urdumaza.com/sms to pakistan/user/captcha/CaptchaSecurityImages.php?width=100&amp;height=30&amp;characters=5" alt="captcha" /></td>
<td align="left"><strong class="MainText">Insert Code Here:</strong></td>
<td align="left"><label>
<input name="security_code" type="text" id="security_code" size="20" maxlength="8" style="border: 1px solid #000000"/>

<font color="#FF0000"><b></b></font></td>
<td align="left">&nbsp;</td>
<td align="left"><input tyle="display: inline;" type="submit" name="submitButton" id="submitButton" value="Submit Form" onClick="if(this.value == 'Submit Form') this.form.submit(); this.value = 'Please Wait...'; this.disabled=true;" /></td>

<input name="hidden" type="hidden" id="remainingChar" value="100" />

<input name="action" type="hidden" id="action" value="true" />
<script language="JavaScript" type="text/javascript">
//You should create the validator only after the definition of the HTML form
var frmvalidator = new Validator("myform");
frmvalidator.addValidation("name","req","Name is required Field :");
frmvalidator.addValidation("name","maxlen=10","Name must be 10 characters long :");
frmvalidator.addValidation("name","minlen=3","Name must be atleast 3 character long :");

frmvalidator.addValidation("number","req","Number is required Field :");
frmvalidator.addValidation("number","maxlen=7","Mobile number max length=7");
frmvalidator.addValidation("number","minlen=7","Mobile number Min Length=7");
frmvalidator.addValidation("number","numeric","Mobile number is consists of NUMBERS only");

frmvalidator.addValidation("SmsMessage","req","Please Write some text :");
frmvalidator.addValidation("SmsMessage","maxlen=100","Message max length=100");
frmvalidator.addValidation("SmsMessage","minlen=3","Message Min length=3");

frmvalidator.addValidation("security_code","req","Please type the required code :");

// frmvalidator.addValidation("email","email");


1:50 pm on Nov 12, 2010 (gmt 0)

Full Member

10+ Year Member

joined:Feb 19, 2003
posts: 227
votes: 0

This is a JavaScript question, not PHP, perhaps you would find someone willing to help if you posted in the JS forum!
3:39 pm on Nov 12, 2010 (gmt 0)

New User

5+ Year Member

joined:May 29, 2010
posts: 29
votes: 0

can you plz do it for me I have now knowledge about it
4:02 pm on Nov 12, 2010 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Apr 24, 2005
votes: 0

according to your code and your statement, you are posting to a third party url, therefore there is no way you can control where that page redirects you. You can try some tricks here and there but nothing solid will work here. Unless that url allows you to post a redirect url in a parameter and agrees to redirect to it. As far as my little knowledge, you will be wasting time trying this. I may be wrong.

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members