/    Sign up×
Community /Pin to ProfileBookmark

How to make Cross browser compatible html page?

Hi,

I am using javascript code to insert and delete row in table of html page that is working in IE6. But when i use the same code for Firefox and opera browser it does not work.

It is actually a web page which i want to be cross browser compatible.

How to make this cross browser compatible?

The code is for deleting rows is as follows:

function Drow()
{
var s1;
s1=document.getElementById(‘a1’);

if (s1)
{
document.getElementById(‘tbl’).deleteRow(1);
}
}

‘a1’ is a cell of table and ‘tbl’ is a id of table.

Now i want to delete row of ‘tbl’

I am inserting row using following code:

x=document.getElementById(‘tbl’).insertRow(len);

This code is not working in opera and Firefox browser.

Please help me with this. ?

Thanks in advance

charlie

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@FangJun 23.2007 — [I]insertRow[/I] will work in those browsers, so something else is wrong.

Can we see more code/website?
×

Success!

Help @charlie_1975 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...