Client Side Things
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesClient Side Things

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old July 19th, 2003, 02:26 PM
zuzupus zuzupus is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 82 zuzupus User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
textarea

hi,
i created textarea field having row=1 and col=15 and table width=100% and cols=12.
the problem is when i type some contents in this text area and try to print in next line ,the result becomes too long and width of textarea remains same,is it possible to make the printing message width as textarea width

for more clear understanding
<table width=100% cols=12>
<th nowrap>Text</th>
<td>
<textarea rows=1 cols=15></textarea>
</td>
<input type=submit value=save>//clicking on this gave value of text area
<td>this line is for printing in next line</td>using PHP,if i type soem text in this field let say
this forum is best form all other sites,then prints looks like below and - - -> this represnts column width
| Text |
| _______________ |
| |_______________| |
| |
|this forum is best form all other sites|

i want soem thing like below printed message,exactly below text area and equal to width of text area

|_______________|
this forum is best
form allother sites

if anybody helps me out will really be appreciable the figure u cant see properly so just click on edit to see the correct view or by minimizing the window u will be clear what i want

thanks in advance



Reply With Quote
  #2  
Old July 19th, 2003, 02:30 PM
jorgen jorgen is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Hardenberg, Holland<marquee>
Posts: 284 jorgen User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
RE: textarea

I don't get the problem, sorry.

Could you post an example somewhere on your FTP so we can see the problem.

Reply With Quote
  #3  
Old July 21st, 2003, 07:39 AM
zuzupus zuzupus is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 82 zuzupus User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
RE: textarea

php Code:
Original - php Code
  1.  
  2. <?
  3.          include("../settings.php");
  4.          /* Connecting, selecting database */
  5.          $link = mysql_connect("$dbhost", "$dbuser", "$dbpw")
  6.          or die("Could not connect");
  7.  
  8.          mysql_select_db("$dbuser") or die("Could not select database");
  9.  
  10.          $query = "SELECT kunde,projektnr from emp_kunde";
  11.     $result = mysql_query($query) or die("Query failed: $query");
  12.          $kunden = array();
  13.          $projekt = array();
  14.          while ($row = mysql_fetch_assoc($result))
  15.          {
  16.           array_push($kunden, $row["kunde"]);
  17.           array_push($projekt, $row["projektnr"]);
  18.          }
  19.          $query = "SELECT hvorgang,uvorgang,status,soll from emp_details ";
  20.     $result = mysql_query($query) or die("Query failed: $query");
  21.          $getrowmysql_fetch_array($result);
  22.          $hvorgang = array();
  23.          $uvorgang = array();
  24.          $status = array();
  25.          while ($row = mysql_fetch_assoc($result))
  26.          {
  27.           array_push($hvorgang, $row["hvorgang"]);
  28.           array_push($uvorgang, $row["uvorgang"]);
  29.           array_push($status, $row["status"]);
  30.          }
  31.          $kunden = array_unique($kunden);
  32.          $hprojekt = array_unique($projekt);
  33.          $haupt = array_unique($hvorgang);
  34.          $unter = array_unique($uvorgang);
  35.          $hstatus = array_unique($status);
  36.  
  37.         if (isset($HTTP_POST_VARS["datum"]))
  38.         {
  39.             $nr = $HTTP_POST_VARS["nr"];
  40.             $datum = $HTTP_POST_VARS["datum"];
  41.             $von = $HTTP_POST_VARS["von"];
  42.             $bis = $HTTP_POST_VARS["bis"];
  43.             $kunde = $HTTP_POST_VARS["kunde"];
  44.             $projekt = $HTTP_POST_VARS["projekt"];
  45.             $hVorgang = $HTTP_POST_VARS["hvorgang"];
  46.             $uVorgang = $HTTP_POST_VARS["uvorgang"];
  47.             $text = $HTTP_POST_VARS["text"];
  48.             $ist = $HTTP_POST_VARS["ist"];
  49.             $soll = $HTTP_POST_VARS["soll"];
  50.                  $status = $HTTP_POST_VARS["status"];
  51.  
  52.                  $query = "INSERT INTO t_emp";
  53.                  $query.="(nr,datum,von,bis,kunde,projekt,hvorgang,uvorgang,  text,ist,soll,status) values ";
  54.                  $query.="('$nr','$datum','$von','$bis','$kunde','$projekt',  '$hVorgang','$uVorgang','$text','$ist','$soll','$s  tatus')";
  55.             mysql_query($query) or die("Query failed: Insert new row");
  56.             $updatePK = "UPDATE key_generator set id = $nr where name = 't_emp'";
  57.             mysql_query($updatePK) or die("Query failed: Update field 'nr' (PK)");
  58.  
  59.         }
  60.                 /// this is the place to get soll value but problem is nr. filed always incremented by 2
  61.                 $query = "SELECT * FROM t_emp order by nr DESC";
  62.             $result = mysql_query($query) or die("Query failed: Fetch all rows");
  63.                  $query = "SELECT id from key_generator where name = 't_emp'";
  64.                  $pkResult = mysql_query($query) or die("Query failed: Get last Id");
  65.                  $row = mysql_fetch_assoc($pkResult);
  66.             $pk = $row[id];
  67.             $pk++;
  68.  
  69.                  function fillDD($min, $max, $selected) //selected format 12:30
  70.                  {
  71.  
  72.             $sel_bits = explode(":", $selected);
  73.                         for($i=$min; $i<24; $i++) {
  74.           //$i = sprintf('%02d', $i); # set $i to be padded with a 0's  up to 2 characters
  75.           for($j=$max; $j<60; $j+=5) {
  76.                     $j = sprintf('%02d', $j); # set $j to be padded with a 0's up to 2 characters
  77.                     if($i == $sel_bits[0] && $j == $sel_bits[1]) {
  78.                              print("<option SELECTED value='$i:$j'>$i:$j</option>n");
  79.                     }
  80.                         else {
  81.                        print("<option value='$i:$j'>$i:$j</option>n");
  82.                      }
  83.                          }//for($j)
  84.                          } //for($i)
  85.                 }
  86.  
  87.                 $arrDay = array ("So", "Mo", "Di", "Mi", "Do", "Fr","Sa");
  88.                 $D=$arrDay[date(w)];
  89.  
  90. ?>
  91.  
  92.  
  93. <html>
  94.     <head>
  95.         <title>Log-Zeiterfassung</title>
  96.         <link rel="stylesheet" type="text/css" href="../styles/styles.css" />
  97.                  <script language="JavaScript" src="date-picker.js"></script>
  98.                  <SCRIPT LANGUAGE="JavaScript" src="log.js"></script>
  99.                  <SCRIPT language="JavaScript">
  100.                     function calculateIst()
  101.                     {
  102.                              var time =document.forms["tstest"].elements["von"].value.split(":");
  103.                                  vontime=parseInt(time[0]*60)+parseInt(time[1]);
  104.                         var time1 =document.forms["tstest"].elements["bis"].value.split(":");
  105.                                  bistime=parseInt(time1[0]*60) +parseInt(time1[1])
  106.                           diff=(bistime-vontime)
  107.                                  if(diff<0){
  108.                                alert("assure that bis is greater than von")
  109.                             return false
  110.                             }
  111.                             min=(diff%60)
  112.                             hrs=(diff-min)/60
  113.                             if (hrs<=9)
  114.                             hrs="0"+hrs
  115.                             if(min<=9)
  116.                             min="0"+min
  117.               document.forms["tstest"].elements["ist"].value =hrs + ":" + min;
  118.                     }
  119.  
  120.                </script>
  121.  
  122.  
  123.     </head>
  124.  
  125.   <form name="tstest" action="log.phtml" method="post">
  126.       <body leftmargin="0" topmargin="0"  marginwidth="0" marginheight="0" class="mybar">
  127.       <TABLE BORDER=1 CELLSPACING=0 CELLPADDING=1 width=100% name="rsTable" id=rsTable cols=12>
  128.              <tr bgcolor="#cccccc">
  129.                          <!--<th>&nbsp;</th> -->
  130.                          <!--<th nowrap>Nr.</th>-->
  131.                          <th nowrap>Datum</th>
  132.                          <th nowrap>Von</th>
  133.                          <th nowrap>Bis</th>
  134.                          <th nowrap>Kunde</th>
  135.                          <th nowrap>Projekt</th>
  136.             <th nowrap>H-Vorgang</th>
  137.             <th nowrap>U-Vorgang</th>
  138.             <th nowrap>Text</th>
  139.             <th nowrap>IST</th>
  140.             <th nowrap>Soll</th>
  141.                          <th nowrap>Status</th>
  142.                          <th nowrap>&nbsp;</th>
  143.          </tr>
  144.                     <? if (!isset($HTTP_POST_VARS["Save"])) { ?>
  145.         <tr>
  146.                          <!--<td><a href="ed