Problem solve Get help with specific problems with your technologies, process and projects.

Attaching JavaScripts to field events in 4.6.7

I am developing a web application in 4.6.7 and was wondering if there is any way to "attach" JavaScript field events to fields like you can in R5? I have used Pass-Thru HTML to create a field (<Input Name="AccountNumber" Size="17" Maxlength="16" onBlur=TestValue()>) and I have created a hidden Notes field of the same name to act as a "placeholder." The onBlur event works properly and the JS code executes. The problem is that when the form is refreshed, the value in the HTML generated "AccountNumber" field is deleted. Doing the onBlur processing would be a breeze in R5 since all I would do would be to put "TestValue()" in the onBlur event of the Notes field. Is there anyway to do this in 4.6.7? Thanks for any help that you may have.

Well, there are two solutions to your dilemma. Let's take care of the question as you've asked it. First, I'm not sure why you're refreshing the document. However, even if you could get away without refreshing the doc, when you opened it again in read or edit mode, your data would not populate the pass through field. You need to run some JavaScript during the html doc onLoad event to populate that field. Now that answers the question as asked. Here's another solution. Instead of using the pass through field to define the field attributes, just place them in the HELP entry in the field's properties box. No need for quotes around the whole thing, just place

Size="17" Maxlength="16" onBlur=TestValue()

string in as the HELP definition. View the source of the html page in your browser to make sure that it looks correct.

Dig Deeper on Domino Resources - Part 2

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.




  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...