473,378 Members | 1,383 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,378 software developers and data experts.

'Innertext' to write in a table cell generated through HTML doesn't work in firefox

hi,

I have a code where a value in one of a table cell needs to be populated on a command button click event.
Scenario:
There is a main window having multiple <DIV>s In one of the Div there is a table havind ID on a concerned cell (initially blank). The div also has a command button.
Now once the button is cliked, a popup window should open and the concerned cell (present in the main window) should be populated with a value.

code to write the text in the parent window cell:
Expand|Select|Wrap|Line Numbers
  1. document.getElementById('QuestCostofCapital').innerText = <%=TempCostofCapital%>
the variable TempCostofCapital has a proper value. I have verified thru alert().
This code works fine in IE but not in FireFox. i.e it populates the cell in IE bt leave the same in FireFox without any error.

Kindly provide me the solution.

prawasini
Oct 6 '07 #1
5 4419
hi,

I have a code where a value in one of a table cell needs to be populated on a command button click event.
Scenario:
There is a main window having multiple <DIV>s In one of the Div there is a table havind ID on a concerned cell (initially blank). The div also has a command button.
Now once the button is cliked, a popup window should open and the concerned cell (present in the main window) should be populated with a value.

code to write the text in the parent window cell:

document.getElementById('QuestCostofCapital').inne rText = <%=TempCostofCapital%>
the variable TempCostofCapital has a proper value. I have verified thru alert().
This code works fine in IE but not in FireFox. i.e it populates the cell in IE bt leave the same in FireFox without any error.

Kindly provide me the solution.

prawasini
try innerHTML instead of innerText
Expand|Select|Wrap|Line Numbers
  1. document.getElementById('QuestCostofCapital').innerHTML = <%=TempCostofCapital%>
Oct 6 '07 #2
have you tried using innerHTML instead of innerText?
because if it's working in IE but not in FF, you must have something wrong with your code
Oct 6 '07 #3
have you tried using innerHTML instead of innerText?
because if it's working in IE but not in FF, you must have something wrong with your code
Try using innerText with mozilla It won't work but replace with innerHTML it would work
Oct 6 '07 #4
pbmods
5,821 Expert 4TB
prawasini, Eyeinstyin:
Please use CODE tags when posting source code:

[CODE=javascript]
JavaScript code goes here.
[/CODE]
Oct 6 '07 #5
hi,

I have a code where a value in one of a table cell needs to be populated on a command button click event.
Scenario:
There is a main window having multiple <DIV>s In one of the Div there is a table havind ID on a concerned cell (initially blank). The div also has a command button.
Now once the button is cliked, a popup window should open and the concerned cell (present in the main window) should be populated with a value.

code to write the text in the parent window cell:
Expand|Select|Wrap|Line Numbers
  1. document.getElementById('QuestCostofCapital').innerText = <%=TempCostofCapital%>
the variable TempCostofCapital has a proper value. I have verified thru alert().
This code works fine in IE but not in FireFox. i.e it populates the cell in IE bt leave the same in FireFox without any error.

Kindly provide me the solution.

prawasini


use textContent for innerText in FireFox
Oct 8 '07 #6

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

Similar topics

5
by: Gary Mayor | last post by:
Hi, If I have the ' character within the javascript:pick command it doesn't work. Is there some sort of way of escaping these characters like in server side languages. function pick(symbol) {...
4
by: cody | last post by:
I have the following feed which I want to convert to html: http://www.heise.de/newsticker/heise.rdf but it does not work, I only see the html elements empty as if it found no elements in the xml...
2
by: hon123456 | last post by:
Dear all, I got four jpg file, I want to made them fade in / fade out continuously and repeatly in the same table cell of html (e.g. in the same <td></td>) How can I do that in javascript. Please...
2
by: Patrick Sullivan | last post by:
Hi people, I've been trying to get the text of a menu list to align at the bottom of a table cell. Can't get to work with html or css and html. Menu should be lined up with bottom right of logo....
6
by: crcucb | last post by:
Can anyone tell me why this page: <head> <Title>testpage</title> </head><body> <span title="test">Test</span> </body> </HTML> Doesn't work in IE 6 but works in FF?
7
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...
12
by: vietgurlqt | last post by:
I don't what is wrong my site but some of my members cant view it on firefox. I been browsing the net for answer but i havent find the solution. Some said add <!DOCTYPE HTML PUBLIC "-//W3C//DTD...
13
by: ray | last post by:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <HTML> <HEAD> <META http-equiv="Content-Type" content="text/html; charset=UTF-8"/ <TITLE>HTML to Text...
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...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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: 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...

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.