Newbie Question - Auto inserting form field value

T

tallpaulonline

Hi Guys,

I have a form that contains fields FirstName, Surname, IDno, and Username.

I need to create a script that will take the first 3 letters of FirstName
and Surname, and the last 3 letters of IDno, and insert them as a value in
the field Username.

Unfortunately this is way beyond my meagre scripting skills

Any help would be greatly appreciated

Thanks

:)o)
TallPaul
(e-mail address removed)
 
L

Lee

tallpaulonline said:
Hi Guys,

I have a form that contains fields FirstName, Surname, IDno, and Username.

I need to create a script that will take the first 3 letters of FirstName
and Surname, and the last 3 letters of IDno, and insert them as a value in
the field Username.

Unfortunately this is way beyond my meagre scripting skills

Then you should probably talk to your instructor.
This sure doesn't sound like anything that would be useful
in the real world.
 
T

tallpaulonline

I don't have an instructor, I have books that I am learning from

It may not be useful to you, but it is something that I need to work out
 
L

Lee

tallpaulonline said:
I don't have an instructor, I have books that I am learning from

It may not be useful to you, but it is something that I need to work out

Fair enough. What part are you having trouble with?

Do you know how to set the value of a field to some value,
once you've figured out what the value is?

Have you looked at the substr() and substring() methods of
the String type?
 
D

David Dorward

Lee said:
tallpaulonline said:
This sure doesn't sound like anything that would be useful
in the real world.

It might be if you wanted to write a sign up form and wanted a suggested
user name - unfortunately you'd need something to check that the generated
username wasn't already taken on the server and to pick something else if
that were the case - so its not really possibly to do it reliably client
side without a lot of mucking about with SOAP (or such) and thereby
reducing your potential target audience for that feature.So this would be
better handled on the server.
 
L

Lee

David Dorward said:
It might be if you wanted to write a sign up form and wanted a suggested
user name - unfortunately you'd need something to check that the generated
username wasn't already taken on the server and to pick something else if
that were the case - so its not really possibly to do it reliably client
side without a lot of mucking about with SOAP (or such) and thereby
reducing your potential target audience for that feature.So this would be
better handled on the server.

Like I said.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top