× 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 fully realise that you must be correct but I don't 
>understand the difference between name and ID. 

In IE apparently there isn't one. MS's description of getElementById
explicitly claims that it will return the object whose id OR NAME is
supplied.

Per W3C, the ID attribute is part of the HTMLElement object -- the root
object for EVERY HTML element. That is to say, ID is a valid attribute
on ANY HTML tag. However, Name is only a valid attribute on a few tags,
namely the ones dealing w/forms. 

Also, the standard says that id MUST be unique, but makes no mention of
that requirement for the name attribute, and it even goes on to say that
"The scope of the name attribute for a control within a FORM element is
the FORM element" which would imply that duplicate names are expected
across different forms in the same document.

See
http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/Overview.html#contents
for the spec.

-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: Monday, 08 November, 2004 15:37
To: Web Enabling the AS400 / iSeries
Subject: Re: [WEB400] Javascript and browser compatability

Walden

Once again I am most grateful to you for taking the time to help me.

1.  Session

Unfortunately, the buttons are generated by AS/400 WSG  after I can put 
anything  into the datastream.  That is whay I put the defer in.  I n 
fact, it doen'st always work with IE.  Sometimes IE does the first few 
button name changes and then gives up.  I did try putting all my scripts

into a .js file, but couldn't get it to work.  However, I didn't spend 
very long on it and I feel that it should be within my limited 
capabilites to get it to work this way. I imagine that this would 
overcome the problem. It would also cut down traffic once the file had 
been loaded by the browser.    By no means everyone in the UK can get  
DSL, ISDN, which I have to use as I cannot get DSL, is expensive for 
many people  and dialup can be very slow - I get 21.6 kps only so I 
don't use it.   I could move but I live in a house built in 1312 and 
there aren't too many of those around!  We should get DSL next May.

The alternative would be to somehow insert the scripts after the </PRE> 
but this is beyond me.

2   I will study your suggestion on name as opposed to ID and try to 
make the change.    I fully realise that you must be correct but I don't

understand the difference between name and ID.  To me, a name is a form 
of ID, as are, for instance,  reference number, and  date and time 
stamp.  However, if I can get it to work, that is all that matters.

3.  It only took a minute to put in your script to get rid of the <HR> 
and it works, saving space.  I will comment further in response to your 
second e-mail. 

Very many thanks  again

Rob






Walden H. Leverich wrote:

>Rob,
>
>First, I can get the SESSION stuff to work, but only if I place the
>scripts at the end of the document. I'll bet that NS doesn't support
the
>defer=defer option on the script tag. Move the scripts to the end. 
>
>Second, there is no element with an ID of "...BUTTON..." but there are
>elements with a NAME of "...BUTTON...". So you need to use the
>getElementsByName function. However, that function returns an array so
>you need to deference the first element (Note, it's a plural Elements).

>
>document.getElementsByName(buttons2)[0].value=newText;
>
>Seems to work in both IE and NS. I'm sure this is also the problem
>placing your value into AFIELD.007-01 since that's a NAME, not an ID. 
>
>As for the HR, I can get rid of it visually, but I can't get the space
>back. This will get rid of it visually when placed at the start of your
>JS:
>
>var nHR = document.getElementsByTagName("HR")[0];
>var nHRParent = nHR.parentNode;
>nHRParent.removeChild(nHR); 
>
>-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.)
> 
>
>_______________________________________________
>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.
>
>
>  
>

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


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.