Jump to content

srinivas g

Members
  • Content Count

    21
  • Joined

  • Last visited

Community Reputation

0 Neutral

About srinivas g

  • Rank
    Newbie
  1. $sql = "select * from xxxxxxx_racesetups where IndividualRaceID = $mrid order by RaceSetupID"; try to write in single quote like '$mrid' if the $mrid value is not a number and try...!
  2. julianbeige , until see the problem we can not help u...!
  3. first check properly about "$result" query..
  4. Hi funbinod , can u explain me actually what u want to do ... so that i may help u
  5. Raj the way u r asking is little bit improper ...
  6. As per the code u r missing to write "value" after ur code i mean write var tl = document.getElementById(id).value; instead of var tl = document.getElementById(id);
  7. ohh okay, i entered in the middle ... i agree.
  8. our aim is "place div in the center screen" my solution is use <center> tag so that we can put DIV into center n this is possible with center tag that's it ...! Whatever we need solution. That's all.
  9. <center><div style="margin:50%;"> centered content </div></center> ..., define ur DIV width .. u will get DIV center screen not ONLY CENTRE TEXT...!
  10. ok use <center> tag to align DIV center. By using <center> tags u can directly align DIV center not only elements inside the DIV .. check this it is possible..!
  11. copy code n past then try thats it..! small change is in EmailUs.html see form action = "mailTo.php" instead of it i wrote Targetpage: EmailTo.php ... so don't confuse while save ur pages ..!
  12. Try this code ..... Mainpage : EmailUs.html <html><head> <script type="text/javascript" src = "Validation.js"></script> </head> <body> <div> <center><p><form name="HelpDesk" method = "post" action = "mailTo.php" onsubmit="return validation()"> <table width="36%" border="0" cellpadding="3" cellspacing="3" align="center"><tr><td height="15" align="right" > Contact No.</td><td><input name="txtPhone" maxlength="15" type="text" /></td></tr><tr><td height="15" align="right" >Email id</td><td><input type='text' name='txtEmail'/></td></tr><tr><td height="15" align="right" >Query</td><td><textarea name="txtDescription" rows="5" cols="30" maxlength="500" alt="write your query here"></textarea></td></tr></table> <input type="submit" value="Submit"> <input type="reset" name="reset" value="Reset"> </form></p></center> </div> </body> </html> Validation page : Validation.js // Declaring required variables var digits = "0123456789"; // non-digit characters which are allowed in phone numbers var phoneNumberDelimiters = "()- "; // characters which are allowed in international phone numbers // (a leading + is OK) var validWorldPhoneChars = phoneNumberDelimiters + "+"; // Minimum no of digits in an international phone no. var minDigitsInIPhoneNumber = 10; function isInteger(s) { var i; for (i = 0; i < s.length; i++) { // Check that current character is number. var c = s.charAt(i); if (((c < "0") || (c > "9"))) return false; } // All characters are numbers. return true; } function trim(s) { var i; var returnString = ""; // Search through string's characters one by one. // If character is not a whitespace, append to returnString. for (i = 0; i < s.length; i++) { // Check that current character isn't whitespace. var c = s.charAt(i); if (c != " ") returnString += c; } return returnString; } function stripCharsInBag(s, bag) { var i; var returnString = ""; // Search through string's characters one by one. // If character is not in bag, append to returnString. for (i = 0; i < s.length; i++) { // Check that current character isn't whitespace. var c = s.charAt(i); if (bag.indexOf© == -1) returnString += c; } return returnString; } function checkInternationalPhone(strPhone){ var bracket=3 strPhone=trim(strPhone) if(strPhone.indexOf("+")>1) return false if(strPhone.indexOf("-")!=-1)bracket=bracket+1 if(strPhone.indexOf("(")!=-1 && strPhone.indexOf("(")>bracket)return false var brchr=strPhone.indexOf("(") if(strPhone.indexOf("(")!=-1 && strPhone.charAt(brchr+2)!=")")return false if(strPhone.indexOf("(")==-1 && strPhone.indexOf(")")!=-1)return false s=stripCharsInBag(strPhone,validWorldPhoneChars); return (isInteger(s) && s.length >= minDigitsInIPhoneNumber); } function validation() { var txtForm=document.HelpDesk; var Phone=txtForm.txtPhone; var email = txtForm.txtEmail; var filter = /^([a-zA-Z0-9_.-])+@(([a-zA-Z0-9-])+.)+([a-zA-Z0-9]{2,4})+$/; if ((Phone.value==null)||(Phone.value=='')) { alert("Please Enter your Phone Number") Phone.focus(); return false; } else if (checkInternationalPhone(Phone.value)==false) { alert("Please Enter a Valid Phone Number") Phone.value=""; Phone.focus(); return false; } else if ((email.value==null)||(email.value=='')) { alert('Please provide a valid email address'); email.focus(); return false; } else if (!filter.test(email.value)) { alert('Please provide a valid email address'); email.value=""; email.focus(); return false; } else if(txtForm.txtDescription.value=='') { alert(" Please write your query"); txtForm.txtDescription.focus(); return false; } } Targetpage: EmailTo.php <?PHP $email = "desired email id"; // write ur email id here $strTo = $email;//$_POST["txtTo"]; $strSubject = " Sender id : ".$_POST["txtEmail"]; $strMessage = "<b>Query : -</b> ".nl2br($_POST["txtDescription"]); //*** Uniqid Session ***// $strSid = md5(uniqid(time())); $strHeader = ""; $strHeader .= "From: ".$_POST["txtPhone"]."<".$_POST["txtEmail"].">nReply-To: ".$_POST["txtPhone"].""; $strHeader .= "MIME-Version: 1.0n"; $strHeader .= "Content-Type: multipart/mixed; boundary="".$strSid.""nn"; $strHeader .= "This is a multi-part message in MIME format.n"; $strHeader .= "--".$strSid."n"; $strHeader .= "Content-type: text/html; charset=utf-8n"; $strHeader .= "Content-Transfer-Encoding: 7bitnn"; $strHeader .= $strMessage."nn"; $flgSend = @mail($strTo,$strSubject,null,$strHeader); // @ = No Show Error // if($flgSend) { ?> <script> alert("message has been sent successfully..!"); window.location.href = 'http://yor web page'; // put ur URL </script> <?PHP } else { ?> <!-- if message sending failed then below message will be displayed--> <script> alert("message sending failed.."); window.location.href = 'http://your web page URL'; </script> <?PHP } ?>
  13. Hi Raj can u tell me exactly what u want i can send a code u want ... which is compatible for all major browsers...!
  14. one more thing until define a width of a DIV the text inside the DIV is center if u want DIV center try this also <div align="center" style="background-color:#FF0000;"> Put your code here.. </div>
×
×
  • Create New...