javascript form field query

They have: 26 posts

Joined: Nov 2001

Im using javascript to pre-populate a form field with a number passed in a url using this code -

onload="document.form.reference_number.value=campaignCode;"

Every thing is fine but i am wondering if there is a way i can prevent a user from then being able to overkey this campaign code by stopping them keying in the form field with their cursor for example.

Jack Michaelson's picture

He has: 1,733 posts

Joined: Dec 1999

Not 100% sure what u're asking, but have you tried:

<input type="text" name="reference_number" onFocus="blur(this);">
'

Hope this helps you out,

Shakespeare: onclick || !(onclick)

They have: 26 posts

Joined: Nov 2001

thats it, just the ticket! Smiling

Jack Michaelson's picture

He has: 1,733 posts

Joined: Dec 1999

u're welcome Smiling

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.