× 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.



I'd also add my vote for using a toolkit. I use jQuery and as I become more and more comfortable with it it has certainly made my life easier and my code more readable. There is even a plugin for "cascading select boxes" that makes the whole process simpler. If you are new to Javascript, you may want to invest in the learning curve now since the coding techniques tend to me more homogeneous and easier to assimilate when you use a single toolkit. jQuery and JSON have made programming life so much more livable and you are insulated somewhat from browser incompatibilities when using a toolkit.

Take a close look at jQuery.

Pete


Bob P. Roche wrote:
I am very new to javascript and web programming. I have done some basic pages using CGIDEV2 to build the pages, but, this is my first real foray into ajax and extensive javascript. I did look at EXTJS, but my limited (read none) knowledge of javascript made it hard to understand how to use. I will look into DOJO, EXTJS and PROTTYPEJS further. I did try a demo of Valence which uses EXTJS, and returns JASON, and ti was much easier to work with, compared to coding by hand.
Since there is no budget for software, and the update sounded simple I thought I'd learn some javascript and learn how AJAX works. Now I know its more IE then my code. As i said I was basing it on Aaron Bartell's article in IBM systems mag, adn was able to duplicate his sample in my own program. Being a green screen coder I didn't know it was not available in IE to just replace the options and not the whole select group. Thanks for that very important piece of information.



From:
"Walden H. Leverich" <WaldenL@xxxxxxxxxxxxxxx>
To:
"Web Enabling the AS400 / iSeries" <web400@xxxxxxxxxxxx>
Date:
12/31/2008 10:35 AM
Subject:
Re: [WEB400] AJAX issue in IE
Sent by:
web400-bounces@xxxxxxxxxxxx



You can't get there from here. It's a known issue that you cannot set
the innerHtml on a select in IE and have it do what you want. Like it?
Nope. But there it is, deal with it. :-)

Options:

1 (Recommended): Return the <select> part too from the Ajax call and
wrap the select in a span and set the span's innerHtml, works fine.

2: Return just the <option> part, and wrap it up in a select in JS and
then see option #1.

3: Return the items you want in JSON, or other non-html format, and use
the .Add method to add the options to the select tag

Also... Why on earth are you not using a toolkit? If you take option 1
(my recommendation) and had prototype.js as your toolkit your entire
code could (from the <script> to the </script>) be replaced with:

function updDropDown(fldName) {
Ajax.Updater('shiptospan', '/cgi-bro/SYG930?DDMODE=S&DDVIEWNAME=CB01HP&DDFLDNAME=BTCD&DDDEFAULT='
+ $F('fldName'));
}
where 'shiptpspan' is the id of the span you wrap the shipto select in,
and it would be x-browser to boot.

-Walden


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.