Win a copy of Securing DevOps this week in the Security forum!

Ram Thirumangalam

Greenhorn
+ Follow
since Aug 28, 2003
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Ram Thirumangalam

Hi
I want to write to a frame in the parent window from a child window which calls a javascript function and uses the document.write but get an 'access is denied' error. This error occurs randomly. sometimes, it works fine and some times I get this error. Before writing to that frame, I do a href.location = "about:blank" and a location.replace() method on that frame (I do this becos that frame loads PDF documents generated dynamically by the server and with Adobe 7, this script doesnt work...so had to do this workaround).

I am not sure if this is a cross-domain error. The child window contents are generated by the server using a servlet and so is it possible that when I try to access the "about.blank" page that I just replaced in the target frame might not be generated by the server?

Any suggestions are greatly appreciated. I am clueless as to what would be causing this.

Please help!

Thanks,

Here is the javascript code:

Also, using the title to achieve this isn't the best way as the title of a link disappers after a few seconds. So, I would assume some other means of highliting should be the best way to implement this. Let me know if I can attach a document to show this feature in Adobe PDF files.
Hi
I am trying to implement a feature in my web page similar to the one found in the bookmarks frame when viewing Adobe documents with Acrobat.

This is the feature I am trying to emulate : If you open a PDF document that has bookmarks in Adobe, and try to move your mouse over the book mark links in the bookmark frame, the columns are highlighted and you can view the entire title of that column without having to scroll.

I need to implement a similar feature in my web page. I have two frames, the left frame contains the index to the document - kind of table of contents and when the user clicks on the links in the left frame, he is taken to that particular page. The links some times span more than 100 characters in length.
Ofcourse, the frames are scrollable and resizble, but to enhance the user experience, i pop up the entire string in that link as the title on mouse over the link in the left frame. However, the title just appears below the link.

My question is this: Is it possible for me to make the title that pops up on mouse over, to overlap with the link (meaning the position of the title that pops up on mouse over should be the same as the link) and show the entire link (with it spanning across the frames)?

Any suggestions in this regard is greatly appreciated.
Also,I am wondering if there is a way to do it with mouse position? I m ean comparing the mouse position's co-ordinates with that the frames co-ordinates?
Thanks
Hi,
Here is my issue. I have 3 frames in a page. A top one and beneath it two frames adjacent to each other vertically.
When ever I position my cursor in the bottom left frame, it has to be resized. I did code a mouseover event in the <Body> tag of the htm page in the left frame and resized it. Also, using the mouseout, resized it back to the original length whenever I go out of the frame. All works fine until I click a link in any one of the frames. After that, when ever I do a mouseover within the bottom left frame that needs to be resized, i can see the constant resizing (expanding and reducing the size) of that frame. looks like the mouseout code is also executed.
Does anyone know of other ways to achieve this?
Basically the bottm left frame is the table of contents which is initially presented with a smaller frame area. however to faciliate the user to see the links clearly, I planned to resize it whenevr the user moves his cursor to that frame.
Any help in this regard would be greatly appreciated.
Thanks
Hi
I have a scenario as follows.
My webpage has 2 frames and I am submitting a form in the first frame (which has the target as the second frame) to a servlet and currently the response is writtten to the second frame. I have a new requirement now. Upon submitting the form, I have to interface with another app and based on the response I have to do either one of this:
Case A: Write the results to the second frame
Case B: Pop-up a new window providing the user with some options and requesting him to select one and then submit the form in it to write the results in the second frame.

The first Case is simple and is existing currently.

If the response from the other app is the second case, then Can I change the target of the servelet dynamically to write to a new window instead of the second frame?
How do I do this?
Any suggestions would be greatly appreciated.

Thanks
13 years ago
Hi
I wish to know how to specify the TARGET of a form in a pop-up window as a particular frame in the main window that opened this pop-up.
From what I could see from the posts is to specify a name for the main window and then having the target of the form in the pop-up as the name of the main window.
My issue is a little complicated: Here we go!
The functionality of my application allows the user to have many windows open by having a unique name for each (each of them pertaining to a particular invoice and containg details of it) and then the user can activate the pop-up (which is actually a form for entering search criteria) from any of the window.
So I need the unique name of the main window that opened the pop-up to be passed to the pop-up as a variable and can I specify that 'variable' as the target? Would it be possible to specify the target as a particular frame in the concerend main window?
Any help / suggestions would be greatly appreciated!!
Would using a submit button and function for onclick of that button with code in the function specifying the new url(servlet) for that frame in the main window with parameters (built form the forms content) passed to that servlet be a workaround?

Main Window code;
==============
<SCRIPT LANGUAGE="JavaScript">
window.name = "main";
</SCRIPT>
Then from my pop-up window, to post the data back to 'main' the FORM element looks like this:
<FORM action="main.php" METHOD="POST" target="main">
Since I can have multiple main window open, can I pass the name of the main window as a variable to the pop-up and then give that variable in the TARGET field of the form in the pop-up?

Once again, I would really appreciate any possible suggestions for this.
Thanks
Hi
I am having some issues while trying to get the parent of an <a> element in javascript. The <td> element of my table contains an 'IMG' tag followed by 'A'(href) tag. On clicking the A element tag text, i execute a javascript passing 'this' as its parameter and in the script, I try to access the parent of the A element tag by using this.parentNode. It should return me the TD elemet tag. However ,it returns an undefined object eventhough upon displaying the childnodes of the TD element tag, the 'A' element is listed as one of its children.
Does anyone have an idea why it doesnt return the parent?
Please help.
Here is the sample code.
<html>
<head>
...inline style sheet
<script>
function changeclass(current)
{
current.parentNode.className=yyy;
}
</script>
</head>
<body>
<table>
<tr>
<td class=xxx>
<img src='test.gif'>
<a href="javascript:changeclass(this)test.html'>click here</a>
</td>
</tr>
</table>
</body>
Thanks
Hi
I am trying to resize the width of a table dynamically onload. However, it doesnt seem to work. Eric, this is regarding the table scroll. I have looked at the code posted in one of these forums but still, the columns donot align properly.
I tried to do this dynamically on page load using the script in this code but somehow it doest resize the header table.
Here is the code. I really appreciate if somecan can assist me finding out what is wrong with the code.
Thanks
<HTML>
<head>
<STYLE>
.PlaceHolder
{
BORDER-RIGHT: lightgrey outset;
BORDER-TOP: lightgrey outset;
FONT-WEIGHT: bolder;
FONT-SIZE: 11;
BORDER-LEFT: lightgrey outset;
COLOR: black;
BORDER-BOTTOM: lightgrey outset;
FONT-FAMILY: Tahoma, Arial, Helvetica;
BACKGROUND-COLOR: lightgrey
}
.RowElementWhite
{
FONT-WEIGHT: lighter;
FONT-SIZE: 10;
COLOR: black;
FONT-FAMILY: Tahoma, Arial, Helvetica;
BACKGROUND-COLOR: white
}
.RowElementGray
{
FONT-WEIGHT: lighter;
FONT-SIZE: 10;
COLOR: black;
FONT-FAMILY: Tahoma, Arial, Helvetica;
BACKGROUND-COLOR: lightgrey
}
.RowHighlight
{
FONT-WEIGHT: lighter;
FONT-SIZE: 10;
COLOR: white;
FONT-FAMILY: Tahoma, Arial, Helvetica;
BACKGROUND-COLOR: black
}
.tblscroll
{
overflow: auto;
height:90%;
width:"710";
}
</STYLE>
<script type="text/javascript">
function resizeScrollTable()
{
var scrollBarWidth = document.getElementbyId("divis").offsetWidth - document.getElementbyId("divis").clientWidth;
document.getElementbyId("test").width = document.getElementbyId
("divis").clientWidth;
//document.getElementbyId("test").Width = "694"; --this doesnt work either
}
window.attachEvent("onload", function () {resizeScrollTable();} );
</script>
</head>
<body bgcolor=white topmargin=0 leftmargin=0 rightmargin=0 bottommargin=0>
<table id='test' cellpadding=0 cellspacing=2 border=0 bordercolor=black width="710">
<TR valign=middle>
<td id=Header0 class=PlaceHolder width="120" align=middle bgcolor=lightgrey>date</td>
<td id=Header1 class=PlaceHolder width="130" align=middle
bgcolor=lightgrey>Inv Number</td>
<td id=Header2 class=PlaceHolder width="110" align=middle
bgcolor=lightgrey>Payer ID</td>
<td id=Header3 class=PlaceHolder width="130" align=middle bgcolor=lightgrey>Pages</td>
<td id=Header4 class=PlaceHolder width="120" align=middle bgcolor=lightgrey
>Language</td>
<td id=Header5 class=PlaceHolder width="100" align=middle bgcolor=lightgrey >Zip</td>
</TR>
</table>
<div id='div1' class=tblscroll>
<TABLE CELLSPACING=0
Cellpadding=4
border=1 bordercolor=lightgrey >
<TR id='Row0' class=RowElementWhite>
<TD id='colid01' width="120"> 11-10-2003 </TD>
<TD id='colid02' width="130" align=right> 62067767 </TD>
<TD id='colid03' width="110" align=right>&nbsp;</TD>
<TD id='colid04' width="130" align=right> 2 </TD>
<TD id='colid05' width="120"> English </TD>
<TD id='colid06' width="100"> &nbsp;</TD>
<TD id='colid07' width="0" style='display:none;'>0</TD></TR>
<TR id='Row1' class=RowElementGray>
<TD id='colid1001' width="120"> 11-10-2003 </TD>
<TD id='colid1002' width="130" align=right> 62067746 </TD>
<TD id='colid1003' width="110" align=right> Y0026623 </TD>
<TD id='colid1004' width="130" align=right> 68 </TD>
<TD id='colid1005' width="120"> English </TD>
<TD id='colid1006' width="100"> &nbsp;</TD>
<TD id='colid1007' width="0" style='display:none;'>1</TD></TR>
<TR id='Row2' class=RowElementWhite>
<TD id='colid2001' width="120"> 11-10-2003 </TD>
<TD id='colid2002' width="130" align=right> 000162067746 </TD>
<TD id='colid2003' width="110" align=right> Y0026623 </TD>
<TD id='colid2004' width="130" align=right> 2 </TD>
<TD id='colid2005' width="120"> English </TD>
<TD id='colid2006' width="100"> &nbsp;</TD>
<TD id='colid2007' width="0" style='display:none;'>2</TD></TR>
<TR id='Row3' class=RowElementGray>
<TD id='colid3001' width="120"> 11-10-2003 </TD>
<TD id='colid3002' width="130" align=right> 000262067746 </TD>
<TD id='colid3003' width="110" align=right> Y0026623 </TD>
<TD id='colid3004' width="130" align=right> 63 </TD>
<TD id='colid3005' width="120"> English </TD>
<TD id='colid3006' width="100"> &nbsp;</TD>
<TD id='colid3007' width="0" style='display:none;'>3</TD></TR>
<TR id='Row4' class=RowElementWhite>
<TD id='colid4001' width="120"> 11-10-2003 </TD>
<TD id='colid4002' width="130" align=right> 000362067746 </TD>
<TD id='colid4003' width="110" align=right> Y0026623 </TD>
<TD id='colid4004' width="130" align=right> 3 </TD>
<TD id='colid4005' width="120"> English </TD>
<TD id='colid4006' width="100"> &nbsp;</TD>
<TD id='colid4007' width="0" style='display:none;'>4</TD></TR>
<TR id='Row5' class=RowElementGray>
<TD id='colid5001' width="120"> 11-10-2003 </TD>
<TD id='colid5002' width="130" align=right> 000462067746 </TD>
<TD id='colid5003' width="110" align=right> Y0026623 </TD>
<TD id='colid5004' width="130" align=right> 2 </TD>
<TD id='colid5005' width="120"> English </TD>
<TD id='colid5006' width="100"> &nbsp;</TD>
<TD id='colid5007' width="0" style='display:none;'>5</TD></TR>

<TR id='Row6' class=RowElementWhite>
<TD id='colid6001' width="120"> 11-10-2003 </TD>
<TD id='colid6002' width="130" align=right> 62067752 </TD>
<TD id='colid6003' width="110" align=right> Y1710717 </TD>
<TD id='colid6004' width="130" align=right> 9 </TD>
<TD id='colid6005' width="120"> English </TD>
<TD id='colid6006' width="100"> &nbsp;</TD>
<TD id='colid6007' width="0" style='display:none;'>6</TD></TR>
<TR id='Row7' class=RowElementGray>
<TD id='colid7001' width="120"> 11-10-2003 </TD>
<TD id='colid7002' width="130" align=right> 000162067752 </TD>
<TD id='colid7003' width="110" align=right> Y1710717 </TD>
<TD id='colid7004' width="130" align=right> 3 </TD>
<TD id='colid7005' width="120"> English </TD>
<TD id='colid7006' width="100"> &nbsp;</TD>
<TD id='colid7007' width="0" style='display:none;'>7</TD></TR>
<TR id='Row8' class=RowElementWhite>
<TD id='colid8001' width="120"> 11-10-2003 </TD>
<TD id='colid8002' width="130" align=right> 62067753 </TD>
<TD id='colid8003' width="110" align=right> Y1710718 </TD>
<TD id='colid8004' width="130" align=right> 46 </TD>
<TD id='colid8005' width="120"> English </TD>
<TD id='colid8006' width="100"> &nbsp;</TD>
<TD id='colid8007' width="0" style='display:none;'>8</TD></TR>
<TR id='Row9' class=RowElementGray>
<TD id='colid9001' width="120"> 11-10-2003 </TD>
<TD id='colid9002' width="130" align=right> 000162067753 </TD>
<TD id='colid9003' width="110" align=right> Y1710718 </TD>
<TD id='colid9004' width="130" align=right> 29 </TD>
<TD id='colid9005' width="120"> English </TD>
<TD id='colid9006' width="100"> &nbsp;</TD>
<TD id='colid9007' width="0" style='display:none;'>9</TD></TR>
<TR id='Row9' class=RowElementWhite>
<TD id='colid9001' width="120"> 11-10-2003 </TD>
<TD id='colid9002' width="130" align=right> 000162067753 </TD>
<TD id='colid9003' width="110" align=right> Y1710718 </TD>
<TD id='colid9004' width="130" align=right> 29 </TD>
<TD id='colid9005' width="120"> English </TD>
<TD id='colid9006' width="100"> &nbsp;</TD>
<TD id='colid9007' width="0" style='display:none;'>9</TD></TR>
<TR id='Row9' class=RowElementGray onmouseover="this.style.cursor='hand'">
<TD id='colid9001' width="120"> 11-10-2003 </TD>
<TD id='colid9002' width="130" align=right> 000162067753 </TD>
<TD id='colid9003' width="110" align=right> Y1710718 </TD>
<TD id='colid9004' width="130" align=right> 29 </TD>
<TD id='colid9005' width="120"> English </TD>
<TD id='colid9006' width="100"> &nbsp;</TD>
<TD id='colid9007' width="0" style='display:none;'>9</TD></TR>
<TR id='Row9' class=RowElementGray>
<TD id='colid9001' width="120"> 11-10-2003 </TD>
<TD id='colid9002' width="130" align=right> 000162067753 </TD>
<TD id='colid9003' width="110" align=right> Y1710718 </TD>
<TD id='colid9004' width="130" align=right> 29 </TD>
<TD id='colid9005' width="120"> English </TD>
<TD id='colid9006' width="100"> &nbsp;</TD>
<TD id='colid9007' width="0" style='display:none;'>9</TD></TR>
<TR id='Row9' class=RowElementWhite>
<TD id='colid9001' width="120"> 11-10-2003 </TD>
<TD id='colid9002' width="130" align=right> 000162067753 </TD>
<TD id='colid9003' width="110" align=right> Y1710718 </TD>
<TD id='colid9004' width="130" align=right> 29 </TD>
<TD id='colid9005' width="120"> English </TD>
<TD id='colid9006' width="100"> &nbsp;</TD>
<TD id='colid9007' width="0" style='display:none;'>9</TD></TR>
<TR id='Row9' class=RowElementGray>
<TD id='colid9001' width="120"> 11-10-2003 </TD>
<TD id='colid9002' width="130" align=right> 000162067753 </TD>
<TD id='colid9003' width="110" align=right> Y1710718 </TD>
<TD id='colid9004' width="130" align=right> 29 </TD>
<TD id='colid9005' width="120"> English </TD>
<TD id='colid9006' width="100"> &nbsp;</TD>
<TD id='colid9007' width="0" style='display:none;'>9</TD></TR>
<TR id='Row9' class=RowElementWhite>
<TD id='colid9001' width="120"> 11-10-2003 </TD>
<TD id='colid9002' width="130" align=right> 000162067753 </TD>
<TD id='colid9003' width="110" align=right> Y1710718 </TD>
<TD id='colid9004' width="130" align=right> 29 </TD>
<TD id='colid9005' width="120"> English </TD>
<TD id='colid9006' width="100"> &nbsp;</TD>
<TD id='colid9007' width="0" style='display:none;'>9</TD></TR>
<TR id='Row9' class=RowElementGray>
<TD id='colid9001' width="120"> 11-10-2003 </TD>
<TD id='colid9002' width="130" align=right> 000162067753 </TD>
<TD id='colid9003' width="110" align=right> Y1710718 </TD>
<TD id='colid9004' width="130" align=right> 29 </TD>
<TD id='colid9005' width="120"> English </TD>
<TD id='colid9006' width="100"> &nbsp;</TD>
<TD id='colid9007' width="0" style='display:none;'>9</TD></TR>
<TR id='Row9' class=RowElementWhite>
<TD id='colid9001' width="120"> 11-10-2003 </TD>
<TD id='colid9002' width="130" align=right> 000162067753 </TD>
<TD id='colid9003' width="110" align=right> Y1710718 </TD>
<TD id='colid9004' width="130" align=right> 29 </TD>
<TD id='colid9005' width="120"> English </TD>
<TD id='colid9006' width="100"> &nbsp;</TD>
<TD id='colid9007' width="0" style='display:none;'>9</TD></TR>
<TR id='Row9' class=RowElementGray>
<TD id='colid9001' width="120"> 11-10-2003 </TD>
<TD id='colid9002' width="130" align=right> 000162067753 </TD>
<TD id='colid9003' width="110" align=right> Y1710718 </TD>
<TD id='colid9004' width="130" align=right> 29 </TD>
<TD id='colid9005' width="120"> English </TD>
<TD id='colid9006' width="100"> &nbsp;</TD>
<TD id='colid9007' width="0" style='display:none;'>9</TD></TR>
<TR id='Row9' class=RowElementWhite>
<TD id='colid9001' width="120"> 11-10-2003 </TD>
<TD id='colid9002' width="130" align=right> 000162067753 </TD>
<TD id='colid9003' width="110" align=right> Y1710718 </TD>
<TD id='colid9004' width="130" align=right> 29 </TD>
<TD id='colid9005' width="120"> English </TD>
<TD id='colid9006' width="100"> &nbsp;</TD>
<TD id='colid9007' width="0" style='display:none;'>9</TD></TR>
<TR id='Row9' class=RowElementGray>
<TD id='colid9001' width="120"> 11-10-2003 </TD>
<TD id='colid9002' width="130" align=right> 000162067753 </TD>
<TD id='colid9003' width="110" align=right> Y1710718 </TD>
<TD id='colid9004' width="130" align=right> 29 </TD>
<TD id='colid9005' width="120"> English </TD>
<TD id='colid9006' width="100"> &nbsp;</TD>
<TD id='colid9007' width="0" style='display:none;'>9</TD></TR>
<TR id='Row9' class=RowElementWhite>
<TD id='colid9001' width="120"> 11-10-2003 </TD>
<TD id='colid9002' width="130" align=right> 000162067753 </TD>
<TD id='colid9003' width="110" align=right> Y1710718 </TD>
<TD id='colid9004' width="130" align=right> 29 </TD>
<TD id='colid9005' width="120"> English </TD>
<TD id='colid9006' width="100"> &nbsp;</TD>
<TD id='colid9007' width="0" style='display:none;'>9</TD></TR>
<TR id='Row9' class=RowElementGray>
<TD id='colid9001' width="120"> 11-10-2003 </TD>
<TD id='colid9002' width="130" align=right> 000162067753 </TD>
<TD id='colid9003' width="110" align=right> Y1710718 </TD>
<TD id='colid9004' width="130" align=right> 29 </TD>
<TD id='colid9005' width="120"> English </TD>
<TD id='colid9006' width="100"> &nbsp;</TD>
<TD id='colid9007' width="0" style='display:none;'>9</TD></TR>
<TR id='Row9' class=RowElementWhite>
<TD id='colid9001' width="120"> 11-10-2003 </TD>
<TD id='colid9002' width="130" align=right> 000162067753 </TD>
<TD id='colid9003' width="110" align=right> Y1710718 </TD>
<TD id='colid9004' width="130" align=right> 29 </TD>
<TD id='colid9005' width="120"> English </TD>
<TD id='colid9006' width="100"> &nbsp;</TD>
<TD id='colid9007' width="0" style='display:none;'>9</TD></TR>
<TR id='Row9' class=RowElementGray>
<TD id='colid9001' width="120"> 11-10-2003 </TD>
<TD id='colid9002' width="130" align=right> 000162067753 </TD>
<TD id='colid9003' width="110" align=right> Y1710718 </TD>
<TD id='colid9004' width="130" align=right> 29 </TD>
<TD id='colid9005' width="120"> English </TD>
<TD id='colid9006' width="100"> &nbsp;</TD>
<TD id='colid9007' width="0" style='display:none;'>9</TD></TR>
<TR id='Row9' class=RowElementWhite>
<TD id='colid9001' width="120"> 11-10-2003 </TD>
<TD id='colid9002' width="130" align=right> 000162067753 </TD>
<TD id='colid9003' width="110" align=right> Y1710718 </TD>
<TD id='colid9004' width="130" align=right> 29 </TD>
<TD id='colid9005' width="120"> English </TD>
<TD id='colid9006' width="100"> &nbsp;</TD>
<TD id='colid9007' width="0" style='display:none;'>9</TD></TR>
<TR id='Row9' class=RowElementGray>
<TD id='colid9001' width="120"> 11-10-2003 </TD>
<TD id='colid9002' width="130" align=right> 000162067753 </TD>
<TD id='colid9003' width="110" align=right> Y1710718 </TD>
<TD id='colid9004' width="130" align=right> 29 </TD>
<TD id='colid9005' width="120"> English </TD>
<TD id='colid9006' width="100"> &nbsp;</TD>
<TD id='colid9007' width="0" style='display:none;'>9</TD></TR>
<TR id='Row9' class=RowElementWhite>
<TD id='colid9001' width="120"> 11-10-2003 </TD>
<TD id='colid9002' width="130" align=right> 000162067753 </TD>
<TD id='colid9003' width="110" align=right> Y1710718 </TD>
<TD id='colid9004' width="130" align=right> 29 </TD>
<TD id='colid9005' width="120"> English </TD>
<TD id='colid9006' width="100"> &nbsp;</TD>
<TD id='colid9007' width="0" style='display:none;'>9</TD></TR>
<TR id='Row9' class=RowElementGray>
<TD id='colid9001' width="120"> 11-10-2003 </TD>
<TD id='colid9002' width="130" align=right> 000162067753 </TD>
<TD id='colid9003' width="110" align=right> Y1710718 </TD>
<TD id='colid9004' width="130" align=right> 29 </TD>
<TD id='colid9005' width="120"> English </TD>
<TD id='colid9006' width="100"> &nbsp;</TD>
<TD id='colid9007' width="0" style='display:none;'>9</TD></TR>
<TR id='Row9' class=RowElementWhite>
<TD id='colid9001' width="120"> 11-10-2003 </TD>
<TD id='colid9002' width="130" align=right> 000162067753 </TD>
<TD id='colid9003' width="110" align=right> Y1710718 </TD>
<TD id='colid9004' width="130" align=right> 29 </TD>
<TD id='colid9005' width="120"> English </TD>
<TD id='colid9006' width="100"> &nbsp;</TD>
<TD id='colid9007' width="0" style='display:none;'>9</TD></TR>
<TR id='Row9' class=RowElementGray>
<TD id='colid9001' width="120"> 11-10-2003 </TD>
<TD id='colid9002' width="130" align=right> 000162067753 </TD>
<TD id='colid9003' width="110" align=right> Y1710718 </TD>
<TD id='colid9004' width="130" align=right> 29 </TD>
<TD id='colid9005' width="120"> English </TD>
<TD id='colid9006' width="100"> &nbsp;</TD>
<TD id='colid9007' width="0" style='display:none;'>9</TD></TR>
</TABLE>
</div>
</body>
</HTML>
Hi
I am trying to resize the width of a table dynamically onload. However, it doesnt seem to work.
Eric, this is regarding the table scroll. I have looked at the code posted in one of these forums but still, the columns donot align properly when i do it using two tables.one for header and the other for the body within a division. The columns of the two tables are offset if teh scrollbar appears.
Hence, I tried to align the tables dynamically on page load using the script in this code but somehow it doest resize the header table. Just wondering if I am doing anything wromg.
Here is the code. I really appreciate if somecan can assist me finding out what is wrong with the code. Please help.
Thanks
<HTML>
<head>
<STYLE>
.PlaceHolder
{
BORDER-RIGHT: lightgrey outset;
BORDER-TOP: lightgrey outset;
FONT-WEIGHT: bolder;
FONT-SIZE: 11;
BORDER-LEFT: lightgrey outset;
COLOR: black;
BORDER-BOTTOM: lightgrey outset;
FONT-FAMILY: Tahoma, Arial, Helvetica;
BACKGROUND-COLOR: lightgrey
}
.RowElementWhite
{
FONT-WEIGHT: lighter;
FONT-SIZE: 10;
COLOR: black;
FONT-FAMILY: Tahoma, Arial, Helvetica;
BACKGROUND-COLOR: white
}
.RowElementGray
{
FONT-WEIGHT: lighter;
FONT-SIZE: 10;
COLOR: black;
FONT-FAMILY: Tahoma, Arial, Helvetica;
BACKGROUND-COLOR: lightgrey
}
.RowHighlight
{
FONT-WEIGHT: lighter;
FONT-SIZE: 10;
COLOR: white;
FONT-FAMILY: Tahoma, Arial, Helvetica;
BACKGROUND-COLOR: black
}
.tblscroll
{
overflow: auto;
height:90%;
width:"710";
}
</STYLE>
<script type="text/javascript">
function resizeScrollTable()
{
var scrollBarWidth = document.getElementbyId("divis" .offsetWidth - document.getElementbyId("divis" .clientWidth;
document.getElementbyId("test" .width = document.getElementbyId
("divis" .clientWidth;
//document.getElementbyId("test" .Width = "694"; --this doesnt work either
}
window.attachEvent("onload", function () {resizeScrollTable();} );
</script>
</head>
<body bgcolor=white topmargin=0 leftmargin=0 rightmargin=0 bottommargin=0>
<table id='test' cellpadding=0 cellspacing=2 border=0 bordercolor=black width="710">
<TR valign=middle>
<td id=Header0 class=PlaceHolder width="120" align=middle bgcolor=lightgrey>date</td>
<td id=Header1 class=PlaceHolder width="130" align=middle
bgcolor=lightgrey>Inv Number</td>
<td id=Header2 class=PlaceHolder width="110" align=middle
bgcolor=lightgrey>Payer ID</td>
<td id=Header3 class=PlaceHolder width="130" align=middle bgcolor=lightgrey>Pages</td>
<td id=Header4 class=PlaceHolder width="120" align=middle bgcolor=lightgrey
>Language</td>
<td id=Header5 class=PlaceHolder width="100" align=middle bgcolor=lightgrey >Zip</td>
</TR>
</table>
<div id='div1' class=tblscroll>
<TABLE CELLSPACING=0
Cellpadding=4
border=1 bordercolor=lightgrey >
<TR id='Row0' class=RowElementWhite>
<TD id='colid01' width="120"> 11-10-2003 </TD>
<TD id='colid02' width="130" align=right> 62067767 </TD>
<TD id='colid03' width="110" align=right>&nbsp;</TD>
<TD id='colid04' width="130" align=right> 2 </TD>
<TD id='colid05' width="120"> English </TD>
<TD id='colid06' width="100"> &nbsp;</TD>
<TD id='colid07' width="0" style='display:none;'>0</TD></TR>
<TR id='Row1' class=RowElementGray>
<TD id='colid1001' width="120"> 11-10-2003 </TD>
<TD id='colid1002' width="130" align=right> 62067746 </TD>
<TD id='colid1003' width="110" align=right> Y0026623 </TD>
<TD id='colid1004' width="130" align=right> 68 </TD>
<TD id='colid1005' width="120"> English </TD>
<TD id='colid1006' width="100"> &nbsp;</TD>
<TD id='colid1007' width="0" style='display:none;'>1</TD></TR>
<TR id='Row2' class=RowElementWhite>
<TD id='colid2001' width="120"> 11-10-2003 </TD>
<TD id='colid2002' width="130" align=right> 000162067746 </TD>
<TD id='colid2003' width="110" align=right> Y0026623 </TD>
<TD id='colid2004' width="130" align=right> 2 </TD>
<TD id='colid2005' width="120"> English </TD>
<TD id='colid2006' width="100"> &nbsp;</TD>
<TD id='colid2007' width="0" style='display:none;'>2</TD></TR>
<TR id='Row3' class=RowElementGray>
<TD id='colid3001' width="120"> 11-10-2003 </TD>
<TD id='colid3002' width="130" align=right> 000262067746 </TD>
<TD id='colid3003' width="110" align=right> Y0026623 </TD>
<TD id='colid3004' width="130" align=right> 63 </TD>
<TD id='colid3005' width="120"> English </TD>
<TD id='colid3006' width="100"> &nbsp;</TD>
<TD id='colid3007' width="0" style='display:none;'>3</TD></TR>
<TR id='Row4' class=RowElementWhite>
<TD id='colid4001' width="120"> 11-10-2003 </TD>
<TD id='colid4002' width="130" align=right> 000362067746 </TD>
<TD id='colid4003' width="110" align=right> Y0026623 </TD>
<TD id='colid4004' width="130" align=right> 3 </TD>
<TD id='colid4005' width="120"> English </TD>
<TD id='colid4006' width="100"> &nbsp;</TD>
<TD id='colid4007' width="0" style='display:none;'>4</TD></TR>
<TR id='Row5' class=RowElementGray>
<TD id='colid5001' width="120"> 11-10-2003 </TD>
<TD id='colid5002' width="130" align=right> 000462067746 </TD>
<TD id='colid5003' width="110" align=right> Y0026623 </TD>
<TD id='colid5004' width="130" align=right> 2 </TD>
<TD id='colid5005' width="120"> English </TD>
<TD id='colid5006' width="100"> &nbsp;</TD>
<TD id='colid5007' width="0" style='display:none;'>5</TD></TR>

<TR id='Row6' class=RowElementWhite>
<TD id='colid6001' width="120"> 11-10-2003 </TD>
<TD id='colid6002' width="130" align=right> 62067752 </TD>
<TD id='colid6003' width="110" align=right> Y1710717 </TD>
<TD id='colid6004' width="130" align=right> 9 </TD>
<TD id='colid6005' width="120"> English </TD>
<TD id='colid6006' width="100"> &nbsp;</TD>
<TD id='colid6007' width="0" style='display:none;'>6</TD></TR>
<TR id='Row7' class=RowElementGray>
<TD id='colid7001' width="120"> 11-10-2003 </TD>
<TD id='colid7002' width="130" align=right> 000162067752 </TD>
<TD id='colid7003' width="110" align=right> Y1710717 </TD>
<TD id='colid7004' width="130" align=right> 3 </TD>
<TD id='colid7005' width="120"> English </TD>
<TD id='colid7006' width="100"> &nbsp;</TD>
<TD id='colid7007' width="0" style='display:none;'>7</TD></TR>
<TR id='Row8' class=RowElementWhite>
<TD id='colid8001' width="120"> 11-10-2003 </TD>
<TD id='colid8002' width="130" align=right> 62067753 </TD>
<TD id='colid8003' width="110" align=right> Y1710718 </TD>
<TD id='colid8004' width="130" align=right> 46 </TD>
<TD id='colid8005' width="120"> English </TD>
<TD id='colid8006' width="100"> &nbsp;</TD>
<TD id='colid8007' width="0" style='display:none;'>8</TD></TR>
<TR id='Row9' class=RowElementGray>
<TD id='colid9001' width="120"> 11-10-2003 </TD>
<TD id='colid9002' width="130" align=right> 000162067753 </TD>
<TD id='colid9003' width="110" align=right> Y1710718 </TD>
<TD id='colid9004' width="130" align=right> 29 </TD>
<TD id='colid9005' width="120"> English </TD>
<TD id='colid9006' width="100"> &nbsp;</TD>
<TD id='colid9007' width="0" style='display:none;'>9</TD></TR>
<TR id='Row9' class=RowElementWhite>
<TD id='colid9001' width="120"> 11-10-2003 </TD>
<TD id='colid9002' width="130" align=right> 000162067753 </TD>
<TD id='colid9003' width="110" align=right> Y1710718 </TD>
<TD id='colid9004' width="130" align=right> 29 </TD>
<TD id='colid9005' width="120"> English </TD>
<TD id='colid9006' width="100"> &nbsp;</TD>
<TD id='colid9007' width="0" style='display:none;'>9</TD></TR>
<TR id='Row9' class=RowElementGray onmouseover="this.style.cursor='hand'">
<TD id='colid9001' width="120"> 11-10-2003 </TD>
<TD id='colid9002' width="130" align=right> 000162067753 </TD>
<TD id='colid9003' width="110" align=right> Y1710718 </TD>
<TD id='colid9004' width="130" align=right> 29 </TD>
<TD id='colid9005' width="120"> English </TD>
<TD id='colid9006' width="100"> &nbsp;</TD>
<TD id='colid9007' width="0" style='display:none;'>9</TD></TR>
<TR id='Row9' class=RowElementGray>
<TD id='colid9001' width="120"> 11-10-2003 </TD>
<TD id='colid9002' width="130" align=right> 000162067753 </TD>
<TD id='colid9003' width="110" align=right> Y1710718 </TD>
<TD id='colid9004' width="130" align=right> 29 </TD>
<TD id='colid9005' width="120"> English </TD>
<TD id='colid9006' width="100"> &nbsp;</TD>
<TD id='colid9007' width="0" style='display:none;'>9</TD></TR>
<TR id='Row9' class=RowElementWhite>
<TD id='colid9001' width="120"> 11-10-2003 </TD>
<TD id='colid9002' width="130" align=right> 000162067753 </TD>
<TD id='colid9003' width="110" align=right> Y1710718 </TD>
<TD id='colid9004' width="130" align=right> 29 </TD>
<TD id='colid9005' width="120"> English </TD>
<TD id='colid9006' width="100"> &nbsp;</TD>
<TD id='colid9007' width="0" style='display:none;'>9</TD></TR>
<TR id='Row9' class=RowElementGray>
<TD id='colid9001' width="120"> 11-10-2003 </TD>
<TD id='colid9002' width="130" align=right> 000162067753 </TD>
<TD id='colid9003' width="110" align=right> Y1710718 </TD>
<TD id='colid9004' width="130" align=right> 29 </TD>
<TD id='colid9005' width="120"> English </TD>
<TD id='colid9006' width="100"> &nbsp;</TD>
<TD id='colid9007' width="0" style='display:none;'>9</TD></TR>
<TR id='Row9' class=RowElementWhite>
<TD id='colid9001' width="120"> 11-10-2003 </TD>
<TD id='colid9002' width="130" align=right> 000162067753 </TD>
<TD id='colid9003' width="110" align=right> Y1710718 </TD>
<TD id='colid9004' width="130" align=right> 29 </TD>
<TD id='colid9005' width="120"> English </TD>
<TD id='colid9006' width="100"> &nbsp;</TD>
<TD id='colid9007' width="0" style='display:none;'>9</TD></TR>
<TR id='Row9' class=RowElementGray>
<TD id='colid9001' width="120"> 11-10-2003 </TD>
<TD id='colid9002' width="130" align=right> 000162067753 </TD>
<TD id='colid9003' width="110" align=right> Y1710718 </TD>
<TD id='colid9004' width="130" align=right> 29 </TD>
<TD id='colid9005' width="120"> English </TD>
<TD id='colid9006' width="100"> &nbsp;</TD>
<TD id='colid9007' width="0" style='display:none;'>9</TD></TR>
<TR id='Row9' class=RowElementWhite>
<TD id='colid9001' width="120"> 11-10-2003 </TD>
<TD id='colid9002' width="130" align=right> 000162067753 </TD>
<TD id='colid9003' width="110" align=right> Y1710718 </TD>
<TD id='colid9004' width="130" align=right> 29 </TD>
<TD id='colid9005' width="120"> English </TD>
<TD id='colid9006' width="100"> &nbsp;</TD>
<TD id='colid9007' width="0" style='display:none;'>9</TD></TR>
<TR id='Row9' class=RowElementGray>
<TD id='colid9001' width="120"> 11-10-2003 </TD>
<TD id='colid9002' width="130" align=right> 000162067753 </TD>
<TD id='colid9003' width="110" align=right> Y1710718 </TD>
<TD id='colid9004' width="130" align=right> 29 </TD>
<TD id='colid9005' width="120"> English </TD>
<TD id='colid9006' width="100"> &nbsp;</TD>
<TD id='colid9007' width="0" style='display:none;'>9</TD></TR>
<TR id='Row9' class=RowElementWhite>
<TD id='colid9001' width="120"> 11-10-2003 </TD>
<TD id='colid9002' width="130" align=right> 000162067753 </TD>
<TD id='colid9003' width="110" align=right> Y1710718 </TD>
<TD id='colid9004' width="130" align=right> 29 </TD>
<TD id='colid9005' width="120"> English </TD>
<TD id='colid9006' width="100"> &nbsp;</TD>
<TD id='colid9007' width="0" style='display:none;'>9</TD></TR>
<TR id='Row9' class=RowElementGray>
<TD id='colid9001' width="120"> 11-10-2003 </TD>
<TD id='colid9002' width="130" align=right> 000162067753 </TD>
<TD id='colid9003' width="110" align=right> Y1710718 </TD>
<TD id='colid9004' width="130" align=right> 29 </TD>
<TD id='colid9005' width="120"> English </TD>
<TD id='colid9006' width="100"> &nbsp;</TD>
<TD id='colid9007' width="0" style='display:none;'>9</TD></TR>
<TR id='Row9' class=RowElementWhite>
<TD id='colid9001' width="120"> 11-10-2003 </TD>
<TD id='colid9002' width="130" align=right> 000162067753 </TD>
<TD id='colid9003' width="110" align=right> Y1710718 </TD>
<TD id='colid9004' width="130" align=right> 29 </TD>
<TD id='colid9005' width="120"> English </TD>
<TD id='colid9006' width="100"> &nbsp;</TD>
<TD id='colid9007' width="0" style='display:none;'>9</TD></TR>
<TR id='Row9' class=RowElementGray>
<TD id='colid9001' width="120"> 11-10-2003 </TD>
<TD id='colid9002' width="130" align=right> 000162067753 </TD>
<TD id='colid9003' width="110" align=right> Y1710718 </TD>
<TD id='colid9004' width="130" align=right> 29 </TD>
<TD id='colid9005' width="120"> English </TD>
<TD id='colid9006' width="100"> &nbsp;</TD>
<TD id='colid9007' width="0" style='display:none;'>9</TD></TR>
<TR id='Row9' class=RowElementWhite>
<TD id='colid9001' width="120"> 11-10-2003 </TD>
<TD id='colid9002' width="130" align=right> 000162067753 </TD>
<TD id='colid9003' width="110" align=right> Y1710718 </TD>
<TD id='colid9004' width="130" align=right> 29 </TD>
<TD id='colid9005' width="120"> English </TD>
<TD id='colid9006' width="100"> &nbsp;</TD>
<TD id='colid9007' width="0" style='display:none;'>9</TD></TR>
<TR id='Row9' class=RowElementGray>
<TD id='colid9001' width="120"> 11-10-2003 </TD>
<TD id='colid9002' width="130" align=right> 000162067753 </TD>
<TD id='colid9003' width="110" align=right> Y1710718 </TD>
<TD id='colid9004' width="130" align=right> 29 </TD>
<TD id='colid9005' width="120"> English </TD>
<TD id='colid9006' width="100"> &nbsp;</TD>
<TD id='colid9007' width="0" style='display:none;'>9</TD></TR>
<TR id='Row9' class=RowElementWhite>
<TD id='colid9001' width="120"> 11-10-2003 </TD>
<TD id='colid9002' width="130" align=right> 000162067753 </TD>
<TD id='colid9003' width="110" align=right> Y1710718 </TD>
<TD id='colid9004' width="130" align=right> 29 </TD>
<TD id='colid9005' width="120"> English </TD>
<TD id='colid9006' width="100"> &nbsp;</TD>
<TD id='colid9007' width="0" style='display:none;'>9</TD></TR>
<TR id='Row9' class=RowElementGray>
<TD id='colid9001' width="120"> 11-10-2003 </TD>
<TD id='colid9002' width="130" align=right> 000162067753 </TD>
<TD id='colid9003' width="110" align=right> Y1710718 </TD>
<TD id='colid9004' width="130" align=right> 29 </TD>
<TD id='colid9005' width="120"> English </TD>
<TD id='colid9006' width="100"> &nbsp;</TD>
<TD id='colid9007' width="0" style='display:none;'>9</TD></TR>
<TR id='Row9' class=RowElementWhite>
<TD id='colid9001' width="120"> 11-10-2003 </TD>
<TD id='colid9002' width="130" align=right> 000162067753 </TD>
<TD id='colid9003' width="110" align=right> Y1710718 </TD>
<TD id='colid9004' width="130" align=right> 29 </TD>
<TD id='colid9005' width="120"> English </TD>
<TD id='colid9006' width="100"> &nbsp;</TD>
<TD id='colid9007' width="0" style='display:none;'>9</TD></TR>
<TR id='Row9' class=RowElementGray>
<TD id='colid9001' width="120"> 11-10-2003 </TD>
<TD id='colid9002' width="130" align=right> 000162067753 </TD>
<TD id='colid9003' width="110" align=right> Y1710718 </TD>
<TD id='colid9004' width="130" align=right> 29 </TD>
<TD id='colid9005' width="120"> English </TD>
<TD id='colid9006' width="100"> &nbsp;</TD>
<TD id='colid9007' width="0" style='display:none;'>9</TD></TR>
<TR id='Row9' class=RowElementWhite>
<TD id='colid9001' width="120"> 11-10-2003 </TD>
<TD id='colid9002' width="130" align=right> 000162067753 </TD>
<TD id='colid9003' width="110" align=right> Y1710718 </TD>
<TD id='colid9004' width="130" align=right> 29 </TD>
<TD id='colid9005' width="120"> English </TD>
<TD id='colid9006' width="100"> &nbsp;</TD>
<TD id='colid9007' width="0" style='display:none;'>9</TD></TR>
<TR id='Row9' class=RowElementGray>
<TD id='colid9001' width="120"> 11-10-2003 </TD>
<TD id='colid9002' width="130" align=right> 000162067753 </TD>
<TD id='colid9003' width="110" align=right> Y1710718 </TD>
<TD id='colid9004' width="130" align=right> 29 </TD>
<TD id='colid9005' width="120"> English </TD>
<TD id='colid9006' width="100"> &nbsp;</TD>
<TD id='colid9007' width="0" style='display:none;'>9</TD></TR>
</TABLE>
</div>
</body>
</HTML>
Hi
I am trying to create a table with its header fixed when I scroll horizontally. Right now, I am trying to do this by writing the header and the body as separate tables. I am also putting the body table under a div and forcing scroll by specifying a height. The problem is that due to the scroll bar, the body table columns are not aligning with the header table columns though the width of the cells is the same. As long as the scroll bar is not appearing (meaning the data in the body table fits within the specified height of the div), the columns align perfectly. Is there a way to resize the columns dynamically so that they are aligned properly? I have seen a post in this topic for having a scrollable table using the same logic.
My other question: is there any other way of doing this so that the header remains stationary and the body of the table can be scrollable and also maintaining the column alignment?
Any suggestions are greatly appreciated!!!
Thank you
Ramkumar
Hi
I have a table with a row and many columns declared. Each colum has an img tag and a span tag. On clicking the row, i call a JS and i am trying to access the img element under it by using the firstChild. Will it return the img tag?
Here is the part of my html page and the JS.
....
<table border=0 cellpadding=6 cellspacing=1 width=100%>
<tr valign=top>
<td style='padding-top:6px;padding-bottom:6px;' border=0 width=100% onmouseover=this.style.cursor='hand'; onmouseout=this.style.cursor='auto'; onclick=determineTreeAction(this,'NODE_0_0_')>
<img alt='Expand/Collapse' src='/image/false.gif'>
&nbsp;<span title='' class=UnselSuper>Cross Border Reports</span>
</td>
</tr>
</table>
....
here is the determineTreeAction javascript.
determineTreeAction(this, item)
{
....
this.firstChild.src = '/image/true.gif';
....
rest of the code.
}
however, i am not able to change the source of the image. So the question is will this.firstChild get the imng tag under the column? r do i need to use anythign else to access the img tag under the column?
I am little new to Java Scritping. so any suggestions would be appreciated.
Thanks
Hi
I am new to Javascripting and I need some help with a tak that I am trying to accomplish.
Here is my problem:
I have a table in the html page with 3 rows (single column) and all of them have a particular style element from a CSS . When a button that is present in the same html page is clicked, I need to set the style of the rows to a different element from the CSS. I am trying to access the rows by the row id defined in the table but it doesnt work. Is it possible to do so?
Any help would be greatly appreciated.

Here is the table that I need to change:

<HTML>
<BODY>
other html tags
...
...
<TABLE cellpadding=2 cellspacing=5 border=1 bordercolor=lightgrey>
<TR align=middle>
<td class=xxx>Actions </td>
</TR>
<TR>
<td class=xxx> PDF </td>
</TR>
<TR>
<td class=xxx> Text </td>
</TR>
</TABLE>
....
other tags
....
</BODY>
</HTML>
SO how do I access this in the javascript code that will be executed upon clicking a button present in that page to change the style of all the 3 from xxx to yyy.

Please help.
Thanks
Thanks Mike. I am just trying to send in a two page document. I agree that it has got to do with the plug-ins but what baffles me is that the printing works fine if I save the same document to my hard disk and then open it within the browser.
Thanks for your quick response!
14 years ago