hai experts,
i am having page called main.html, when the user clicks a button in this page a popup window of pop.html is opened. in pop.html user enter his name and close that popup window.
now what i need is:
the name entered in pop.html shiould be shown as table format in main.html. the row should be added each and every time the user open and enter a name. without refreshing main.html. what should i do for this.
16 47271
plz try this code .......
in main.html
================= - //ur code
-
<table id = my_tab>
-
</table>
-
//ur code
in pop.html
================= - <body onbeforeunload = passMain()>
-
<input type = text id = ur_name>
-
</body>
in pop.js file
================== - function passMain()
-
{
-
var cell_obj = window.opener.document.getElementById('my_tab').insertRow().insertCell()
-
cell_obj.innerHTML = doument.getElementById('ur_name').value;
-
}
-
if u close or refresh the popup html the row will be inserted in main.html
plz send ur response
i am online
no reaction in main.html.
my code:main.html -
<html>
-
<body>
-
<table id = my_tab>
-
</table>
-
</body>
-
</html>
pop.html -
<html>
-
<head>
-
<script language="javascript" src="pop.js">
-
</script>
-
</head>
-
<body onbeforeunload = "passMain();">
-
<input type = 'text' id = 'ur_name'>
-
</body>
-
</html>
pop.js -
function passMain()
-
{
-
var cell_obj = window.opener.document.getElementById('my_tab').in sertRow().insertCell()
-
cell_obj.innerHTML = doument.getElementById('ur_name').value;
-
}
-
In IE, you will need a tbody, so in main.html: - <html>
-
<body>
-
<table id = my_tab>
-
<tbody id="mytb"></tbody>
-
</table>
-
</body>
-
</html>
and in pop.js: - function passMain()
-
{
-
var cell_obj = window.opener.document.getElementById('mytb').insertRow().insertCell();
-
cell_obj.innerHTML = doument.getElementById('ur_name').value;
-
}
Sorry, typo. Try: - function passMain() {
-
var cell_obj = window.opener.document.getElementById('mytb').insertRow().insertCell();
-
cell_obj.innerHTML = document.getElementById('ur_name').value;
-
}
always try to write while u coding js ......... - try
-
{
-
//ur code
-
}catch(err)
-
{
-
alert(err.description);
-
}
then u can trap the error
now plz check out the case_sensitive id_name my_tab and mytb in main.html and pop.js
hi experts,
can i send data from one html page to another just like
main.html?id=sample&data
if yes, how can i retrieve those data by javascript?
hi experts,
i am having 2 html pages.
1.main.html
2.sub.html
in main.html, when i click a button, sub.html should open in a popup. the user will fill datas in sub.html and close the window. the filled data should be displayed as a table(in main.html along with edit and delete button on each row) at each and every time the user open popup and close. atlast i should be able to edit data by clicking edit button and popup should be opened to edit and after i close the popup, the edited data should be updated, and by clicking delete button current row should be deleted. and at final stage i need the datas in a string to save it in a database.
i hope u understood my problem.
You have already posted on this (though perhaps in this thread, you have given more information). Please do not double post. I am merging this with the previous thread.
hi experts,
i am having 2 html pages.
1.main.html
2.sub.html
in main.html, when i click a button, sub.html should open in a popup. the user will fill datas in sub.html and close the window. the filled data should be displayed as a table(in main.html along with edit and delete button on each row) at each and every time the user open popup and close. atlast i should be able to edit data by clicking edit button and popup should be opened to edit and after i close the popup, the edited data should be updated, and by clicking delete button current row should be deleted. and at final stage i need the datas in a string to save it in a database.
i hope u understood my problem.
Why go through the hassle of passing values between pages? Just allow the user to edit values directly in the page by showing a text box with the value when you click on edit. Alternatively, just show a prompt box and use the edited value to dynamically change the current value.
hi all! i need a popup box to enter values. it should be cross browser compatibility. what should i do?
Merged threads. Follow the suggestion that I posted earlier in this thread. If you still have problems, post your code.
Hi,
I have a question regarding this passMain function,
Unfortunately I cant reach my admin, How can I allow my members to download the .wmv file from this code: - <img onmouseout=" swapImage(vid_5738, '/web/vod/images/5738.png')
-
" onmouseover=" swapImage(vid_5738, '/web/vod/images/5738NAV.png')
-
" onclick=" passMain('5738', 'http://38.117.88.50/N/TV_Series/BooyeGolhayeVahshi/BooyeGolhayeVahshi_01.wmv', 'WB100619');window.parent.chName='Booye Golhaye Vahshi - 1';
-
" style="position: absolute; top: 8px;" src="/web/vod/images/5738.png" name=" vid_5738" id="vid_5738" class="logo"/>
Before it used to be the file.wmv?sid=value&vid=value
But it wont work now, please help me with this issue
Would someone please answer my question ?!
Can you post your version of passMain() and also check if you have any errors?
Sign in to post your reply or Sign up for a free account.
Similar topics
by: zdhiu |
last post by:
Hi javascript gurus,
I have a simple html file (simple.html) with
javascript. In html page there is sentence from
variable defined in .js file (myFirst.js). Once I
reload another .js file...
|
by: Oscar |
last post by:
I am looking for a way to pass an ADO recordset that has been retrieved in
an ASP page to another HTML-page. Is there someone who can provide me with a
small sample or a link to see how this is...
|
by: Simon Lee |
last post by:
Dear all,
I write a following form in the html page and link to the webpage without
scrollbar,menubar, with a fixed size as follow:
-------------------------
<form name="formsearch"...
|
by: SteveM |
last post by:
I am sure this is an easy question, but being relatively new to ASP.NET
programming, I can not quite grasp what I need to accomplish what I
need to do.
What I have is a word document that is...
|
by: justplain.kzn |
last post by:
Hi,
I have a table with dynamic html that contains drop down select lists
and readonly text boxes. Dynamic calculations are done on change of a
value in one of the drop down select lists.
...
|
by: HHAAPPYY |
last post by:
Hi
I am trying to pass value of the textbox along with another value to the query string.
when i am retriving the txtbox value it always shows me null,
my senario is like this
On my...
|
by: paulie |
last post by:
Hi,
I have been experiencing an issue when trying to use AJAX to reload a DIV area
using a timer of 2000ms, which contains a html page with another DIV and javascript.
Scenario
-------------...
|
by: Arpit Nagar |
last post by:
Hi...
I am creating a dummy project for collage.
Here I had choosen my project as Jewelleryshoping.
Now the scenerio is like that thier are jewellry item which I had display in table format with...
|
by: cartercc |
last post by:
I think I already know the answer to this one, but I'm giving it the
old college try.
My problem is this: I have an HTML form that sends a bunch of data to
a Perl script, where it is validated...
|
by: zedetach |
last post by:
I have inserted a function to help me pass a value from one html page to a drop down box in another html page. The problem is the code is working only in IE and not in Firefox.
The code in the...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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
|
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...
|
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...
|
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...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
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...
|
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,...
| |