homepage Welcome to WebmasterWorld Guest from 54.211.230.186
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
Help needed urgently
Help needed urgently
hassanzobeen



 
Msg#: 4229539 posted 12:12 pm on Nov 12, 2010 (gmt 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

FORM CODING


<!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">
<head>
<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;
}
</script>
<style type="text/css">
<!--
.style1 {font-weight: bold}
-->
</style>
</head>
<body>
<table border="0" align="center" cellpadding="2" cellspacing="2">
<tr>

<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">
<tr>
<td colspan="2" align="left" valign="top" nowrap="nowrap" class="redHeading"></td>
</tr>
<tr>
<td colspan="2" align="right" valign="top" bgcolor="#CC99FF"><strong>BUG FIXED :</strong> Now you can send sms via Internet explorer as well </td>

</tr>
<tr>
<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="" />
</label></td>
</tr>
<tr>

<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>
<div id="dbRec" style="display: none;">
<select name="recipient_number" id="recipient_number" >
<option value="">Select Recipient </option>
</select>
</div></td>
</tr>
<tr>

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

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

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

</ul>
<div align="center" class="BrightLinksCopy"> you are sending this message from IP Location <br />
: 119.153.55.45</div> </label></td>
</tr>
<tr>
<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
<label>
<input name="terms" type="radio" value="no" checked="checked" />
</label>
No, i don't agree </td>
</tr>
<tr>

<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>
</tr>
<tr>
<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"/>
</label>

<font color="#FF0000"><b></b></font></td>
</tr>
<tr>
<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>
</tr>
</table>
</div>

<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");

//frmvalidator.addValidation("login","req");


</script>
</form></td>
</tr>
</table>
</body>
</html>

 

stuartc1

10+ Year Member



 
Msg#: 4229539 posted 1:50 pm on Nov 12, 2010 (gmt 0)

This is a JavaScript question, not PHP, perhaps you would find someone willing to help if you posted in the JS forum!

hassanzobeen



 
Msg#: 4229539 posted 3:39 pm on Nov 12, 2010 (gmt 0)

can you plz do it for me I have now knowledge about it

Anyango

WebmasterWorld Senior Member 5+ Year Member



 
Msg#: 4229539 posted 4:02 pm on Nov 12, 2010 (gmt 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.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved