How To Pass <table> Back To Parent

Oct 17, 2002

I'm spawning a child window from a parent. In the child I'm dynamically building a table. When I click "finished" I want the entire table to go back to the parent and replace the original table "shell" (an empty <table> </table> tag-pair).

Note: The table ID is the same at the parent and child. This allows the replacement to work repeatedly. The child window closes but I don't see the table on the parent.

I get the feeling I'm mixing DHTML and DOM (ie "window.opener....") and .. well, I don't know what to think.

Is it OK to nest DOM functions as shown in the code?

I've tried a couple of different things - I'd like to use "replaceNode", but the syntax is not clear in the reference I have.

[b]The problem{/b]
Below is the function triggered by the child window "finished" button's onclick event.

I suspect the variable assignment is wrong as an alert box immediately after it (removed in this sample) did not show up.

function finished() {
var oldReport = window.opener.document.getElementbyId('DBReportsTable');
oldReport.firstChild.removeNode(true); // the <tbody>
oldReport.appendChild(document.getElementById('DBReportsTable').firstChild);
window.close();
return true;
} // finished()

View 2 Replies


ADVERTISEMENT

AttachEvent - Send Data Back To The Parent Page To Create New Table Rows

Jan 13, 2009

A page I'm working on lets users open a new window, which in turn lets them send data back to the parent page to create new table rows, cells, links, etc. One of the links created is "delete", so it should delete the row that the delete link belongs to when clicked on. I can do this no problem in ff using the setAttribute('onclick',onClickEvent), but can't do this in IE. I'll show some code to make this easier to understand....

[Code]....

View 3 Replies View Related

Pass Cookie Value Back To Server?

Mar 30, 2006

I have a web page that displays records from a database. I want to
allow the user to specify his own "page size" - that is, the number of
records to be displayed on a given page. I have a place set up for him
to enter a value and save it to a cookie. My problem is, I can't
figure out a good, simple way to pass that value back to the server.

The page is accessed in various ways: it's first viewed by selecting
it from a javascript menu. Then the page itself contains a form with a
series of buttons that allow the user to jump to a specific page above
or below the current page. There are also "sort links" at the top of
the columns of data which refresh the data sorted in a different way.
In all of these cases, I will need to pass the page size back to the
server.

I tried storing the page size in a hidden input field. This works but
it's not available on the first request (from the menu). I thought
about passing in the value as a query string (mypage.htm?PS=123) but I
can't figure out how to attach the value to all of the various
requests (menu, form and links).

View 1 Replies View Related

Pass The Variable (1/0) Back To The File?

Jun 9, 2010

I have a form, I have successfully passed the username from jquery

$.post("http://www.photographycourses.co.uk/cpl/cplfunctions.php?action=checkUsername", { username: username} );

to php script. The php script checks the database to see if the username exists:

if ($num >=1){
echo= 0;
}else{
echo= 1;}

How do I pass the variable (1/0) back to the javascript file?

View 1 Replies View Related

Ajax :: Pass Values Back From The Server?

Aug 31, 2009

how do i pass values back to javascript from the server via ajax? I don't want to pass entire html. Is there any way to simply pass a JavaScript object or an array without stuff like xml and json? I could probably do an eval() on the result to convert it to a javascript understandable array, but maybe there's a more clever way to do that?

View 2 Replies View Related

Focusing Back The Parent Top.focus() Does Not Work In IE

Feb 20, 2010

I have an Iframe in my webpage wher I have the focus. I now want to give the focus back to the parent document, so i've used top.focus() in my code. Works fine in almost every browser but not inIE7.

View 4 Replies View Related

Passing Values From 1 Opened Pop-up Back To Parent Window?

Feb 18, 2010

I've been struggling on how to make this work.I have a problem in Javascript when it comes to passing of value in a input type field.

page1.html
<html>
<head><title></title></head>
<form action="" method="post>

[code]....

View 5 Replies View Related

Passing Values From 1 Opened Pop Up Back To Parent Window?

Feb 17, 2010

I have a problem in Javascript when it comes to passing of value in a input type field.

page1.html

Code:
<html>
<head><title></title></head>
<form action="" method="post>
<input type="text" name="weight" value=""><a href="hw_calculator.html"

[Code]....

View 1 Replies View Related

Pass A Value From Parent JS To Child Window?

Jan 10, 2010

I need to pass a value from parent JSP to child window / pop up window.

in pop up window, i have a textbox which has id as rs and name as remSeconds

from parent i need to pass the value calculated from a timer which is remainingTime. code...

View 13 Replies View Related

Iframe Form Variables To Pass To Parent?

Apr 11, 2010

just need this last bit then I got it all working...

Parent:
Code:
<iframe src="makemodel_dropdowns.php" height="100px" width="300px" frameborder="0">Cannot See iframe</iframe><br />
<input type="text" value="<?php echo $make; ?>" name="make"/><br />
<input type="text" value="<?php echo $model; ?>" name="model"/><br />
[Code]...

I really want to pass the $make and $model variables to the parent form which will just be hidden.

View 4 Replies View Related

AJAX :: Pull Back MYSQL Table

Aug 4, 2010

I am trying to use AJAX to pull back mysql table information. I tried to alter an example I found (w3 schools) where they showed how use a selection table to pull a specific line out of a mysql table, using the "q" (not really sure if the "q" character is important or not). xmlhttp.open("GET","xxxxxxx.php?q="+str,true) I follow what they were doing there, but I want to pull the entire table back not just specific lines. (So I got rid of the Q)

Here is a snipit of HTML. The showdata function is part of the testpull.js code. You click the button and it should run the javascript to pull back the entire table and place it in the "placedata" div section.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>

[Code]....

View 3 Replies View Related

Back Button - Remember Actions - Table Sorting

Sep 10, 2009

I have a list like this...

Thing 1
Thing 2
Thing 3
(expand)

When you click on expand, it becomes.

Thing 1
Thing 2
Thing 3
Thing 4
Thing 5
Thing 6
Thing 7
(shrink)

Now, user X clicks on Thing 6. He didn't want 6, but 7. So he clicks the evil back button. Now the list is truncated again and the user gets annoyed wishing that the list was expanded where he left off. What's the best way to let javascript remember to keep the list expanded after the back button is pressed? I have the same issue for table sorting. I use the Jquery tablesorter pluggin and the sorting is forgotten after the back button is pressed.

View 2 Replies View Related

Call A Function And Pass A That Particular Table Row As A Table Row Object To A Function?

Oct 22, 2010

On the click of a table row I want to call a function and pass a that particular table row as a table row object to a function. I was wondering how I would do that? And also if I could grab the number of that table row as well.

View 3 Replies View Related

JQuery :: Use Of Next() And Parent() With Next <table>

Mar 1, 2011

current state:

html
.
html
<

[Code].....

I need to hide the "next" table.

But with my given example above, it just works for the first <a> Element.

In fact, if I press another the second or third nothing happend.

But why ? I cant get the reason... how can I hide the next table after the <p> tag ?

View 1 Replies View Related

JQuery :: Passing Created Table Row And Data Back From Ajax Call

Apr 18, 2011

I am trying to figure out how to pass the html back from an ajax call

Let me give a couple snippets

jquery call:

View 2 Replies View Related

Getting Data Back To Parent Window Field From Popup Window

Apr 7, 2007

My problem is that ..... I have to select Data from Popup Window and get that Data back to my Parent window's textarea field..

View 2 Replies View Related

Pass Data From An Object (table) To A Alert Box?

Dec 25, 2009

I am doing some custom development in Salesforce.com's Force.com platform.

I have built a custom object (table) called "conferences" which has 2 fields named "Conference name" and "Number of attendees". I need to pass data from these fields to a Java Script Alert box. the Javascript code I need to use to make this happen?

Basically I need to know the method, procedure or function to use to pass data from the object (table) into the Javascript alert box.

View 1 Replies View Related

JQuery :: Getting Collection Of Table Cells After Using .parent?

Aug 3, 2011

I'm using .parent on a draggable table row and need to check the contents of every cell in a particular column in the table. $(ui.draggable.parents("table")[0]) This gives me the table.. how do I get say the collection of cells in column 2. I thought about something like this: $(ui.draggable.parents("table")[0](tr td[1]))

View 2 Replies View Related

Modify A Table In A Parent Window Froma Child

Feb 2, 2006

I'm having problems changing a table from a child window.

What works (but I really want to add more complex objects to teh cells
not just plain text)

var myTable = self.opener.document.getElementById("MY_TABLE");

var row = myTable.insertRow();
var cell = row.insertCell();
cell.innerText = "New value";

I've tried the two below methods but they both fail.

var myTable = self.opener.document.getElementById("MY_TABLE");
var row = myTable.insertRow();
var cell = row.insertCell();
cell.appendChild(self.opener.document.createTextNo de("New Value")); <--
Gives me an error of "Invalid arguement"

I've also tried

cell.appendChild(document.createTextNode("New Value")); <-- Gives an
error of "No such interface supported"

Any ideas?

View 1 Replies View Related

JQuery :: Nesting Tables - Exists In My Last Row - Parent Table

Jul 25, 2009

In my last row (parent Table) with colspan(tr), I have another Table (without any.attributes) which was generated by GridView, Paging enabled and located in footer ..

How do I know if that Table exists in my last row(parent Table).. this code won't work ..

View 7 Replies View Related

JQuery :: Remove A Table Row And Also Pass A Parameter To The Function Removing Tr?

May 26, 2010

i wish to remove a table row on click i do know that it can be done using the following code

$
(
'#myTable tr'
).
click

[Code]...

what if i also wanted to pass a certain value as a parameter to this function. basically what i wanna do is, i have a 'x' on each row so when a user clicks it i want the row to delete and at the same time wish to use ajax and delete thatrow from the database as well.

View 1 Replies View Related

Pass Array From Child Window To Parent Window?

Jun 22, 2009

My scenario is like this.

1. Click on button and pop up child window.

2. Select multiple checkbox and submit array which send back to parent window and value store in a hidden variable.

i manage to do pop up child window, pass textfield value to parent window. But it cant send php array to parent window. Please help. I'm not good in js. code...

View 3 Replies View Related

Pass Values For A Popup Window To Parent Window

Jan 19, 2003

how I can populate the value of an input field on a parent window from a selected item (of a form - listmenu) on a pop-up window? Basically, I need to pass the value of one form to another form located on a different page...

View 1 Replies View Related

Pass Value From Child Page To Parent Page?

Sep 26, 2011

I have parent page http://localhost/pc/rep/pc.php after the user enter the customer data, the user will press button to print it

then, call child page via window.open jar:http://localhost/pc/rep/my-ca/script.jar!/test.html

as you can see, they are belong to the same domain.

The user will select the lables that the program will printed, and the numbers of each one.

I don't know, how can I pass the data from child to parents.

parent.opener.document.forms.item(4).txtClaimTicket.value = 1;
[permission denied for <http://localhost> to get property window.document from <http://localhost>

View 5 Replies View Related

Editable Table - With Editable Rows And Columns That Will Feed Back Into A Database

Aug 12, 2009

I'm trying to implement is a table with editable rows and columns that will feed back into a database. If I could do it with AJAX that would be great too, but I'm not too familiar with javascript. I don't need the code, I need more of an idea. The HTML Table is currently a recreation of the MySQL table minus a few columns. Its all in text, but if I could make the text editable, or better yet, make the text turn into input boxes it would be really cool. I'm not really sure what kind of methods and properties I would need, or quite how to put it all together. What do you think is the best way to go about the entire project?

View 8 Replies View Related

Having A Lightbox Pop Up When A User Clicks The Back Button In Their Browser Rather Than Just Navigating Back

Jul 1, 2011

I'm looking to have a lightbox pop up when a user clicks the Back button in their browser rather than just navigating back. The purpose is to ask a question with a Yes/No answer, and if they click No, I allow them to go back. The only thing I've found anything like this is the onUnload event, but that doesn't prevent them from going back. How should this be handled?

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved