p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

proasp_codeclinic thread: update main window from pop up


Message #1 by dont worry <aspmailbox@y...> on Thu, 8 Nov 2001 08:27:43 -0800 (PST)
Yes you can. Here's a peace of code to do it.
It only works in IE5 and up. And maybe in Netscape 6.

<script language="javascript" type="text/javascript">
function appendOption() {
var objNewNode = document.createElement("OPTION");
objSel.appendChild(objNewNode)
objNewNode.innerText="second"
}
</script>
<select name="objSel">
<option value="1">first</option>
</select>
<button onclick="appendOption();">append</button>

Gerhard Wentink

----- Original Message -----
From: "dont worry" <aspmailbox@y...>
To: "Code Clinic" <proasp_codeclinic@p...>
Sent: Wednesday, November 14, 2001 9:07 PM
Subject: [proasp_codeclinic] Re: update main window from pop up


> Gerhard,
> Thanks for the answer on getting a new value from a
> popup to a form.  I'm going to submit the pop up box
> to have it insert the new value into a database table.
>  If successful then I want to write it to the orginal
> form.  Question, can I write it to a drop down as a
> new option, without having to lose the other values on
> the page?  Will I have to rewrite the entire drop down
> box?
> DW
> --- Gerhard Wentink <data@w...> wrote:
> > If a textfield in the popup window  and a hidden
> > field in the main window is
> > named "lastname" The place this in the onsubmit
> > event:
> >
> window.opener.forms[0].lastname.value=document.forms[0].lastname.value
> > The hidden field the receives the value of the
> > textfield in the popup
> > window.
> >
> > Regards
> >
> > Gerhard Wentink
> >
> >
> > ----- Original Message -----
> > From: "dont worry" <aspmailbox@y...>
> > To: "Code Clinic" <proasp_codeclinic@p...>
> > Sent: Thursday, November 08, 2001 5:27 PM
> > Subject: [proasp_codeclinic] update main window from
> > pop up
> >
> >
> > > <problem>I have a add to list link which produces
> > pop
> > > up.  User should be able to enter item and submit
> > it.
> > > On submission it should write value in hidden
> > field on
> > > Main window.  I don't want to lose the settings on
> > the
> > > main page so reloading is not an option.  How can
> > I
> > > accomplish this?
> > > </problem>
> > >
> > > __________________________________________________
> > > Do You Yahoo!?
> > > Find a job, post your resume.
> > > http://careers.yahoo.com
> > >
> > >
> > > ---
> > > You are currently subscribed to proasp_codeclinic
> > as: data@w...
> > $subst('Email.Unsub')
> > >
> > >
> >
> >
> >
> > ---
> > You are currently subscribed to proasp_codeclinic
> > as: aspmailbox@y...
> > $subst('Email.Unsub')
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> Find the one for you at Yahoo! Personals
> http://personals.yahoo.com
>
>
$subst('Email.Unsub')
>
>




  Return to Index