473,398 Members | 2,088 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,398 software developers and data experts.

Remote Table connectivity Using Javascript

I Have a File a.html
file Content
[HTML]<html>
<body>
<table>
<tr><td id="table1">this content from b.html</td></tr>
</table>
</body>
<html>
[/HTML]
b.html
file content
[HTML]<html>
<body>
<table>
<tr>
<td id="table2">this content should go to a.html table cell</td>
</tr>
</table>
</body>
</html>
[/HTML]
In this case how i shold transfer the data from table id ="table2" from a.html to table id="table1" which is in b.html using javascript code..

How can i made remote table connectivity??????

Is there is any possible?????
pls rectify my doubts if there is any javascript experts?????
Sep 25 '08 #1
7 1899
pronerd
392 Expert 256MB
If the two different files are loaded in frames in the browser at the same time you can use JavaScript to pass data from one to the other. If on the other hand you are wanting to pass data to a page that is not loaded in the browser JavaScript can not do that.

Passing data from one page to another would require a server side language like Java, PHP, ASP, etc.
Sep 25 '08 #2
If anyone wants to pass contents of one to another then for example these are the possible cases:

Case1:If a.html has opened b.html then the data of b.html can be passed to a.html.

Case2:If a.html and b.html are in the two of the different frames of the same window.


Then you can pass the thing in chain like using the object top.opener.document and top.frame['name of the frame']


other Java can help you in other case.
Sep 26 '08 #3
acoder
16,027 Expert Mod 8TB
There's two other possibilities which are limited, but possible with a small amount of data. One is cookies and the other is passing through the URL when opening the other page which can then be parsed using the String methods on location.search.
Sep 26 '08 #4
Yes acoder that is the thing as he had told he want to parse the table so this can be achieved through the two possible case which I had posted in the previous post.location.search and cookies can't handle a table having 5 or 6 rows and more than 3 columns.
Sep 26 '08 #5
rnd me
427 Expert 256MB
Yes acoder that is the thing as he had told he want to parse the table so this can be achieved through the two possible case which I had posted in the previous post.location.search and cookies can't handle a table having 5 or 6 rows and more than 3 columns.

you don't need frames or loaded pages at all.

simply ajax in "b.htm", set a new tag's .innerHTML to the responseText, find the table in the new tag using getElementsByTagName, clone the nodes, and append them into the mater table.
Sep 26 '08 #6
acoder
16,027 Expert Mod 8TB
Heh, how could I forget that? ;)

The fifth possibility probably being the "best".
Sep 26 '08 #7
Yes of course rnd that is fine .I was trying to do only it with javascript.As also I dont know much about the ajax utilities.
Sep 29 '08 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Andy Fish | last post by:
Hi, I am trying to show/hide a group of table rows using javascript and CSS. if I group them in a <tbody> element I can do: my_tbody_element.style.display="none"; to hide them and ...
1
by: Karim | last post by:
I have a form built into an html table. One of the form elements is an asp.net dropdownlist. For some options in the listbox, I want to insert a new table row under the listbox to grab some more...
5
by: Hari2005 | last post by:
I try to get width of a table using javascript. Table width is not defined in table. It grows as per the data. Please suggest how to get table width using javascript at run time??????? Thanks in...
1
by: Mel | last post by:
<TR> <TD> <My for element with id=T100 </TD> </TR> what I really want is something like: ParentOf (ParentOf (document.getElementByID("T100"))).display= 'none'
8
by: cvijaykrishna | last post by:
hi can i connect database using (client side )javascript. pls send me a sample code. so that it would be very much helpfull.
1
by: gaya3 | last post by:
Hi, How to insert row in table using javascript when some event occurs in html? -Hamsa
1
by: stepby | last post by:
Dear All, I want to make a function to add a row in the table by click the add button and delete the row by choosing the checkbox at the first of the row and click the delete button. can it...
1
by: ssrirao | last post by:
Hi, I have a table in the database and I want to insert the values into this table by using JavaScript. Does anyone know how to execute the Sql stored procedure using Javascript. Thanks
1
by: visweswaran2830 | last post by:
Hi, I want to insert href into tabel cell using javascript. Note should support all browser. I know to insert, but it support only in IE, I checked in firefox, it does not support so please...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.