DSPATR(PC)

Use this board for starting discussions, asking questions, and giving advice on Web programming for the IBM i platform (and predecessors.)
BFoster
Profound User
Posts: 50
Joined: Fri May 24, 2019 6:26 am
First Name: Ben
Last Name: Foster
Company Name: Manhattan Assurance Company
Contact:

DSPATR(PC)

Post by BFoster »

I've searched the forums and the documentation for the proper use of DSPATR(PC) but cannot locate an example or discussion about its implementation.
This is the only thing I've found:
This property identifies a field containing a display attribute hex value. It represents the DSPATR keyword with a program to system field parameter. The hex value is translated to the appropriate css class at run time.
The problem is that a user in PgmA has the cursor on a field that is important to them. When they press a command key to call PgmB (a browse/select pgm), select a record to return to PgmA, the cursor is placed into the first input-capable field on the screen. Would like to have the cursor stay put. Also, what is the hex value to use ?
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: DSPATR(PC)

Post by Scott Klement »

Can you give us a little more context?

DSPATR(PC) is a green-screen DDS keyword. Are you talking about coding DSPATR(PC) in a green-screen program, and then maybe running that program in Genie?

Or, are you referring to the equivalent functionality in a Rich Display (i.e. the "set focus" property.)?

Though, you posted this in the "web programming" forum so maybe what you're really looking for is the ability to code your own HTML outside of Genie or a Rich Display? In that case, to set the focus, you'd use JavaScript code such as myDomObj.focus().

But, then you are referring to a "hex value". What do you mean by that? Are you referring to manually coding the 5250 data stream? (In which case, it really doesn't make sense that this is under "web programming"!)

Or do you mean something completely different that I haven't thought of?
BFoster
Profound User
Posts: 50
Joined: Fri May 24, 2019 6:26 am
First Name: Ben
Last Name: Foster
Company Name: Manhattan Assurance Company
Contact:

Re: DSPATR(PC)

Post by BFoster »

Yeah, as soon as I pressed "Submit" I realized posting it under "Web Programming" was not the best place for the post. Apologies for that and the confusion. I looked for a way to categorize the post under "Profound UI Rich Displays" but that option doesn't exist.

This is a Rich display based application with the screen converted from DDS.

My reptile RPG brain still thinks in terms of DDS.

I believe you answered the question by referring to the use of JavaScript to set focus on the field. I'll give that a try.

Thanks.
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests