:: Forum >> Version 1 >>

How to add a input field above grid and position grid below it.

I have tried DIVs and <P> like in the two grid example, but no luck. Grid overlaps my input field. I do not want to use iframes.

Here is what I want to add above the grid....
<form name="title" id="title">
  <
INPUT TYPE=TEXT NAME="GridTitle" ID="GridTitle" TITLE="" VALUE="Type report title here..." CLASS="transparent" MAXLENGTH=67 STYLE="position:absolute; top:.15in; left:.1in; width:9.2in; height:0.250in; font-family: Arial; font-size: 14.00pt; font-weight: 400; font-style: normal;">
  <
button onclick=printreport(); STYLE="position:absolute; top:.15in; left:9.5in;">Print</button>
</
form>

<
style>
  .
transparent  {backgroundTransparentbordernone}
  .
position {positionrelativetop 30px}
</
style>
<
SCRIPT LANGUAGE="JavaScript1.2">
//document.title.GridTitle.focus();
//document.title.GridTitle.select();
function printreport(){
  print();
}
</
script>
 
Seems that no matter what I add the grid seems to be start from the top and overlaps my input field, instead of starting below the input field.

Any help would be appreciated....thanks!

Here is my whole code....
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<
HTML>
  <
HEAD>
  <
META http-equiv="content-type" content="text/html; charset=windows-1250">
  <
META name="generator" content="PSPad editor, www.pspad.com">
  <
TITLE></TITLE>
  <
LINK href="ActiveWidgets/runtime/styles/xp/grid.css" rel="stylesheet" type="text/css" >
  <
SCRIPT src="ActiveWidgets/runtime/lib/grid.js"></script>
    <!-- 
grid format -->
    <
style>
      .
active-controls-grid {height100%; fontmenu;}

        .
active-column-{width:  80px;}
        .
active-column-{width200px;}
        .
active-column-{text-alignright;}
        .
active-column-{text-alignright;}
        .
active-column-{text-alignright;}

        .
active-grid-column {border-right1px solid threedlightshadow;}
        .
active-grid-row {border-bottom1px solid threedlightshadow;}
        
    @
media print
{
    .
active-scroll-bars,
    .
active-scroll-left,
    .
active-scroll-corner {
       
displaynone;
    }

   .
active-scroll-top {
      
positionabsolute;
      
overflowvisible;
      
widthauto!important;
      
heightauto!important;
  }            
        
   .
active-controls-grid {
      
overflowvisible;
      
heightauto;
      
widthauto;
   }
    
   .
active-scroll-data {
      
positionabsolute;
      
overflowvisible;
      
widthauto!important;
      
heightauto!important;
   }

    </
style>
<
SCRIPT LANGUAGE="JavaScript1.2">

    var 
myColumns dialogArguments.Xstring;
    var 
myData dialogArguments.ctext;
</
script>
  </
HEAD>
  <
BODY>
<
p>
<
form name="title" id="title">
  <
INPUT TYPE=TEXT NAME="GridTitle" ID="GridTitle" TITLE="" VALUE="Type report title here..." CLASS="transparent" MAXLENGTH=67 STYLE="position:absolute; top:.15in; left:.1in; width:9.2in; height:0.250in; font-family: Arial; font-size: 14.00pt; font-weight: 400; font-style: normal;">
  <
button onclick=printreport(); STYLE="position:absolute; top:.15in; left:9.5in;">Print</button>
</
form>

<
style>
  .
transparent  {backgroundTransparentbordernone}
  .
position {positionrelativetop 30px}
</
style>
<
SCRIPT LANGUAGE="JavaScript1.2">
document.title.GridTitle.focus();
document.title.GridTitle.select();
function 
printreport(){
  print();
}
</
script>
</
p>

<
SCRIPT LANGUAGE="JavaScript1.2">

    
// create grid object
    
var obj = new Active.Controls.Grid;

    
// set number of columns/rows
    
obj.setRowCount(myData.length-1);
    
obj.setColumnCount(myColumns.length);

    
// link to cell text
    
obj.setDataText(function(i,j){return myData[i][j]});
    
obj.setColumnProperty("text", function(i){return myColumns[i]});
    
document.write(obj);
    
    
obj.setDataProperty("value", function(i,j){
    var 
text "" this.getDataText(ij);
    if (
text.match(/^\s*$/)) {return ""}
    var 
value Number(text.replace(/[ ,%\$]/gi"").replace(/\((.*)\)/, "-$1"));
    return 
isNaN(value? text.toLowerCase() + " " value;
}); 
var 
stylesheet document.styleSheets[document.styleSheets.length-1];
stylesheet.addRule(".active-column-2""width:150px");
</
script>
  </
BODY>
</
HTML>
 
Anthony
Tuesday, September 20, 2005
Try replacing
.active-controls-grid {height: 100%; font: menu;}
with
.active-controls-grid {height: 100%; font: menu;top:30px;}
Tuesday, September 20, 2005
Or adding a <br> after </form>
Tuesday, September 20, 2005
.active-controls-grid {height: 100%; font: menu;top:30px;}

That was the trick. thanks.
Anthony
Tuesday, September 20, 2005
how to add a check box in a page?
Friday, August 11, 2006



This topic is archived.

Back to support forum

Forum search