You are great Maciej Hanski,
Trimming problem solved.
But still unable to get the ON BLUR stuff in document wide Javascript.
Single events works great. But if there is something where all form fields
are forced to UPPER case
this.getField("user_id").value=this.getField("user_id").value.toUpperCase();
Thanks
Love and regards
Prasad
----- Original Message -----
From: "Maciej Hanski" <ma_han2000 at yahoo.de>
To: <scribus at nashi.altmuehlnet.de>
Sent: Thursday, June 21, 2007 1:07 AM
Subject: Re: [Scribus] Duplicate field values in FORM using Javascript?
>> please respond below the original text for better readability:)
>>>> Thans a TON for the script.
>> BTW I was succesful in adding document wide script, while the form
>> element
>> works fine.
>> I have in fact seperate fields for FirstNAme, MiddleName and LastName,
>> which
>> is entered by the user, while one field that is to be populated with all
>> these 3 values. e.g FirstName MiddleName Last Name
>> I tried doing
>> event.value = trim(this.getField("FirstName").value,
>> (this.getField("MiddleName").value, (this.getField("LastName").value, );
>> but it returns only the last value(e.g. LastName).
>> I can do seperately but it doesn't look nice since the field size may
>> vary
>> depending on the no. of characters in the name fields. It will look odd
>> to
>> see something like this..
>>>> Prasad MiddleName
>> Mhatre
>> If trimming is added it will look like this
>> Prasad MiddleName Mhatre
>>>> I tried using event.value = trim(this.getField("FirstName").value
>> but it doesn't work.
>> Hmm, you think too complicated, try this (in one line):
>> event.value = this.getField("FirstName").value +" "+
> this.getField("MiddleName").value +" "+ this.getField("LastName").value;
>>>>>> Please remember I am not at all Javascript man.
>> Not yet, but soon:) See this article (under "String operators"):
>>http://www.w3schools.com/js/js_operators.asp>> cheers
> Maciej
>>> _______________________________________________
> Scribus mailing list
> Scribus at nashi.altmuehlnet.de
>http://nashi.altmuehlnet.de/mailman/listinfo/scribus>