Hi Steve,
Your JavaScript looks fine - keeping in mind that the "name" of elements are
case-sensitive of course.
So I would probably look at the HTML on both forms to make sure the referred
to elements exist and that there is only one of each.
If two HTML elements exist with the same "name" (except type="radio") - then
they are a collection and cannot be referenced using your script, and so
your function will fail.
Also, maybe try using variables for referencing "opener" and the popup
document - it will speed up the execution of the script. Example:
function updateParent()
{
var wopd = window.opener.document;
var dp = document.popup;
if (document.popup.popup1.value != '') {
wopd.LoadImages.Image.value = dp.popup1.value;
.......
}
Hope this helps. Cheers....
----- Original Message -----
From: "Fogelson, Steve" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, February 05, 2003 11:17 PM
Subject: RE: Witango-Talk: (OT)
> Scott,
>
> One more quick one. Do you see anything wrong with the following. The
second
> "if" is sporadic. I know there is a value in
"document.popup.popup2.value".
>
> I can't see anything wrong.
>
> <script language="javascript">
> <!--
> function updateParent()
> {
> if (document.popup.popup1.value != '') {
>
> opener.document.LoadImages.Image.value=document.popup.popup1.value;
>
> opener.document.LoadImages.i_type.value=document.popup.popup3.value;
>
> opener.document.LoadImages.i_width.value=document.popup.popup4.value;
>
> opener.document.LoadImages.i_height.value=document.popup.popup5.value;
>
> opener.document.LoadImages.i_size.value=document.popup.popup6.value;
> }
>
> if (document.popup.popup2.value != '') {
>
> opener.document.LoadImages.Thumbnail.value=document.popup.popup2.value;
>
> opener.document.LoadImages.t_type.value=document.popup.popup7.value;
>
> opener.document.LoadImages.t_width.value=document.popup.popup8.value;
>
> opener.document.LoadImages.t_height.value=document.popup.popup9.value;
>
> opener.document.LoadImages.t_size.value=document.popup.popup10.value;
> }
> }
> // -->
> </script>
>
> Steve
>
> -----Original Message-----
> From: Scott Cadillac [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, February 05, 2003 10:47 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Witango-Talk: (OT)
>
>
> Hi Steve,
>
> Try:
>
> if (document.popup.popup1.value != '')
>
> JavaScript IF statements will continue if the expression returns 'true' or
a
> number greater than 0.
>
> Hope this helps. Cheers...
>
>
> ----- Original Message -----
> From: "Fogelson, Steve" <[EMAIL PROTECTED]>
> To: "Witango User Group (E-mail)" <[EMAIL PROTECTED]>
> Sent: Wednesday, February 05, 2003 9:52 PM
> Subject: Witango-Talk: (OT)
>
>
> > Sorry I know this off topic. My knowledge about javascript is very
> minimal.
> > Appreciate if someone could tell me how to execute the following
> statements
> > only if document.popup.popup1.value is not empty.
> >
> > popup is the form of the current page.
> >
> > opener.document.LoadImages.Image.value=document.popup.popup1.value;
> > opener.document.LoadImages.i_type.value=document.popup.popup3.value;
> >
> > I think it is something like this, but I can't get it to work.
> >
> > if (document.popup.popup1.value) {
> > opener.document.LoadImages.Image.value=document.popup.popup1.value;
> > opener.document.LoadImages.i_type.value=document.popup.popup3.value;
> > }
> >
> > Also, can I use "this" to shorten it up?
> >
> > Thanks in advance,
> >
> > Steve Fogelson
> > Internet Commerce Solutions
> > ________________________________________________________________________
> > TO UNSUBSCRIBE: send a plain text/US ASCII email to [EMAIL PROTECTED]
> > with unsubscribe witango-talk in the message body
>
> ________________________________________________________________________
> TO UNSUBSCRIBE: send a plain text/US ASCII email to [EMAIL PROTECTED]
> with unsubscribe witango-talk in the message body
> ________________________________________________________________________
> TO UNSUBSCRIBE: send a plain text/US ASCII email to [EMAIL PROTECTED]
> with unsubscribe witango-talk in the message body
________________________________________________________________________
TO UNSUBSCRIBE: send a plain text/US ASCII email to [EMAIL PROTECTED]
with unsubscribe witango-talk in the message body