[Javascript] how do I know which buttom opened my pop window?

Tripp, Candace L TrippCL at state.gov
Mon Sep 16 12:37:45 CDT 2002


Do a search on eval. 

-----Original Message-----
From: Sabrina Leandro [mailto:saleandro at yahoo.com]
Sent: Monday, September 16, 2002 10:53 AM
To: javascript at latech.edu
Subject: [Javascript] how do I know which buttom opened my pop window?


Hi all,

I have a page to update information about images. Each
image has its source, size, link, etc. I have a popup
window to change the image source and link. Each image
has its button that opens this popup window. 

I generate the form via PHP, reading the info about
the images from a database. So my forms elements are
named like this: "name_of_the_element"+image_number.
So I have name_of_the_element1, name_of_the_element2
and so on. 

My problem is that I want to know which button from
which image was clicked to open the popup window, so I
can update the right form element. Does someone know
how can I do that?

Also, can I do something like this in JavaScript:
   
var name_variable = 'document.formname.elementname' +
number;

and then access name_variable.value?
which would be document.formname.elementname1 or 2 or
according to whichever image was selected?

I hope I could make myself clear :)
If not, ask me and I´ll try to be more specific.

Thanks in advance!
Sabrina


__________________________________________________
Do you Yahoo!?
Yahoo! News - Today's headlines
http://news.yahoo.com
_______________________________________________
Javascript mailing list
Javascript at LaTech.edu
https://lists.LaTech.edu/mailman/listinfo/javascript
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/ms-tnef
Size: 2598 bytes
Desc: not available
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20020916/ff95e89a/attachment.bin>


More information about the Javascript mailing list