pgm_b fires before pgm_a is completed

M

Michael Hill

I have a link on my form like:

<a href="javascript:pgm_a();pgm_b()><img src="a-.jpg"></a>

that I want to do 2 things:
1) open up a component window and let the user make a selection and
store the result in an input text field we will call fielda,
2) update another field we will call fieldb based on the value of what
gets stored in fielda.

What is wrong with the way I have this link is that pgm_b gets fired off
right after pgm_a fires and does not wait until the user has made the
selection.

I don't want to modify the component window and put code in there to
execute pgm_b because it is used on many screens and is only applicable
to this screen. I don't want any custome code in there.

Pgm_a resides in the component window and pgm_b resides in the screen
window.

I tried putting an onBlur event in the input field where pgm_a updates,
but it doesn't get fired off.

Any thought are appreciated.

Mike
 
M

Michael Hill

OK this is what I did to fix the problem I was having.

1) on the <input> object I included an onblur="pgm_b" event and took pgm_b
out of the link.
2) in the component window I inlcuded a focus, then a blur to the input
object mentioned in 1) above.

pgm_b then fires off when it should.

Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top