TechEnclave
Register Now

Registration is free.
Join us today.

Help PHP form, Input type for Mobile Number.

This is a discussion on Help PHP form, Input type for Mobile Number. within the Programming forums, part of the General Computing category; Hey, I am making Contact us page for one friend. I want only Numbers in this code - Code: <div ...

TechEnclave > General Computing > Programming


Reply
 
LinkBack Thread Tools Display Modes
  #1   Rahulrulez's Rig  
Old 20 May 08, 12:57 PM
Rahulrulez's Avatar
Explosive Member
 
Join Date: Aug 2007
Location: Kolhapur
Age: 17
Posts: 1,374
Rahulrulez is highly ReputableRahulrulez is highly ReputableRahulrulez is highly ReputableRahulrulez is highly ReputableRahulrulez is highly ReputableRahulrulez is highly Reputable
Send a message via MSN to Rahulrulez Send a message via Yahoo to Rahulrulez Send a message via Skype™ to Rahulrulez
Default Help PHP form, Input type for Mobile Number.

Hey,
I am making Contact us page for one friend.

I want only Numbers in this code -
Code:
<div class="row"><label for="telephone">Mobile: </label><input name="mobile" type="text" id="mobile" size="20" value="<?php if(isset($_POST['mobile'])){echo $_POST['mobile'];} ?>" /></div>
But it allow to insert text.. any experts, help please.

Reply With Quote
  #2   nukeu666's Rig  
Old 20 May 08, 01:06 PM
nukeu666's Avatar
Explosive Member
 
Join Date: Dec 2006
Location: Wuundersex land
Age: 25
Posts: 2,367
nukeu666 is highly Admirablenukeu666 is highly Admirablenukeu666 is highly Admirablenukeu666 is highly Admirablenukeu666 is highly Admirablenukeu666 is highly Admirablenukeu666 is highly Admirablenukeu666 is highly Admirable
Send a message via AIM to nukeu666 Send a message via MSN to nukeu666 Send a message via Yahoo to nukeu666 Send Message via Google Talk to nukeu666
Default Re: Help PHP form, Input type for Mobile Number.

i think ull have to use javascript to prevent text from being entered

Reply With Quote
  #3  
Old 20 May 08, 01:28 PM
ultra vires's Avatar
Overloaded Member
 
Join Date: Dec 2005
Location: New Delhi
Posts: 627
ultra vires is very Respectableultra vires is very Respectableultra vires is very Respectableultra vires is very Respectable
Default Re: Help PHP form, Input type for Mobile Number.

You can use javascript for checking the field
use onChange function to check for alphabets and prompt the user accordingly

Reply With Quote
  #4   Rahulrulez's Rig  
Old 20 May 08, 01:43 PM
Rahulrulez's Avatar
Explosive Member
 
Join Date: Aug 2007
Location: Kolhapur
Age: 17
Posts: 1,374
Rahulrulez is highly ReputableRahulrulez is highly ReputableRahulrulez is highly ReputableRahulrulez is highly ReputableRahulrulez is highly ReputableRahulrulez is highly Reputable
Send a message via MSN to Rahulrulez Send a message via Yahoo to Rahulrulez Send a message via Skype™ to Rahulrulez
Default Re: Help PHP form, Input type for Mobile Number.

^^ Thanks for replies.. I am not into Java much.. anyone can generate the codes for me?

Reply With Quote
  #5   nukeu666's Rig  
Old 20 May 08, 01:51 PM
nukeu666's Avatar
Explosive Member
 
Join Date: Dec 2006
Location: Wuundersex land
Age: 25
Posts: 2,367
nukeu666 is highly Admirablenukeu666 is highly Admirablenukeu666 is highly Admirablenukeu666 is highly Admirablenukeu666 is highly Admirablenukeu666 is highly Admirablenukeu666 is highly Admirablenukeu666 is highly Admirable
Send a message via AIM to nukeu666 Send a message via MSN to nukeu666 Send a message via Yahoo to nukeu666 Send Message via Google Talk to nukeu666
Default Re: Help PHP form, Input type for Mobile Number.

java/javascript are very different
if you want to do web designing...js is a important point....java can be skipped
google for sample code for onchange

Reply With Quote
  #6   Rahulrulez's Rig  
Old 20 May 08, 02:08 PM
Rahulrulez's Avatar
Explosive Member
 
Join Date: Aug 2007
Location: Kolhapur
Age: 17
Posts: 1,374
Rahulrulez is highly ReputableRahulrulez is highly ReputableRahulrulez is highly ReputableRahulrulez is highly ReputableRahulrulez is highly ReputableRahulrulez is highly Reputable
Send a message via MSN to Rahulrulez Send a message via Yahoo to Rahulrulez Send a message via Skype™ to Rahulrulez
Default Re: Help PHP form, Input type for Mobile Number.

Thanls for reply nukeu666..
Done..

I used this one

Textbox to accept only numbers (digits) using jquery

Reply With Quote
  #7   Gurpartap Singh's Rig  
Old 20 May 08, 05:12 PM
Gurpartap Singh's Avatar
Overloaded Member
Rig of the Month for October2008
 
Join Date: Feb 2008
Location: ਪੰਜਾਬ - Punjab
Age: 20
Posts: 572
Gurpartap Singh is very HonorableGurpartap Singh is very HonorableGurpartap Singh is very HonorableGurpartap Singh is very Honorable
Send a message via MSN to Gurpartap Singh Send a message via Yahoo to Gurpartap Singh Send a message via Skype™ to Gurpartap Singh
Default Re: Help PHP form, Input type for Mobile Number.

oh jQuery++

Reply With Quote
  #8  
Old 20 May 08, 06:19 PM
ultra vires's Avatar
Overloaded Member
 
Join Date: Dec 2005
Location: New Delhi
Posts: 627
ultra vires is very Respectableultra vires is very Respectableultra vires is very Respectableultra vires is very Respectable
Default Re: Help PHP form, Input type for Mobile Number.

jQuery -- for IE...

JQuery as a framework is very nice but with IE it sux real badly, thats why i would prefer extjs over it anyday


Last edited by ultra vires : 20 May 08 at 07:01 PM.
Reply With Quote
  #9   Gurpartap Singh's Rig  
Old 20 May 08, 06:44 PM
Gurpartap Singh's Avatar
Overloaded Member
Rig of the Month for October2008
 
Join Date: Feb 2008
Location: ਪੰਜਾਬ - Punjab
Age: 20
Posts: 572
Gurpartap Singh is very HonorableGurpartap Singh is very HonorableGurpartap Singh is very HonorableGurpartap Singh is very Honorable
Send a message via MSN to Gurpartap Singh Send a message via Yahoo to Gurpartap Singh Send a message via Skype™ to Gurpartap Singh
Default Re: Help PHP form, Input type for Mobile Number.

jQuery is cross browser compatible. You need to check your own javascript for compatibility with IE. You can't deny the jQuery's compatibility, that is why Drupal includes it in it's core.

Moreover, extjs is in quite different arena than jQuery.

Reply With Quote
  #10  
Old 20 May 08, 06:53 PM
ultra vires's Avatar
Overloaded Member
 
Join Date: Dec 2005
Location: New Delhi
Posts: 627
ultra vires is very Respectableultra vires is very Respectableultra vires is very Respectableultra vires is very Respectable
Default Re: Help PHP form, Input type for Mobile Number.

I have been using jQuery for the past 1 year. :\

There are fixes that take into account IE being messed up.


Last edited by ultra vires : 20 May 08 at 07:01 PM.
Reply With Quote
  #11   painkiller's Rig  
Old 20 May 08, 07:03 PM
painkiller's Avatar
Steroids Member
 
Join Date: Nov 2007
Location: Capital of India :D
Age: 26
Posts: 453
painkiller is very Notablepainkiller is very Notable
Default Re: Help PHP form, Input type for Mobile Number.

View Post
Originally Posted by Rahulrulez
Thanls for reply nukeu666..
Done..

I used this one

Textbox to accept only numbers (digits) using jquery
why r u using jquery framwork just to validate user input.
try this link: Validate number only input - JavaScript - Source Code | DreamInCode.net

Reply With Quote
  #12   Gurpartap Singh's Rig  
Old 20 May 08, 07:04 PM
Gurpartap Singh's Avatar
Overloaded Member
Rig of the Month for October2008
 
Join Date: Feb 2008
Location: ਪੰਜਾਬ - Punjab
Age: 20
Posts: 572
Gurpartap Singh is very HonorableGurpartap Singh is very HonorableGurpartap Singh is very HonorableGurpartap Singh is very Honorable
Send a message via MSN to Gurpartap Singh Send a message via Yahoo to Gurpartap Singh Send a message via Skype™ to Gurpartap Singh
Default Re: Help PHP form, Input type for Mobile Number.

View Post
Originally Posted by ultra vires
I have been using jQuery for the past 1 year. :\

There are fixes that take into account IE being messed up.
What do you mean by fixed js in Drupal for IE? Please explain.

Moreover, I'm using jQuery since it's initial betas, that was around 2005/06.

Reply With Quote
  #13  
Old 20 May 08, 08:24 PM
ultra vires's Avatar
Overloaded Member
 
Join Date: Dec 2005
Location: New Delhi
Posts: 627
ultra vires is very Respectableultra vires is very Respectableultra vires is very Respectableultra vires is very Respectable
Default Re: Help PHP form, Input type for Mobile Number.

IE alpha blending issues .. easing of images using js... chaining with smooth fade out ....list goes on

Btw i never said Jquery sux ... its IE that sux ( its like hell for web developers )

jQuery Advice For Dealing With Stupid Internet Explorer | Ventanazul


Last edited by ultra vires : 20 May 08 at 08:28 PM.
Reply With Quote
  #14   Gurpartap Singh's Rig  
Old 20 May 08, 10:15 PM
Gurpartap Singh's Avatar
Overloaded Member
Rig of the Month for October2008
 
Join Date: Feb 2008
Location: ਪੰਜਾਬ - Punjab
Age: 20
Posts: 572
Gurpartap Singh is very HonorableGurpartap Singh is very HonorableGurpartap Singh is very HonorableGurpartap Singh is very Honorable
Send a message via MSN to Gurpartap Singh Send a message via Yahoo to Gurpartap Singh Send a message via Skype™ to Gurpartap Singh
Default Re: Help PHP form, Input type for Mobile Number.

View Post
Originally Posted by ultra vires
IE alpha blending issues .. easing of images using js... chaining with smooth fade out ....list goes on

Btw i never said Jquery sux ... its IE that sux ( its like hell for web developers )

jQuery Advice For Dealing With Stupid Internet Explorer | Ventanazul
I see you have messed up with my post, the quoted text. Not good moving backwards, just clarify

Reply With Quote
  #15  
Old 20 May 08, 10:34 PM
ultra vires's Avatar
Overloaded Member
 
Join Date: Dec 2005
Location: New Delhi
Posts: 627
ultra vires is very Respectableultra vires is very Respectableultra vires is very Respectableultra vires is very Respectable
Default Re: Help PHP form, Input type for Mobile Number.

Google Search : " jquery fix drupal"
Get your results ...

Reply With Quote
Reply


Thread Tools
Display Modes


Welcome, Unregistered.

  
Search
Advertisement


From FunEnclave
Quick Navigation

All times are GMT +5.5. The time now is 06:29 PM.


Style by Safin, exclusive for TechEnclave
Copyright ©2005 - 2008 TechEnclave.com, All Rights Reserved.
Powered by vBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0