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

Browser Issue

22
hey guess ....im having some problem with my browser. my script runs well in FF but it saisy object null in IE....plz can anybody see this code and tell me where i did make mistake ? here im trying to create dynamic rows by onclick. another function whick is belongs to another table will create more columns depending to the rows. so what im trying to do is im calling the function at the end of the function so that it can dynamically change.

THIS IS THE FUNC that im calling at the end of another function -->

Expand|Select|Wrap|Line Numbers
  1. func test (id)
  2.        var hmrc=0;
  3.     var newrow;
  4.     var tbl;
  5.     var newcol , newinput;
  6.  
  7.     var loopcounter=0;
  8.     tbl = doc.getElementById(id);
  9.     //create a new row
  10.     newrow = doc.createElement("TR");
  11.     newcol = doc.createElement("TD");
  12.     newcol.width = 80;
  13.     newrow.appendChild(newcol);
  14.  
  15.  
  16.         while ( loopcounter<x ){
  17.         newcol = doc.createElement("TD");
  18.         newcol.width = 80;
  19.         //newcol.setAttribute((document.all ? "className" : "class"), "dtext");
  20.         newcol.innerHTML = col1[loopcounter];
  21.         newrow.appendChild(newcol);
  22.         loopcounter++;
  23.  
  24.         }
  25.     tbl.appendChild(newrow);
  26.     __uid1++;    
  27.  
  28.     var loopcounter=0;
  29.     tbl = doc.getElementById(id);
  30.     //create a new row
  31.     newrow = doc.createElement("TR");
  32.     newcol = doc.createElement("TD");
  33.     newcol.width = 80;
  34.     newrow.appendChild(newcol);
  35.  
  36.         while ( loopcounter<x ){
  37.  
  38.         newcol = doc.createElement("TD");
  39.         newcol.width = 80;
  40.         newcol.innerHTML =col2[loopcounter];
  41.         newrow.appendChild(newcol);
  42.         loopcounter++;
  43.  
  44.         }
  45.     tbl.appendChild(newrow);
  46.     __uid1++;    
  47.  
  48.     h=parseInt (doc.getElementById('hrm').value);
  49.     //alert(h);
  50.  
  51.  
  52.         var ii= 0;
  53.         var jj = 0;
  54.         while (hmrc<h){
  55.  
  56.                     loopcounter=0;
  57.  
  58.                     newrow = doc.createElement("TR");
  59.                     newcol = doc.createElement("TD");
  60.                     newcol.width = 80;
  61.                     newcol.innerHTML="Test "+hmrc;
  62.                     newrow.appendChild(newcol);
  63.  
  64.                         jj = 0;
  65.                         while ( loopcounter<x ){                    
  66.                                 newcol = doc.createElement("TD");
  67.                                 newcol.width = 80;
  68.                                 newinput = doc.createElement("input");
  69.                                 newinput.name = "data[test]["+loopcounter+"]["+hmrc+"]";
  70.                                 newinput.size = 15;
  71.                                 newinput.value = "0";
  72.                                 newinput.id = "input"+ii+jj;
  73.                                 newcol.appendChild(newinput);
  74.                                 newrow.appendChild(newcol);
  75.                                 loopcounter++;
  76.  
  77.                                 jj ++;
  78.                     }    
  79.  
  80.             tbl.appendChild(newrow);
  81.             hmrc++;
  82.             ii++;    
  83.  
  84.         }
  85.  
  86.     }


at the end of another function im calling above function like this --->

Expand|Select|Wrap|Line Numbers
  1. if(doc.getElementById('showchart').value=="Refresh"){
  2.         test('testbody');
  3.         }
this is the HTML table where table will be changed dynamically ....

[HTML] <div id="hidesave" style=" width:620px; height:178px;overflow-x:auto; overflow-y:auto;" class="listformtable">
<table border="0" title="Show Chart">
<!--DWLayoutTable-->
<tbody id="testbody">

</tbody>
</table>
</div>[/HTML]

Please post code in tags - moderator

guys it works fine in FF ....but IE !...plz help me !!
thanks in advance ...:)
Mar 30 '07 #1
2 988
junal
22
hey guess ....im having some problem with my browser. my script runs well in FF but it saisy object null in IE....plz can anybody see this code and tell me where i did make mistake ? here im trying to create dynamic rows by onclick. another function whick is belongs to another table will create more columns depending to the rows. so what im trying to do is im calling the function at the end of the function so that it can dynamically change.

THIS IS THE FUNC that im calling at the end of another function -->

func test (id)
var hmrc=0;
var newrow;
var tbl;
var newcol , newinput;

var loopcounter=0;
tbl = doc.getElementById(id);
//create a new row
newrow = doc.createElement("TR");
newcol = doc.createElement("TD");
newcol.width = 80;
newrow.appendChild(newcol);


while ( loopcounter<x ){
newcol = doc.createElement("TD");
newcol.width = 80;
//newcol.setAttribute((document.all ? "className" : "class"), "dtext");
newcol.innerHTML = col1[loopcounter];
newrow.appendChild(newcol);
loopcounter++;

}
tbl.appendChild(newrow);
__uid1++;

var loopcounter=0;
tbl = doc.getElementById(id);
//create a new row
newrow = doc.createElement("TR");
newcol = doc.createElement("TD");
newcol.width = 80;
newrow.appendChild(newcol);

while ( loopcounter<x ){

newcol = doc.createElement("TD");
newcol.width = 80;
newcol.innerHTML =col2[loopcounter];
newrow.appendChild(newcol);
loopcounter++;

}
tbl.appendChild(newrow);
__uid1++;

h=parseInt (doc.getElementById('hrm').value);
//alert(h);


var ii= 0;
var jj = 0;
while (hmrc<h){

loopcounter=0;

newrow = doc.createElement("TR");
newcol = doc.createElement("TD");
newcol.width = 80;
newcol.innerHTML="Test "+hmrc;
newrow.appendChild(newcol);

jj = 0;
while ( loopcounter<x ){
newcol = doc.createElement("TD");
newcol.width = 80;
newinput = doc.createElement("input");
newinput.name = "data[test]["+loopcounter+"]["+hmrc+"]";
newinput.size = 15;
newinput.value = "0";
newinput.id = "input"+ii+jj;
newcol.appendChild(newinput);
newrow.appendChild(newcol);
loopcounter++;

jj ++;
}

tbl.appendChild(newrow);
hmrc++;
ii++;

}

}



at the end of another function im calling above function like this --->

if(doc.getElementById('showchart').value=="Refresh "){
test('testbody');
}

this is the HTML table where table will be changed dynamically ....

<div id="hidesave" style=" width:620px; height:178px;overflow-x:auto; overflow-y:auto;" class="listformtable">
<table border="0" title="Show Chart">
<!--DWLayoutTable-->
<tbody id="testbody">

</tbody>
</table>
</div>

guys it works fine in FF ....but IE !...plz help me !!
thanks in advance ...:)

come on guys !!......
Mar 31 '07 #2
Logician
210 100+
hey guess ....im having some problem with my browser. my script runs well in FF but it saisy object null in IE....

THIS IS THE FUNC that im calling at the end of another function -->
You need to post either a URL or a runnable demo.
Mar 31 '07 #3

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

Similar topics

21
by: Tony Marston | last post by:
If the use of the browser's BACK button is interfering with the operation of your web application then take a look at this article entitle "Back Button Blues" ...
115
by: J | last post by:
I've run CSSCheck on my style sheets and I always get a warning similar to this: "font: bold 9pt/100% sans-serif Warning: Absolute length units should not generally be used on the Web ..." ...
11
by: David Lozzi | last post by:
Hello All, I am having an issue with thus far one computer on my client's web site. If the user loads the shopping cart and then closes all browser windows, then opens them back up, goes back to...
1
by: Nathan DeBardeleben | last post by:
This may seem wierd, and I know someone asked this question before but was told they were doing it the hard way. Unlike them, I do not have shell access to the machine where this javascript runs....
3
by: Rob | last post by:
I have an ASP.Net web app that generates a Crystal Report in PDF format. Since there is sensitive data within the reports, the pdfs need to be streamed to the browser then deleted immediately. The...
3
by: Ben | last post by:
Hi, I'm sending out a session cookie. That is a cookie that has no expiration date. When I surf through the site, no problems, but if I close the browser and open it back up, the cookie is still...
15
by: David Thielen | last post by:
Hi; My ASP.NET app (C# calling J# under .net 2.0) creates a png file in a subdirectory to display as part of the created page. However, the bitmap will not display due to a security violation. ...
14
by: askMe | last post by:
I developed a web page that plays an mpg using the simple embed tag. When the page loads, the video starts, but then stops after a few seconds. I use the embed tag because I want the user's...
5
by: ns21 | last post by:
How can the browser back button be disabled If the form is submitting information to other pages or submitting to itself or using redirections. I tried the tweaks like history.forward(1) in each...
4
by: =?Utf-8?B?TmFkYXYgUG9wcGxld2VsbA==?= | last post by:
Hi everybody, I've got an ASP.NET 1.1 application and I need to add to it new Browser Capabilities information for 3 new cellular phones. I used to use...
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
Oralloy
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,...
0
jinu1996
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...
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.