I don't think I fully understand what you're doing, but for your onchange
line, maybe you could try:
d.write('<SELECT id="'+ref+'" onchange="top.do_something
(self,"'+ref+'")">');
Then the resulting drop-down will send a reference to its own window.
-Van
> I am using frames and I have a javascript program that I keep in the
frame
d> ocument(the one that defines all the frames) to display a drop-down
menu:
> display_yesno(mywin,ref) {
> var d = mywin.document;
> d.write('<SELECT id="'+ref+'"
o> nchange="top.do_something('+mywin+',"'+ref+'")">');
> d.write('<OPTION value=0>No</OPTION>');
> d.write('<OPTION value=1>Yes</OPTION>');
> d.write('</SELECT>');
}>
I> might have got the exact code wrong for the function, but in the real
t> hing the select box is displayed correctly in whatever frame that calls:
d> isplay_yesno("frame_name","id").
> The difficulty I'm having is with the onchange event. I want to keep the
o> nchange function in the frame document, but I want to change something
in
t> he html frame that has the select box. The onchange function is called,
b> ut I can't seem to pass the correct window reference. If I keep the
o> nchange event in the same window as the select box and only pass the id,
e> verything works fine.
> I've worked on this for almost a week now (on and off) and have searched
t> he net, but I'm still drawing a complete blank. I've tried surrounding
t> he window in quotes, but this doesn't work either
> Please Help!!!!!