|
Rob, Did you send me the entire HTML, or just part? Have you found a way to prevent the <HR> from being generated because it's not there now. I see two problems (I'm testing w/Firefox, but NS should be the same). 1) Since there is no <HR> the code to remove <HR> is failing, and the rest of the script block isn't executing, hence session never gets set. 2) defer=true or not, the script block with cbt2 is getting run before the rest of the page is loaded. So even after we fix it so session is loaded, the buttons don't exist when the code runs. If I move the script block below the form all is good. Per the standard for defer: "When set, this boolean attribute provides a hint to the user agent that the script is not going to generate any document content (e.g., no "document.write" in javascript) and thus, the user agent can continue parsing and rendering." However, that doesn't say that the agent "MUST" defer processing so defer won't do what you want anyway -- at least not reliably. Finally, I assume the wrapped string constants in the fm() function are from the e-mail and aren't wrapped in your code so I fixed them in my test, but didn't count that as an error. If they're wrapped in your code you need to fix that too. -Walden ------------ Walden H Leverich III President & CEO Tech Software (516) 627-3800 x11 WaldenL@xxxxxxxxxxxxxxx http://www.TechSoftInc.com Quiquid latine dictum sit altum viditur. (Whatever is said in Latin seems profound.) -----Original Message----- From: web400-bounces@xxxxxxxxxxxx [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of Rob Dixon Sent: Thursday, 11 November, 2004 11:44 To: Web Enabling the AS400 / iSeries Subject: Re: [WEB400] Javascript and browser compatability - progress Walden You are so kind to continue with your help Walden H. Leverich wrote: >Don't change button names w/innerHTML. Change them by changing the value >of the button. Here's my version of your cbt() function: > >function cbt2(letter, newText) { > var buttons2 = session + "/BUTTON.999-999=*" + letter; > document.getElementsByName(buttons2)[0].value=newText; >} > > As I said in my previous post, I had tried the above, but I couldn't get it to work in NS. To be sure that I had done it correctly, I have now tried again but still it doesn't work. NS still insists that document.getElementsByName(buttons2)[0] has no properties I have taken the liberty of including a code snip in case it is simply a typing error that I cannot see. Many thanks again Rob ______________________________________________ <html><head><title>AS/400 Workstation Gateway</title> <style>A:link {color:blue;text-decoration:none;font-weight:bold;} A:visited {color:blue;text-decoration:none;font-weight:bold;} A:hover {color:blue;text-decoration:underline;font-weight:bold;}</style></head> <body bgcolor="#c0c0c0"> <form method="post" action="http://195.171.126.130:5897/WSG/019414/QTMTWSG/QTWSG00624"> <input type="hidden" name="SESSION" value="/42329C9CC0694FC9/4FD9C6F3"><pre> <center><h3>AS/400 Workstation Gateway</h3></center> <font color="WHITE">ERROS Workgroup Organiser<font color="YELLOW" size="-1"> (An ERROS Application) <font color="BLUE" size="+0"> Rob Dixon <font color="NAVY"> Rob Dixon Collection <br> <br> <br> ERROS Country <br> name <br><script language="JavaScript"> var nHR = document.getElementsByTagName("HR")[0]; var nHRParent = nHR.parentNode; nHRParent.removeChild(nHR); var num; var msgt; var colour; var session=(document.getElementsByName('SESSION') [0].value); javascript:window.history.forward(1); colour = "cyan"; void(document.bgColor='C0C0C0'); function fd() {var buttonname = session + "/BUTTON.999-999=*E"; document.getElementsByName(buttonname) [0].click()} function fm(msg) {; if (msg=='1') {msgt="Double left click on link to navigate"} else if (msg=='2') {msgt="Double click to continue"} else if (msg=='3') {msgt="Double click to Navigate or Single click and then select option"} else if (msg=='4') {msgt="Double click for details or Single click and click on Navigate"} else {msgt="Hover over highlighted links or images for instructions"} javascript:document.getElementById('popupText').innerHTML=msgt;} function fr(num) {document.getElementsByName('AFIELD.007-016') [0].value = num} </script> <font color="#ffff00"> Public Data</font> <input type="text" name="AFIELD.007-016" value="" size="64" maxlength="64"> Selected <font color="#ff00ff"> </font> <table><tbody><tr><td bgcolor="YELLOW"> To accept, click on ENTER; else type new ID & click on ENTER </td></tr><tr><td bgcolor="yellow" id="popupText"> Hover over highlighted links or images for instructions</td></tr></tbody></table> <br> <br><tt><font color="YELLOW">(Page Down for more) <br><font color="BLACK"> 1<a href="#" onmouseover="fm(2)" ondblclick="fr(1); fd()" onmouseout="fm(9)" ;=""> United Kingdom</a> <br><br> <br> <br> <br> <br> <br> <br> <br> <br> <script language="JavaScript" defer="true"> function cbt2(letter, newText) {var buttons2 = session + "/BUTTON.999-999=*" + letter; document.getElementsByName(buttons2) [0].value=newText;} cbt2('1', "Help"); cbt2('2', "MSG Help"); </script> <input type="submit" name="/42329C9CC0694FC9/4FD9C6F3/BUTTON.999-999=*E" value="Enter"><input type="submit" name="/42329C9CC0694FC9/4FD9C6F3/BUTTON.999-999=*U" value="Page Up"><input type="submit" name="/42329C9CC0694FC9/4FD9C6F3/BUTTON.999-999=*V" value="Page Down"> <input type="submit" name="/42329C9CC0694FC9/4FD9C6F3/BUTTON.999-999=*1" value="F01"><input type="submit" name="/42329C9CC0694FC9/4FD9C6F3/BUTTON.999-999=*2" value="F02"> </font></font></font></tt></font></font></font></font></pre> </form> </body></html> _______________________________________________ This is the Web Enabling the AS400 / iSeries (WEB400) mailing list To post a message email: WEB400@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/web400 or email: WEB400-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/web400.
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.