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