Re: General DHTML question about ID
From: Roland Hall (nobody_at_nowhere)
Date: 02/29/04
- Next message: Roland Hall: "Re: window.close problem"
- Previous message: Joe Fawcett: "Re: Jscript database connection"
- In reply to: Lithium: "General DHTML question about ID"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 29 Feb 2004 04:02:44 -0600
"Lithium" wrote:
: if i set an ID on a element i can reach it with window.id or id or
document.all.id
: for example
: <input type="text" id="test_input">
: reachable window.test_input or
: test_input or
: document.all.test_input
:
: but if i put a form over it -><form><input type="text"
id="test_input"></form>
: i can't reach the INPUT Element with window.test_input or direct with
test_input. -->error: test_input undefined
: only document.all.test_input works
: the same shows up with select element, or other Elements which can be sent
by form.
: why?
: i thought id is a unique identifier which can be easily reach per ID or
window.ID
document.getElementById("test_input")
: the second problem i have is putting an ID on iframe
:
: <iframe id="test_iframe"></iframe>
:
: alert (test_iframe) shows up that the ID is set..--> Object
:
: but the property test_iframe.src is undefined. alert (test_iframe.src) ->
undefined
: but document.all.test_iframe.src is defined. alert
(document.all.test_iframe.src) -> ""
:
: so what i want to say is, i can only set the src property of an iframe
with document.all.IFRAME_ID.src=..
: why not with IFRAME_ID.src;
1. You're not providing src in the iframe example above.
2. document.getElementById("test_iframe").src perhaps?
-- Roland Hall /* This information is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. */ Technet Script Center - http://www.microsoft.com/technet/scriptcenter/ WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp MSDN Library - http://msdn.microsoft.com/library/default.asp
- Next message: Roland Hall: "Re: window.close problem"
- Previous message: Joe Fawcett: "Re: Jscript database connection"
- In reply to: Lithium: "General DHTML question about ID"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|