Results 1 to 2 of 2
Thread: Form Manipulation
May 24, 2004, 15:47 #1
- Join Date
- May 2001
- 0 Post(s)
- 0 Thread(s)
OK. I am attempting to pass two user inputs into one variable (text, not array) to pass through my credit card company.
What I have done it two "onchange" scripts so that when the customer enters their information the script runs it does a search and replace on "name" for there name and "number" for their number. However!! If they change their name (or number) a second time the search and replace will fail as it will no longer find "name". Therefore I though some sort of RegX facilitated where I prefix their name with a hypen i.e. '-'.
Alternatively, am I making this a lot harder than it needs to be!? i.e. could I do an onSubmit instead to change it? I have tried this, however it didn't seem to work.
May 24, 2004, 21:02 #2
could you not do the search and replace function on the onsubmit action of the form? That way they can change it allthey like and it only works once they are ready to submit? Might of got the wrong end of the stick tho..