Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 11-14-2003, 08:50 PM   #1
Dildozer
Confirmed User
 
Join Date: Jul 2002
Location: Montreal
Posts: 7,519
Ja\/askript help

ok i have this problem

in my form i have a field for credit cards

so i call that value like
form1.number.value

now the value can be numbers separated by spaces like 5555 5555 5555 5555 or all together like 5555555555555555

What i want to do is a function to check if there are spaces and remove them and give me the real value

for example the surfer puts in his cc# like this: 5258 5599 5599 5599, i want when he submits it to turn into 5258559955995599

i tried this but i get an undefined value in the end

var j= form1.number.value;
var k;
for (i=0, i=j.lenght; i++){
if (j.sub5tring(i,i+1)=' ') {
k = k+'';
k = k+j.sub5tring(i,i+1);}}
form1.number.value = k;

can anyone help me?
__________________
Spam link here
Dildozer is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-14-2003, 08:56 PM   #2
gornyhuy
Chafed.
 
gornyhuy's Avatar
 
Join Date: May 2002
Location: Face Down in Pussy
Posts: 18,041
The board fucked your code all up....

i suggest you go to j a va sc ri ptsource.com and search there for prebuilt examples, or go here:

http://www.vtfb.org/vfbmember/overview.htm

and click on the FormChek.js and in that code search for stripwhitespace. Lots of good examples in there.
__________________

icq:159548293
gornyhuy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-14-2003, 09:09 PM   #3
Dildozer
Confirmed User
 
Join Date: Jul 2002
Location: Montreal
Posts: 7,519
thanks
__________________
Spam link here
Dildozer is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.