Difference between revisions of "Team:Pasteur Paris/Notebook"

Line 60: Line 60:
 
//function Help(text,Lnx,Lny) {
 
//function Help(text,Lnx,Lny) {
 
function Help(text,id) {
 
function Help(text,id) {
  var n = ((text.length)/130)+1;
 
  //alert(((text.length)/130)+1);
 
  //var n=2;
 
 
   var element = document.getElementById(id);
 
   var element = document.getElementById(id);
 +
  var width = (element.offsetWidth)/10;
 +
  var n = ((text.length)/130)+1;
 
   var Lny = element.offsetTop + element.offsetHeight;
 
   var Lny = element.offsetTop + element.offsetHeight;
 
   var Lnx = element.offsetLeft;
 
   var Lnx = element.offsetLeft;
 
    
 
    
   PreBule="<textarea cols=115 rows="+n+" id='note' name='Texte' readonly>"+text+"</textarea>";
+
   PreBule="<textarea cols="+width+" rows="+n+" id='note' name='Texte' readonly>"+text+"</textarea>";
 
   if (document.layers) {
 
   if (document.layers) {
 
     document.layers["Help"].document.write(PreBule);
 
     document.layers["Help"].document.write(PreBule);

Revision as of 13:10, 15 September 2015

Notebook

Search for a content: