Could someone please explain this line to me. Don't really understand it very well -
Code:
function gPD(element){var left=element.offsetLeft,top=element.offsetTop;for(var parent=element.offsetParent;parent;parent=parent.offsetParent){left+=parent.offsetLeft;top+=parent.offsetTop;}return{left:left,top:top,width:element.offsetWidth,height:element.offsetHeight};}
Can you go further to change the telephone number to format 123-555-2345 x 7890? When you type the first three area code, it automatically moves to the first 5 so you can type another three then region code, then moves to 2 so you can type last four then moves to 7, so you can type none, or 1, 2, or 3 or 4 digits. Is this possible?
i am not familiar with such phone numbers structure we have another way of writing in Russia:
(8987)123-4567
where the first(bold) 8 inside the brackets is always 8. first i need to know everything about your phone numbers format. and by the way i must warn you that i am not a professional coder, coding is just a hobby for me, and my scripts may not be as good as if written by a professional coder
use [code]YOUR CODE GOES HERE[/code] or burn in Hell
Hi Padonak, your code looks great. You can go with the format as (nnn)nnn-nnnn x nnnnn, or nnn-nnn-nnnn x nnnnn, n represnts a digit. The x means extension. The last four or five after x can be none, or one up to 5 digits, it's optional.
i tested the page in Opera, Safari, Chrome, IE and FF before posting the code I have a simple form wrote up, completely unstyled and plain which you shall see below. What I need to do is for the phone number and email address fields, is to validate whether the correct string is in the fields (numbers/amount of numbers for phone number and whether the email address is valid)
Bookmarks