Ask Question Forum:
Model Library:2025-02-08 Updated:A.I. model is online for auto reply question page
C
O
M
P
U
T
E
R
2
8
Show
#
ASK
RECENT
←
- Underline
- Bold
- Italic
- Indent
- Step
- Bullet
- Quote
- Cut
- Copy
- Paste
- Table
- Spelling
- Find & Replace
- Undo
- Redo
- Link
- Attach
- Clear
- Code
Below area will not be traslated by Google,you can input code or other languages
Hint:If find spelling error, You need to correct it,1 by 1 or ignore it (code area won't be checked).
X-position of the mouse cursor
Y-position of the mouse cursor
Y-position of the mouse cursor
Testcursor
caretPos
Attachment:===
Asked by duncanb7
at 2024-07-22 08:02:18
Point:500 Replies:14 POST_ID:828518USER_ID:11059
Topic:
JavaScript;;Hypertext Markup Language (HTML)
I would like to put my csv file table into my website with 2 frames , all javascript and data extraction is well done
but I can not control the function of noresize in frame, I want to frame is no resize so the title and data
of the table is no changed at all even user uses mouse to adjust IE window browser's width or height.
But the result seems noresize is not working and the display is resized and change with IE window's width change
and I try set noresize="noresize" or NORESIZE, or noreisze=true, in frame tage and
I am also using parent.document.getElementById("myFrame").noResize=true in frame1.html and frame2.html to make sure
frame's attribue for noresize is true, but all try is no any response and still resize the display 's data and title row
I go to Firebug to check and I have seen the debug code the attribute of noresize is set in mainframe.html
But why it can not be set noreize in IE7 and Firefox5 browser ?
Please advise for the following code attached, if possible, could you help to test my code at your site and
you will see the data is with resize instead of noresize.
Duncan
but I can not control the function of noresize in frame, I want to frame is no resize so the title and data
of the table is no changed at all even user uses mouse to adjust IE window browser's width or height.
But the result seems noresize is not working and the display is resized and change with IE window's width change
and I try set noresize="noresize" or NORESIZE, or noreisze=true, in frame tage and
I am also using parent.document.getElementById("myFrame").noResize=true in frame1.html and frame2.html to make sure
frame's attribue for noresize is true, but all try is no any response and still resize the display 's data and title row
I go to Firebug to check and I have seen the debug code the attribute of noresize is set in mainframe.html
But why it can not be set noreize in IE7 and Firefox5 browser ?
Please advise for the following code attached, if possible, could you help to test my code at your site and
you will see the data is with resize instead of noresize.
Duncan
<html><title >For frame test only</title><frameset rows="40,*" cols="*" ><frame id="flashFrame" name="flashFrame" marginwidth=0 marginheight=0 frameborder="no" scrolling="no" src="/frame1.html" noresize="noresize"><frame id="myFrame" name="myFrame" frameborder="no" scrolling="yes" src="/frame2.html" noresize="noresize" ></frameset></html> 1:2:3:4:5:6:7:
Attachment:frame1.htmlframe2.html
Expert: Dave Baldwin replied at 2024-07-24 01:45:54
Glad to help, asking questions and reading up is how we all learn.
Author: duncanb7 replied at 2024-07-24 01:40:36
THanks for your reply to
solve the issue completely
And now I understand more,
and found out myself misunderstanding
to frame resize from html contents resize
Duncan
solve the issue completely
And now I understand more,
and found out myself misunderstanding
to frame resize from html contents resize
Duncan
Author: duncanb7 replied at 2024-07-24 01:38:23
So, how you fix column width in DavBaldwin's script
<table border="1" cellpadding="0" cellspacing="0" summary="" width="1200px">
Probably is due to width="1200px" in table tag
Is it correct ?
I try to test it out, delete width="1200px" in table tag, and then we can the table data column width is changed if IE is resize
even you set <td width="220px">
Duncan
<table border="1" cellpadding="0" cellspacing="0" summary="" width="1200px">
Probably is due to width="1200px" in table tag
Is it correct ?
I try to test it out, delete width="1200px" in table tag, and then we can the table data column width is changed if IE is resize
even you set <td width="220px">
Duncan
Assisted Solution
Expert: Dave Baldwin replied at 2024-07-24 00:55:02
112 points EXCELLENT
Apparently not. On this demo page http://www.w3schools.com/cssref/tryit.asp?filename=trycss_table_table-layout , the width of the cells is fixed... but the content is not contained.
Author: duncanb7 replied at 2024-07-24 00:40:03
Yes, if I detele all column width setting in jaascript, the width will be controlled by IE and column width won't be changed even IE is resized but the question I can't adjust my expect each column width.
In DaveBaldwin, I try this setting, it is successful even IE is resized
THe last question where DavaBaldwin set the table width is fixed in layout ? I don't set any attribute is related to "layout-fixe"
Is <table border="1" cellpadding="0" cellspacing="0" summary="" width="1200px"> equivalent to
VirMaior 's script at <table style="table-layout:fixed;"> to do the same table widht fix action?
Please advise
In DaveBaldwin, I try this setting, it is successful even IE is resized
THe last question where DavaBaldwin set the table width is fixed in layout ? I don't set any attribute is related to "layout-fixe"
Is <table border="1" cellpadding="0" cellspacing="0" summary="" width="1200px"> equivalent to
VirMaior 's script at <table style="table-layout:fixed;"> to do the same table widht fix action?
Please advise
Assisted Solution
Expert: virmaior replied at 2024-07-23 11:38:31
50 points EXCELLENT
you need to tell the renderer that you want a fixed width table in the table tag (or css)
<table style="table-layout:fixed;">
otherwise IE won't know that and will maximize the width of the table.
<table style="table-layout:fixed;">
otherwise IE won't know that and will maximize the width of the table.
Assisted Solution
Expert: Dave Baldwin replied at 2024-07-23 09:01:25
113 points EXCELLENT
Fixed width tables work 'just like Excel'. Try it.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><head><title>Fixed Width Table</title></head><body><h1>Fixed Width Table</h1><table border="1" cellpadding="0" cellspacing="0" summary="" width="1200px"><tr><td width="220px">1</td><td width="220px">2</td><td width="220px">3</td><td width="220px">4</td><td width="220px">5</td><td width="220px">6</td></tr><tr><td width="220px">1</td><td width="220px">2</td><td width="220px">3</td><td width="220px">4</td><td width="220px">5</td><td width="220px">6</td></tr></table></body></html> 1:2:3:4:5:6:7:8:9:10:11:12:13:14:15:
Author: duncanb7 replied at 2024-07-23 02:36:18
If we open example.csv data file in Excel 2003 , you can see the width of ecah column won't be changed if you reszied
the Excel window .
the Excel window .
Author: duncanb7 replied at 2024-07-23 02:34:26
Yee, I can change width of every td by setting inside of <td> tag or by <col> tag.
But the question is even we add fixed width to every td cell, the table width will be still adjusted if IE is resized.
it seems IE will ignore the width setting if the broswer is resized, Is it right ?
But the question is even we add fixed width to every td cell, the table width will be still adjusted if IE is resized.
it seems IE will ignore the width setting if the broswer is resized, Is it right ?
Expert: Dave Baldwin replied at 2024-07-23 02:13:32
I wouldn't use points 'pt', I would use pixels 'px'. If you define one row with the <td>s the correct size, that defines them for the rest of the tables. In addition, it should come before the first row.
Author: duncanb7 replied at 2024-07-23 01:44:57
Already did and set it as columnwidth () function Or I need
to go every <td> data to set its width that might slow the speed , Is it right ?
function columnwidth(string)
{
string.push('<col style="width:70pt">');
string.push('<col style="width:50pt">');
string.push('<col style="width:55pt">');
string.push('<col style="width:50pt">');
string.push('<col style="width:50pt">');
string.push('<col style="width:45pt">');
string.push('<col style="width:40pt">');
string.push('<col style="width:50pt">');
string.push('<col style="width:70pt">');
string.push('<col style="width:40pt">');
string.push('<col style="width:40pt">');
string.push('<col style="width:40pt">');
string.push('<col style="width:45pt">');
string.push('<col style="width:40pt">');
string.push('<col style="width:40pt">');
string.push('<col style="width:40pt">');
string.push('<col style="width:60pt">');
string.push('<col style="width:80pt">');
string.push('<col style="width:45pt">');
return string;
}
to go every <td> data to set its width that might slow the speed , Is it right ?
function columnwidth(string)
{
string.push('<col style="width:70pt">');
string.push('<col style="width:50pt">');
string.push('<col style="width:55pt">');
string.push('<col style="width:50pt">');
string.push('<col style="width:50pt">');
string.push('<col style="width:45pt">');
string.push('<col style="width:40pt">');
string.push('<col style="width:50pt">');
string.push('<col style="width:70pt">');
string.push('<col style="width:40pt">');
string.push('<col style="width:40pt">');
string.push('<col style="width:40pt">');
string.push('<col style="width:45pt">');
string.push('<col style="width:40pt">');
string.push('<col style="width:40pt">');
string.push('<col style="width:40pt">');
string.push('<col style="width:60pt">');
string.push('<col style="width:80pt">');
string.push('<col style="width:45pt">');
return string;
}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/2000/REC-xhtml1-20000126/DTD/xhtml1-frameset.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><meta http-equiv=Content-Type content="text/html; charset=big5"><META HTTP-EQUIV="Pragma" CONTENT="no-cache" /><META HTTP-EQUIV="Expires" CONTENT="-1" /><head><script type="text/javascript">function removeTable(){ document.getElementById('writeroot').innerHTML = '';}function inner2(data){ var y=0; var k=123;var dataRows = data.split( "" ); removeTable(); var time1 = new Date().getTime(); var string = new Array(); string.push('<table>');//string.push('');columnwidth(string);string.push('<tbody>');try { for (var i=0;i<1;i++) { var dataCells = dataRows[i].split(","); string.push('<tr>'); for (var j=0;j<dataCells.length-1; j++) { //alert(dataCells[j]); y='<td>'+ dataCells[j] + '</td>'; string.push(y); } } string.push('</tr>'); }catch(err) {}string.push('</tbody></table>'); var writestring = string.join(''); //alert(writestring); document.getElementById('writeroot').innerHTML = writestring; columnstyle2(); //parent.document.getElementById("flashFrame").noResize=true ;}function columnwidth(string) { string.push('<col style="width:70pt">'); string.push('<col style="width:50pt">'); string.push('<col style="width:55pt">'); string.push('<col style="width:50pt">'); string.push('<col style="width:50pt">'); string.push('<col style="width:45pt">'); string.push('<col style="width:40pt">'); string.push('<col style="width:50pt">'); string.push('<col style="width:70pt">'); string.push('<col style="width:40pt">'); string.push('<col style="width:40pt">'); string.push('<col style="width:40pt">'); string.push('<col style="width:45pt">'); string.push('<col style="width:40pt">'); string.push('<col style="width:40pt">'); string.push('<col style="width:40pt">'); string.push('<col style="width:60pt">'); string.push('<col style="width:80pt">'); string.push('<col style="width:45pt">'); return string;}function columnstyle2() {var mytbody=document.getElementsByTagName("tbody")[0];try {for ( i = 0; i < 1; i++ ) {mytbody.rows[i].style.height= "30";mytbody.rows[i].style.fontSize= "10pt";mytbody.rows[i].style.fontWeight= "bold";mytbody.rows[i].style.background= "#00ccff";mytbody.rows[i].style.textAlign="center";mytbody.rows[i].style.borderBottom="3px solid #0000FF";}}catch(err){}}function getData(){var xmlhttp;if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari//alert("IE7"); xmlhttp=new XMLHttpRequest(); }else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP") alert("IE6"); } xmlhttp.onreadystatechange=function() { if ( xmlhttp.readyState == 4 && xmlhttp.status==200) { inner2( xmlhttp.responseText ); // alert("csv file ready"); } } xmlhttp.open( "GET", "example.csv?rnd=" + Math.random(), true ); xmlhttp.send(null); // parent.document.getElementById("flashFrame").noResize=true ;}function test() { getData();}</script></head><body onload="test();" style="background-color:#e0ffff" LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0><div id="writeroot">Loading Page Please Wait</div></body></html> 1:2:3:4:5:6:7:8:9:10:11:12:13:14:15:16:17:18:19:20:21:22:23:24:25:26:27:28:29:30:31:32:33:34:35:36:37:38:39:40:41:42:43:44:45:46:47:48:49:50:51:52:53:54:55:56:57:58:59:60:61:62:63:64:65:66:67:68:69:70:71:72:73:74:75:76:77:78:79:80:81:82:83:84:85:86:87:88:89:90:91:92:93:94:95:96:97:98:99:100:101:102:103:104:105:106:107:108:109:110:111:112:113:114:115:116:117:118:119:120:121:122:123:124:125:126:127:128:129:130:131:132:133:134:135:136:137:138:139:140:141:142:143:144:145:
Assisted Solution
Expert: Dave Baldwin replied at 2024-07-23 01:24:41
112 points EXCELLENT
That's a different subject. 'noresize' has nothing to do with that. You need to create a table with fixed widths for the <td>s to do that.
Author: duncanb7 replied at 2024-07-23 01:21:39
For example
When IE is at 1000 Width , the title or data row will as like this, that is fine and be right to my setting of column widht
Date Prod NO Quantity Percentage CGA CGAB CGABCD LHDHJDFG QA QA-ED...................
But when the users drag the mouse and change IE widht to 500 from 1000
the tiltle or data row 's column widht will be shrinked or change to smaller and smaller
DateProd NOQuantityPercentageCGA CGABCGABCDLHDHJDFGQAQA-ED...................
I want each column widhth is fixed as my setting no matter how you change the IE's window width or height like we see date file in Excel application window
Expect result for IE's 500 width
Date Prod NO Quantity Percentage CGA CGAB....
When IE is at 1000 Width , the title or data row will as like this, that is fine and be right to my setting of column widht
Date Prod NO Quantity Percentage CGA CGAB CGABCD LHDHJDFG QA QA-ED...................
But when the users drag the mouse and change IE widht to 500 from 1000
the tiltle or data row 's column widht will be shrinked or change to smaller and smaller
DateProd NOQuantityPercentageCGA CGABCGABCDLHDHJDFGQAQA-ED...................
I want each column widhth is fixed as my setting no matter how you change the IE's window width or height like we see date file in Excel application window
Expect result for IE's 500 width
Date Prod NO Quantity Percentage CGA CGAB....
Accepted Solution
Expert: Dave Baldwin replied at 2024-07-22 22:38:44
113 points EXCELLENT
I'm not sure what you are expecting. The 'noresize' only fixes the boundary between the frames. In your example, the upper frame stays at 40 pixels high. That's all it should do.