TechEnclave
New Tech Posts
New Market Posts



Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old 20 May 08, 12:57 PM
Rahulrulez's Avatar
The Spy!
 
Join Date: Aug 2007
Location: Kolhapur
Age: 18
Posts: 1,817
Rahulrulez is highly Admirable Rahulrulez is highly Admirable Rahulrulez is highly Admirable Rahulrulez is highly Admirable Rahulrulez is highly Admirable Rahulrulez is highly Admirable Rahulrulez is highly Admirable
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 (permalink)  
Old 20 May 08, 01:06 PM
nukeu666's Avatar
Otaku
 
Join Date: Dec 2006
Location: bbay, Tar Valon
Age: 26
Posts: 2,517
nukeu666 is highly Prominent nukeu666 is highly Prominent nukeu666 is highly Prominent nukeu666 is highly Prominent nukeu666 is highly Prominent nukeu666 is highly Prominent
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 (permalink)  
Old 20 May 08, 01:28 PM
ultra vires's Avatar
Oracle Certified Dev
 
Join Date: Dec 2005
Location: New Delhi
Posts: 772
ultra vires is very Respectable ultra vires is very Respectable ultra vires is very Respectable ultra 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 (permalink)  
Old 20 May 08, 01:43 PM
Rahulrulez's Avatar
The Spy!
 
Join Date: Aug 2007
Location: Kolhapur
Age: 18
Posts: 1,817
Rahulrulez is highly Admirable Rahulrulez is highly Admirable Rahulrulez is highly Admirable Rahulrulez is highly Admirable Rahulrulez is highly Admirable Rahulrulez is highly Admirable Rahulrulez is highly Admirable
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 (permalink)  
Old 20 May 08, 01:51 PM
nukeu666's Avatar
Otaku
 
Join Date: Dec 2006
Location: bbay, Tar Valon
Age: 26
Posts: 2,517
nukeu666 is highly Prominent nukeu666 is highly Prominent nukeu666 is highly Prominent nukeu666 is highly Prominent nukeu666 is highly Prominent nukeu666 is highly Prominent
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 (permalink)  
Old 20 May 08, 02:08 PM
Rahulrulez's Avatar
The Spy!
 
Join Date: Aug 2007
Location: Kolhapur
Age: 18
Posts: 1,817
Rahulrulez is highly Admirable Rahulrulez is highly Admirable Rahulrulez is highly Admirable Rahulrulez is highly Admirable Rahulrulez is highly Admirable Rahulrulez is highly Admirable Rahulrulez is highly Admirable
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 (permalink)  
Old 20 May 08, 05:12 PM
Gurpartap Singh's Avatar
Overloaded Member
 
Join Date: Feb 2008
Location: ਪੰਜਾਬ - Punjab
Age: 20
Posts: 691
Gurpartap Singh is highly Prominent Gurpartap Singh is highly Prominent Gurpartap Singh is highly Prominent Gurpartap Singh is highly Prominent Gurpartap Singh is highly Prominent
Default Re: Help PHP form, Input type for Mobile Number.

oh jQuery++
Reply With Quote
  #8 (permalink)  
Old 20 May 08, 06:19 PM
ultra vires's Avatar
Oracle Certified Dev
 
Join Date: Dec 2005
Location: New Delhi
Posts: 772
ultra vires is very Respectable ultra vires is very Respectable ultra vires is very Respectable ultra 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 (permalink)  
Old 20 May 08, 06:44 PM
Gurpartap Singh's Avatar
Overloaded Member
 
Join Date: Feb 2008
Location: ਪੰਜਾਬ - Punjab
Age: 20
Posts: 691
Gurpartap Singh is highly Prominent Gurpartap Singh is highly Prominent Gurpartap Singh is highly Prominent Gurpartap Singh is highly Prominent Gurpartap Singh is highly Prominent
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 (permalink)  
Old 20 May 08, 06:53 PM
ultra vires's Avatar
Oracle Certified Dev
 
Join Date: Dec 2005
Location: New Delhi
Posts: 772
ultra vires is very Respectable ultra vires is very Respectable ultra vires is very Respectable ultra 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 (permalink)  
Old 20 May 08, 07:03 PM
painkiller's Avatar
Overloaded Member
 
Join Date: Nov 2007
Location: Capital of India :D
Age: 27
Posts: 512
painkiller is very Notable painkiller is very Notable
Default Re: Help PHP form, Input type for Mobile Number.

Quote:
Originally Posted by Rahulrulez View Post
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 (permalink)  
Old 20 May 08, 07:04 PM
Gurpartap Singh's Avatar
Overloaded Member
 
Join Date: Feb 2008
Location: ਪੰਜਾਬ - Punjab
Age: 20
Posts: 691
Gurpartap Singh is highly Prominent Gurpartap Singh is highly Prominent Gurpartap Singh is highly Prominent Gurpartap Singh is highly Prominent Gurpartap Singh is highly Prominent
Default Re: Help PHP form, Input type for Mobile Number.

Quote:
Originally Posted by ultra vires View Post
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 (permalink)  
Old 20 May 08, 08:24 PM
ultra vires's Avatar
Oracle Certified Dev
 
Join Date: Dec 2005
Location: New Delhi
Posts: 772
ultra vires is very Respectable ultra vires is very Respectable ultra vires is very Respectable ultra 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 (permalink)  
Old 20 May 08, 10:15 PM
Gurpartap Singh's Avatar
Overloaded Member
 
Join Date: Feb 2008
Location: ਪੰਜਾਬ - Punjab
Age: 20
Posts: 691
Gurpartap Singh is highly Prominent Gurpartap Singh is highly Prominent Gurpartap Singh is highly Prominent Gurpartap Singh is highly Prominent Gurpartap Singh is highly Prominent
Default Re: Help PHP form, Input type for Mobile Number.

Quote:
Originally Posted by ultra vires View Post
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 (permalink)  
Old 20 May 08, 10:34 PM
ultra vires's Avatar
Oracle Certified Dev
 
Join Date: Dec 2005
Location: New Delhi
Posts: 772
ultra vires is very Respectable ultra vires is very Respectable ultra vires is very Respectable ultra 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Search TechEnclave
Have some Fun!


Main Sections     New To TechEnclave?     Need Help?

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0