× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi Lupe,

If you are using the function that I gave you below it will be sticky so
you may have to change it to be something like this (modify the base
styles to be appropriate for your use. Look at the source in the browser
to see what is emitted for the field(s) in question and base it on that. I
will assume that it is simple and that the styles selected for the field
are wf_field and wf_default in the example below.

function myFunction(myObj, myStyle)
{
myObj.className = "wf_field wf_default " + myStyle;
}

Now, updating the background in-line will work but it limits your ability
to later modify the colours without re-conversion. You can do directly
with something like this I expect.

onFocus="this.style.backgroundColor='red';" onBlur="
this.style.backgroundColor='white';"

However, using the external function and style classes is a better
solution for the long run (IMHO).

Mike


Mike Hockings, P.Eng.
System i Application Development Tools - CODE/Designer & WebFacing !
IBM Canada Ltd. Laboratory
hockings@xxxxxxxxxx
voice 1-905-413-3199 T/L 313-3199 ITN 23133199

wdsci-l-bounces@xxxxxxxxxxxx wrote on 07/07/2008 08:39:58 PM:

Mike,
This code worked at websetting/java script;
this.style.backgroundColor='red';


If the user selects subfile record #1 and selects record #2
-------- should the color change to the initial color at #1 ?

I would be nice to have this happen, else he can not undo his fat-finger
entry(as #1 above).


Any idea as to how the above can be accomplished?

I tried an onBlur="myFunction(this,'myNormal');" call w/in the
HTML Before/Inside/After Web Setting option w/o success.


Thanks,
Lupe Galvan





-----Original Message-----
From: wdsci-l-bounces@xxxxxxxxxxxx [mailto:wdsci-l-bounces@xxxxxxxxxxxx]
On Behalf Of Mike Hockings
Sent: Friday, July 04, 2008 8:56 AM
To: Websphere Development Studio Client for iSeries
Subject: Re: [WDSCI-L] WebFacing subfile selected record/field color chg

Hi again Lupe,

I took a bit of time to change the current project that I was working
with
to demo the solution. It looks like a simple typo, isn't that always
the
case ? Basically "classname" should be "className". Here is an
updated
JavaScript function. I also changed it to maintain the current class
settings so the font and stuff does not change.

function myFunction(myObj, myStyle)
{
myObj.className = myObj.className + " " + myStyle;
}

Let us know how it works out for you

Mike



--
This is the Websphere Development Studio Client for iSeries (WDSCI-L)
mailing list
To post a message email: WDSCI-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/wdsci-l
or email: WDSCI-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/wdsci-l.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.