473,325 Members | 2,860 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

Pass selected <TD> value from child to parent window

Hi,

I am opening a pop up window (child) from a parent window.
The Child window does show a table with multiple columns and rows, each
showing a value, e.g. 9 or 10 or etc. I have the values as hyperlinks, so
that if a number is selected in the child window it should close
automatically and insert the selected value in a text field in the parent
window.
I have created following code, but does not work.
Any ideas why or other approaches ?
Thanks.

that is how I open the child window:

newwindow = window.open("0to100kbs.htm" , "popup1",
"width=350,height=350,screenX=200,screenY=200,top= 200,left=200",
"alwaysRasied");

my table data in the child window:
"..... <TD><a href="#" onClick="sendInfo (this.innerHTML);">5</a></TD>"

and the javascript on the child window:

function sendInfo(name) {
window.opener.document.6Cos.ef.value = name;
self.close(); }
where as 6Cos is the form name in my parent window and ef the text field
name.

Jul 20 '05 #1
1 2807
Filiz Duman wrote:
I am opening a pop up window (child) from a parent window.
The Child window does show a table with multiple columns and rows, each
showing a value, e.g. 9 or 10 or etc. I have the values as hyperlinks, so
that if a number is selected in the child window it should close
automatically and insert the selected value in a text field in the parent
window. window.opener.document.6Cos.ef.value = name;


I think that the name "6Cos", while valid HTML, might be the problem, at
least as you reference it; an identifier starting with a number in
javascript, cannot indeed be referenced using the dot notation.
Therefore, you need to use the square bracket notation, or to change the
identifier's name.

window.opener.document.forms["6Cos"].elements["ef"].value = name;
HTH
Yep.
Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Sturnoff Megantic | last post by:
This seems like such a stupid little problem, but it's been bugging me for hours now. I have a 2D array called agents2d. I need to loop through it and display the info. Here is my code: echo...
14
by: Zenobia | last post by:
Hello folks, Is it possible to position an item within a <td> element? For instance see below. The table has multiple rows, one for each database record. Each row has 3 hrefs associated with it...
2
by: js | last post by:
I have a table rendered with XSLT. The first column has a radio button controls for user to make a selection for a particular row. All the values in the remaining columns are all concated with a...
2
by: bissatch | last post by:
Hi, I am trying to use JavaScript to write a table column on a web page. The code is as follows: <html> <head> <script> function displaycount() {
3
by: RC | last post by:
I have a very sime html table like <html><head><title>My Table</title> <style> input { margin: 0; padding: 0; border-width: 0; text-indet: 0; text-align: left } </style></head><body> <table...
1
nirmalsingh
by: nirmalsingh | last post by:
i want to hide a td value to the users. how to make hide the values in <td> of html table? i have tried width=0px, width="0%". but it doesnt works.
5
by: Michael | last post by:
Hi. I need dinamically calculate input text field based on parent static TD before showing content of input. Please, advice. Michael
9
by: Lloyd Sheen | last post by:
I have now spent the entire morning on what I think should be easy. I cannot for the life of me figure out how to make a simple one row, two column table where is the contents of the one of the...
2
by: markszlazak | last post by:
I'm a relatively slow response of table cells changing their background color with mouseover/our in IE6 (Win 2K) but the response is fine (fast) in Firefox. Why? The code is below. Sorry about the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.