PDA

View Full Version : node in a window widget form



fmx250
10-20-2008, 01:46 PM
1) Script Title:
DHTML Window widget (v1.1)
2) Script URL (on DD):
http://www.dynamicdrive.com/dynamici...ndow/index.htm
3) Describe problem:
in my haupt.php i open a window widget with following code:


function oeffne_daten() {
ajaxwin=dhtmlwindow.open("f_daten", "iframe", "daten.php?aktion=daten_start", "Stammdaten", width=710px,height=650px,left=100px,top=60px,resize=0,scrolling=0,center=0") }


in my daten.php i will raise a node with following code:

document.getElementById('nummer').focus();

the id of the input field is nummer.

nothing happens!!
does someone know what i have done wrong?
i will be very lucky if someone can help me!!!
thanks

ddadmin
10-21-2008, 08:40 AM
Where exactly is element "nummer" located at, within daten.php, or the main calling page? If the later, you can get to it by doing:


parent.document.getElementById('nummer').focus()

fmx250
10-27-2008, 06:40 AM
the input field 'nummer' is within daten.php

thanks for your efforts!

ddadmin
10-27-2008, 08:12 AM
So you're trying to reach the field with ID="nummer" from the parent page that opened the DHTML window? If so, you'd use:


window.frames["ajaxwin"].document.getElementById('nummer')