|
Mike,
I followed the instructions and did not get a color chg.
1. for the WF 'Appearance and Text' I have these values;
wf_default wf_field
2. added file myFunctions.js into the
WebContent/webfacing/ClientScript/usr
folder and it includes only these lines of code;
function myFunction(myobj,mystyle)
{
myobj.classname = mystyle;
}
I noticed that file webface7002.ja is in folder
WebContent/webfacing/ClientScript/
3. value for the HTML Inside Web Setting is;
<onFocus="myFunction(this,'myRed');">
also tried this code
onFocus="myFunction(this,'myRed');"
4. I added these two lines of code to the end of
WebContent/webfacing/styles/apparea/apparea.css file;
.myRed{background-color:red;}
.myNormal{background-color:white;}
Is any of this incorrect?
Lupe Galvan
////////////////////////////////////////////////////////////////////////
///////////////////
-----Original Message-----
From: wdsci-l-bounces@xxxxxxxxxxxx [mailto:wdsci-l-bounces@xxxxxxxxxxxx]
On Behalf Of Mike Hockings
Sent: Thursday, July 03, 2008 4:55 AM
To: Websphere Development Studio Client for iSeries
Subject: Re: [WDSCI-L] WebFacing subfile selected record/field color chg
Hi Lupe,
So what you are telling me is that it is working exactly as I had
intended
;-) I misunderstood what you meant by "selected", you are talking
about
the end user clicking on the field at runtime whilst I had been thinking
that you meant the field that you selected in Code/Designer.
If that is the case you could simply use the HTML overrides and set a
value for the HTML Inside Web Setting. Something like the following.
This adds JavaScript function calls when the field gets focus and looses
focus. If you want it to be one-way (i.e., gets set when the field gets
focus then remove the onBlur() call.
onFocus="myFunction(this,'myRed');"
onBlur="myFunction(this,'myNormal');"
Then define the myFunction() function in a file. For simplicity you
can
create myFunctions.js in the WebContent/webfacing/ClientScript/usr
directory of your project and in that file put something simple like
this.
Your WF app will need to be stopped then restarted in WAS to pick up
this
change. If you want to get real fancy you can use a myFunctions.jsp and
dynamically generate content in it.
function myFunction(myobj,mystyle)
{
myobj.classname = mystyle;
}
Then finally add a couple of style classes to the
WebContent/webfacing/styles/apparea/apparea.css file. These will need
to
match the style names that you use in the HTML Inside
.myRed{background-color:red;}
.myNormal{background-color:white;} // or whatever you want
Keep in mind that I have not tested all this so it may have undetected
typo's but I think it should all work.
Let us know how it goes
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
As an Amazon Associate we earn from qualifying purchases.
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.