0

hello everyone .... i have a submit form (number to word converter) .... my problem is when i clicked a my submit button it will not work ... "but" when i duplicate my form it WORK.. i wonder why...btw this is my code: (dont mind my coding hehe )...

<html>

<style type="text/css">
.M {
    text-align: center;
    font-family: "Arial Black", Gadget, sans-serif;
    font-size: 36px;
}
.J {
    text-align: center;
}
.J {
    text-align: center;
}
.Q {
    text-align: right;
    color: #333;
}
.D {
    text-align: right;
}
.J strong {
    font-size: 18px;
}
.J strong {
    font-size: 24px;
}
.J strong {
    font-size: 18px;
}
.J strong {
    font-size: 16px;
}
.J strong {
    font-size: 18px;
}
.P strong {
    text-align: center;
}
.P {
    font-size: 18px;
}
.E strong {
    font-size: 18px;
}
.E {
    font-style: italic;
}
.E {
    font-weight: bold;
    font-size: 18p&nbsp;&nbsp;&nbsp;&nbsp;<p class="J"><strong>Email:[url]www.Multifactor.us[/url]
&n
;
}
.E .E {
    font-style: normal;
}
.E .E {
    font-weight: normal;
}
.P {
    font-size: 16px;
}
.E {
    text-align: center;
    font-style: normal;
    font-weight: normal;
}
.P {font-size: 18px; text-align: center;}
.E {
    font-weight: bold;
    font-size: 14px;
}
.E {
    font-size: 10px;
}
.E {
    text-align: center;
}
.P {
    font-weight: bold;
}
.w {
    font-size: 20px;
}
.d {
    text-align: right;
}
.t {
    text-align: left;
}
.n {
    font-size: 16px;
}
.n {
    font-size: 18px;
}
.d {
    font-size: 18px;
}
.q {
    font-size: 18px;
}
.t {
    font-size: 18px;
}
.t1 {
    font-size: 18px;
}
.d {
    font-size: 18px;
}
</style>

<style>
@media print {
#nav, #about { display: none; }
}

</style>



<p class="M"><img src="john.png" alt="" width="500" height="35" border="0" class="M">
<p class="P"><span class="P">#0005 Juan C. Legaspi St., Ubaldo Laya Iligan City</span></p>
<p class="P"><span class="P">Phone No./Fax:(063)225-4</span>98</span></p>
<p class="P"><span class="P">Email: www.Multifactors.us</span></p>
<p class="P">&nbsp;</p>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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bsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  <TABLE align=right>
<tr>
<td>

</td> <td>

  <form action="addqoute.php" method="POST" id="insertx"> 

<p  align="justify" class="C"><B> QOUTATION:&nbsp;&nbsp;&nbsp;&nbsp;</B><select name="quotation">

<?php
$host="localhost"; // Host name 
$username=""; // Mysql username 
$password=""; // Mysql password 
$db_name=""; // Database name 
$tbl_name=""; // Table name 

// Connect to server and select database.
mysql_connect("$host", "$username", "$password")or die("cannot connect"); 
mysql_select_db("$db_name")or die("cannot select DB");
$sql="SELECT * FROM $tbl_name";
$result = mysql_query($sql);
while($row = mysql_fetch_array($result))
{
  echo "<option value=\"".$row['id']."\">".$row['QOUTATION']."</option>\n  ";
}
?>
</select>


</form>
</td>
</tr>
</TABLE>

<form name="form2" method="post" action="">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs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p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

   <script type="text/javascript">
tday  =new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
tmonth=new Array("January","February","March","April","May","June","July","August","September","October","November","December");

function GetClock(){
d = new Date();
nday   = d.getDay();
nmonth = d.getMonth();
ndate  = d.getDate();
nyear = d.getYear();
nhour  = d.getHours();
nmin   = d.getMinutes();
if(nyear<1000) nyear=nyear+1900;

     if(nhour ==  0) {ap = " Am";nhour = 12;} 
else if(nhour <= 11) {ap = " Am";} 
else if(nhour == 12) {ap = " Pm";} 
else if(nhour >= 13) {ap = " Pm";nhour -= 12;}

if(nmin <= 9) {nmin = "0" +nmin;}


document.getElementById('clockbox').innerHTML=""+tday[nday]+", "+tmonth[nmonth]+" "+ndate+", "+nyear+" "+nhour+":"+nmin+ap+"";
setTimeout("GetClock()", 1000);
}
window.onload=GetClock;
</script>
<div id="clockbox" align="RIGHT"></div>

<p  align="justify" class="c">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B> TO:</B> <select name="comcountry">

<?php
$host="localhost"; // Host name 
$username="root"; // Mysql username 
$password="123"; // Mysql password 
$db_name="simulation"; // Database name 
$tbl_name="country"; // Table name 

// Connect to server and select database.
mysql_connect("$host", "$username", "$password")or die("cannot connect"); 
mysql_select_db("$db_name")or die("cannot select DB");
$sql="SELECT * FROM $tbl_name";
$result = mysql_query($sql);
while($row = mysql_fetch_array($result))
{
  echo "<option value=\"".$row['ID']."\">".$row['COUNTRY']."</option>\n  ";
}
?>
</select>    

<p  align="justify" class="w">&nbsp;&nbsp;&nbsp;&nbsp; We are glad to receive your Quotation.</p>



<?php

$host="localhost"; // Host name 
$username="root"; // Mysql username 
$password="123"; // Mysql password 
$db_name="simulation"; // Database name 
$tbl_name="simutable"; // Table name 

// Connect to server and select database.
mysql_connect("$host", "$username", "$password")or die("cannot connect"); 
mysql_select_db("$db_name")or die("cannot select DB");

// select record from mysql 
$sql="SELECT * FROM $tbl_name";
$result=mysql_query($sql);

?>

<style type="text/css"> 
table.Tablex { margin-left: auto; margin-right: auto; border: 2px solid #FFFFFF;
background-color: #FFFFFF; border-collapse: collapse; font-size: 80%; color: #000000; 
 width:148px; } table.Tablex td, table.Tablex th { border: 1px solid #545468; padding: 5px;
} 
table.Tablex th { font-size: 100%; font-weight: 600; color: #FFFFFF; background-color: #79AF7A; 
} 

 </style> 


<table width="1000" border="0" cellspacing="1" cellpadding="0"   class="Tablex" align="right">
<tr>
<td><table width="950" border="0" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF" style="table-layout:fixed">
<tr class="trx" height=30>

<th align="center" class="head"><strong>ITEM</strong></th>
<th align="center" class="head"><strong>QUANTITY</strong></th>
<th align="center" class="head"><strong>UNIT</strong></th>
<th align="center" class="head"><strong>DESCRIPTION</strong></th>
<th align="center" class="head"><strong>UNITPRICE</strong></th>
<th align="center" class="head"><strong>TOTALPRICE</strong></th>
</tr>
<br>
<?php
while($rows=mysql_fetch_array($result)){
?>
<style type="text/css">
<!--

a {
    border-bottom: 0px ;
    text-decoration: none;
}

a:hover {
    position: relative;
}

a span {
    display: none;
}

a:hover span {
    display: block;
    position: absolute; top: 15px; left: 0;
    padding: 7px; margin: 10px; z-index: 100;
    background: #FFE783; border: 0px #c0c0c0;
    opacity: 0.9;

}

-->
</style>



<tbody class="1">
<tr class="xux">

<td bgcolor="#FFFFFF" style="white-space:pre-wrap;white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word"><CENTER><? echo $rows['ITEM']; ?></CENTER></td>
<td bgcolor="#FFFFFF" style="white-space:pre-wrap;white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word"><CENTER><? echo $rows['QUANTITY']; ?></CENTER></td>
<td bgcolor="#FFFFFF" style="white-space:pre-wrap;white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word"><CENTER><? echo $rows['UNIT']; ?></CENTER></td>
<td bgcolor="#FFFFFF" style="white-space:pre-wrap;white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word"><CENTER><a href="phpmysql.php?id=<? echo $rows['ID']; ?>"><? echo $rows['DESCRIPTION']; ?><span><? echo $rows['DESCRIPTION']; ?></span></CENTER></td>
<td bgcolor="#FFFFFF" style="white-space:pre-wrap;white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word"><CENTER><? echo $rows['UNITPRICE']; ?></CENTER></td>
<td bgcolor="#FFFFFF" style="white-space:pre-wrap;white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word"><CENTER><? echo $rows['TOTALPRICE']; ?></CENTER></td>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</tr>
</tbody>
<?

// close while loop 
}

// close connection; 
mysql_close();

?> 
</table></td>
</tr>

</table>




<BR>
<BR>
<BR>
<BR>
<BR>

<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>


-------------------------------------- <!-- this one-->-----------------------------


<form name="moose" action="">



    <input name="num" type="text" value="100"  style="font-family:verdana;font-size:10pt;width:200px;" maxlength="315">

            <input type="submit" value="Convert" style="width:80px;font-family:Tahoma;font-size:10pt;">

            <div id="output" style="padding:1px 0 8px 0;"></div>




</form>
----------------------------------<!--and this one-->----------------------------

<form name="moose" action="">




            <div id="output" style="padding:1px 0 8px 0;"></div>




</form>



<script type="text/javascript">




var units=new Array("one","two","three","four","five","six","seven","eight","nine");

var teens=new  Array("ten","eleven","twelve","thirteen","fourteen","fifteen","sixteen","seventeen","eighteen ","nineteen");

var tens=new Array("twenty","thirty","forty","fifty","sixty","seventy","eighty","ninety");

var illions=new Array('m','b','tr','quadr','quint','sext','sept','oct','non','dec','undec','duodec','tredec','quattuordec','quindec','sexdec','septendec','octodec','novemdec','vigint','unvigint','duovigint','trevigint','quattuorvigint','quinvigint','sexvigint','septenvigint','octovigint','novemvigint','trigint','untrigint','duotrigint','tretrigint','quattuortrigint','quintrigint','sextrigint','septentrigint','octotrigint','novemtrigint','quadragint','unquadragint','duoquadragint','trequadragint','quattuorquadragint','quinquadragint','sexquadragint','septenquadragint','octoquadragint','novemquadragint','quinquagint','unquinquagint','duoquinquagint','trequinquagint','quattuorquinquagint','quinquinquagint','sexquinquagint','septenquinquagint','octoquinquagint','novemquinquagint','sexagint','unsexagint','duosexagint','tresexagint','quattuorsexagint','quinsexagint','sexsexagint','septsexagint','octosexagint','novemsexagint','septuagint','unseptuagint','duoseptuagint','treseptuagint','quattuorseptuagint','quinseptuagint','sexseptuagint','septseptuagint','octoseptuagint','novemseptuagint','octogint','unoctogint','duooctogint','treoctogint','quattuoroctogint','quinoctogint','sexoctogint','septoctogint','octooctogint','novemoctogint','nonagint','unnonagint','duononagint','trenonagint','duattuornonagint','quinnonagint','sexnonagint','septnonagint','octononagint','novemnonagint','cent','cenunt','duocent','centret');

function smallNum(num, mag){

  var a=num.charAt(0);

  var b=num.charAt(1);

  var c=num.charAt(2);

  var s="";

  if (a!=0) {

    s+=units[a-1] + " hundred";

    if (b==0 && c==0) return s;

    else s+="&nbsp;";

  }

  if (b==0) {

    if (c==0) return "";

    return s+units[c-1];

  }

  if (b==1) {

    return s+teens[c];

  }

  if (b>1) {

    s+=tens[b-2];

    if (c>0) s+="-" + units[c-1];

    return s;

  }

}

function fixChars(){

  var subject=document.forms.moose.num;

  var str=subject.value;

  var str2="";

  var L=str.length;

  var t;

  var f=false;

  for (var i=0; i<L; i++) {

    t=str.charAt(i);

    if (t*1==t) {

      if (t!=0) f=true;

      if (f) str2+=t;

    }

  }

  if (str2=="") str2="0"

  subject.value=str2;

}

document.forms.moose.onsubmit=function(){

  fixChars();

  var s=this.num.value;

  if (s.length>315) {

    alert("Your number is "+s.length+" digits long.\nThe maximum length is 303  digits.");

    return false;

  }

  var r="", temp="";

  while(s.length%3>0)s="0"+s;

  var max=Math.ceil(s.length/3);

  for (var i=0; i<max; i++) {

    temp=smallNum(s.substr(i*3, 3));

    if (temp!="") {

      if (max-i==1 && r!="" && s.substr(i*3, 3)<100) ;

      else if (r!="") r+="&nbsp;";

      if (max-i==2) temp+=" thousand,";

      if (max-i>2) temp+=" "+illions[max-i-3]+"illion,";

    }

    r+=temp;

  }

  if (s==0) r="zero";

  r=r.charAt(0).toUpperCase()+r.substring(1,r.length)+".";

  document.getElementById("output").innerHTML=r;

  return false;

}

// End -->

</script>





<form name="form5" method="post" action="">
  <strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;TERMS:</strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  <input type="text" name="text" size="20" style="border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(126, 157, 185); border-right-color: rgb(126, 157, 185); border-bottom-color: rgb(126, 157, 185); border-left-color: rgb(126, 157, 185); padding-top: 2px; padding-right: 2px; padding-bottom: 2px; padding-left: 2px; ; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(235, 255, 255); background-position: 0% 50%; background-repeat: no-repeat no-repeat; ">



</form>
<form name="form6" method="post" action="">
  <strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DELIVERY POINT:</strong>
  <input type="text" name="text" size="20" style="border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(126, 157, 185); border-right-color: rgb(126, 157, 185); border-bottom-color: rgb(126, 157, 185); border-left-color: rgb(126, 157, 185); padding-top: 2px; padding-right: 2px; padding-bottom: 2px; padding-left: 2px; ; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(235, 255, 255); background-position: 0% 50%; background-repeat: no-repeat no-repeat; ">
</form>








</body>


</html>

Edited by pyTony: Fixed formatting

2
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by uselessninja
0

check my code line numbers
389 given id to form
393 given id to num
395 changed submit to button and added onclick event
404 removed duplicate form
470 accessing num by id
502 change function definition, now creating new function totext
507 accessing num by id

<html>

<style type="text/css">
.M {
text-align: center;
font-family: "Arial Black", Gadget, sans-serif;
font-size: 36px;
}
.J {
text-align: center;
}
.J {
text-align: center;
}
.Q {
text-align: right;
color: #333;
}
.D {
text-align: right;
}
.J strong {
font-size: 18px;
}
.J strong {
font-size: 24px;
}
.J strong {
font-size: 18px;
}
.J strong {
font-size: 16px;
}
.J strong {
font-size: 18px;
}
.P strong {
text-align: center;
}
.P {
font-size: 18px;
}
.E strong {
font-size: 18px;
}
.E {
font-style: italic;
}
.E {
font-weight: bold;
font-size: 18p&nbsp;&nbsp;&nbsp;&nbsp;<p class="J"><strong>Email:www.Multifactor.us
&n
;
}
.E .E {
font-style: normal;
}
.E .E {
font-weight: normal;
}
.P {
font-size: 16px;
}
.E {
text-align: center;
font-style: normal;
font-weight: normal;
}
.P {font-size: 18px; text-align: center;}
.E {
font-weight: bold;
font-size: 14px;
}
.E {
font-size: 10px;
}
.E {
text-align: center;
}
.P {
font-weight: bold;
}
.w {
font-size: 20px;
}
.d {
text-align: right;
}
.t {
text-align: left;
}
.n {
font-size: 16px;
}
.n {
font-size: 18px;
}
.d {
font-size: 18px;
}
.q {
font-size: 18px;
}
.t {
font-size: 18px;
}
.t1 {
font-size: 18px;
}
.d {
font-size: 18px;
}
</style>

<style>
@media print {
#nav, #about { display: none; }
}

</style>



<p class="M"><img src="john.png" alt="" width="500" height="35" border="0" class="M">
<p class="P"><span class="P">#0005 Juan C. Legaspi St., Ubaldo Laya Iligan City</span></p>
<p class="P"><span class="P">Phone No./Fax063)225-4</span>98</span></p>
<p class="P"><span class="P">Email: www.Multifactors.us</span></p>
<p class="P">&nbsp;</p>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp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nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<TABLE align=right>
<tr>
<td>

</td> <td>

<form action="addqoute.php" method="POST" id="insertx"> 

<p align="justify" class="C"><B> QOUTATION:&nbsp;&nbsp;&nbsp;&nbsp;</B><select name="quotation">

<?php
$host="localhost"; // Host name 
$username=""; // Mysql username 
$password=""; // Mysql password 
$db_name=""; // Database name 
$tbl_name=""; // Table name 

// Connect to server and select database.
mysql_connect("$host", "$username", "$password")or die("cannot connect"); 
mysql_select_db("$db_name")or die("cannot select DB");
$sql="SELECT * FROM $tbl_name";
$result = mysql_query($sql);
while($row = mysql_fetch_array($result))
{
echo "<option value=\"".$row['id']."\">".$row['QOUTATION']."</option>\n ";
}
?>
</select>


</form>
</td>
</tr>
</TABLE>

<form name="form2" method="post" action="">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&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sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

<script type="text/javascript">
tday =new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
tmonth=new Array("January","February","March","April","May","June","July","August","September","October","November","December");

function GetClock(){
d = new Date();
nday = d.getDay();
nmonth = d.getMonth();
ndate = d.getDate();
nyear = d.getYear();
nhour = d.getHours();
nmin = d.getMinutes();
if(nyear<1000) nyear=nyear+1900;

if(nhour == 0) {ap = " Am";nhour = 12;} 
else if(nhour <= 11) {ap = " Am";} 
else if(nhour == 12) {ap = " Pm";} 
else if(nhour >= 13) {ap = " Pm";nhour -= 12;}

if(nmin <= 9) {nmin = "0" +nmin;}


document.getElementById('clockbox').innerHTML=""+tday[nday]+", "+tmonth[nmonth]+" "+ndate+", "+nyear+" "+nhour+":"+nmin+ap+"";
setTimeout("GetClock()", 1000);
}
window.onload=GetClock;
</script>
<div id="clockbox" align="RIGHT"></div>

<p align="justify" class="c">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B> TO:</B> <select name="comcountry">

<?php
$host="localhost"; // Host name 
$username="root"; // Mysql username 
$password="123"; // Mysql password 
$db_name="simulation"; // Database name 
$tbl_name="country"; // Table name 

// Connect to server and select database.
mysql_connect("$host", "$username", "$password")or die("cannot connect"); 
mysql_select_db("$db_name")or die("cannot select DB");
$sql="SELECT * FROM $tbl_name";
$result = mysql_query($sql);
while($row = mysql_fetch_array($result))
{
echo "<option value=\"".$row['ID']."\">".$row['COUNTRY']."</option>\n ";
}
?>
</select> 

<p align="justify" class="w">&nbsp;&nbsp;&nbsp;&nbsp; We are glad to receive your Quotation.</p>



<?php

$host="localhost"; // Host name 
$username="root"; // Mysql username 
$password="123"; // Mysql password 
$db_name="simulation"; // Database name 
$tbl_name="simutable"; // Table name 

// Connect to server and select database.
mysql_connect("$host", "$username", "$password")or die("cannot connect"); 
mysql_select_db("$db_name")or die("cannot select DB");

// select record from mysql 
$sql="SELECT * FROM $tbl_name";
$result=mysql_query($sql);

?>

<style type="text/css"> 
table.Tablex { margin-left: auto; margin-right: auto; border: 2px solid #FFFFFF;
background-color: #FFFFFF; border-collapse: collapse; font-size: 80%; color: #000000; 
width:148px; } table.Tablex td, table.Tablex th { border: 1px solid #545468; padding: 5px;
} 
table.Tablex th { font-size: 100%; font-weight: 600; color: #FFFFFF; background-color: #79AF7A; 
} 

</style> 


<table width="1000" border="0" cellspacing="1" cellpadding="0" class="Tablex" align="right">
<tr>
<td><table width="950" border="0" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF" style="table-layout:fixed">
<tr class="trx" height=30>

<th align="center" class="head"><strong>ITEM</strong></th>
<th align="center" class="head"><strong>QUANTITY</strong></th>
<th align="center" class="head"><strong>UNIT</strong></th>
<th align="center" class="head"><strong>DESCRIPTION</strong></th>
<th align="center" class="head"><strong>UNITPRICE</strong></th>
<th align="center" class="head"><strong>TOTALPRICE</strong></th>
</tr>
<br>
<?php
while($rows=mysql_fetch_array($result)){
?>
<style type="text/css">
<!--

a {
border-bottom: 0px ;
text-decoration: none;
}

a:hover {
position: relative;
}

a span {
display: none;
}

a:hover span {
display: block;
position: absolute; top: 15px; left: 0;
padding: 7px; margin: 10px; z-index: 100;
background: #FFE783; border: 0px #c0c0c0;
opacity: 0.9;

}

-->
</style>



<tbody class="1">
<tr class="xux">

<td bgcolor="#FFFFFF" style="white-space:pre-wrap;white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word"><CENTER><? echo $rows['ITEM']; ?></CENTER></td>
<td bgcolor="#FFFFFF" style="white-space:pre-wrap;white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word"><CENTER><? echo $rows['QUANTITY']; ?></CENTER></td>
<td bgcolor="#FFFFFF" style="white-space:pre-wrap;white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word"><CENTER><? echo $rows['UNIT']; ?></CENTER></td>
<td bgcolor="#FFFFFF" style="white-space:pre-wrap;white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word"><CENTER><a href="phpmysql.php?id=<? echo $rows['ID']; ?>"><? echo $rows['DESCRIPTION']; ?><span><? echo $rows['DESCRIPTION']; ?></span></CENTER></td>
<td bgcolor="#FFFFFF" style="white-space:pre-wrap;white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word"><CENTER><? echo $rows['UNITPRICE']; ?></CENTER></td>
<td bgcolor="#FFFFFF" style="white-space:pre-wrap;white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word"><CENTER><? echo $rows['TOTALPRICE']; ?></CENTER></td>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</tr>
</tbody>
<?

// close while loop 
}

// close connection; 
mysql_close();

?> 
</table></td>
</tr>

</table>




<BR>
<BR>
<BR>
<BR>
<BR>

<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>


-------------------------------------- <!-- this one-->-----------------------------


<form name="moose" action="" id='moose'>



<input name="num" id='num' type="text" value="100" style="font-family:verdana;font-size:10pt;width:200px;" maxlength="315">

<input type="button" value="Convert" style="width:80px;font-family:Tahoma;font-size:10pt;" onclick='totext()'>

<div id="output" style="padding:1px 0 8px 0;"></div>




</form>
----------------------------------<!--and this one-->----------------------------





<script type="text/javascript">




var units=new Array("one","two","three","four","five","six","seven","eight","nine");

var teens=new Array("ten","eleven","twelve","thirteen","fourteen","fifteen","sixteen","seventeen","eighteen ","nineteen");

var tens=new Array("twenty","thirty","forty","fifty","sixty","seventy","eighty","ninety");

var illions=new Array('m','b','tr','quadr','quint','sext','sept','oct','non','dec','undec','duodec','tredec','quattuordec','quindec','sexdec','septendec','octodec','novemdec','vigint','unvigint','duovigint','trevigint','quattuorvigint','quinvigint','sexvigint','septenvigint','octovigint','novemvigint','trigint','untrigint','duotrigint','tretrigint','quattuortrigint','quintrigint','sextrigint','septentrigint','octotrigint','novemtrigint','quadragint','unquadragint','duoquadragint','trequadragint','quattuorquadragint','quinquadragint','sexquadragint','septenquadragint','octoquadragint','novemquadragint','quinquagint','unquinquagint','duoquinquagint','trequinquagint','quattuorquinquagint','quinquinquagint','sexquinquagint','septenquinquagint','octoquinquagint','novemquinquagint','sexagint','unsexagint','duosexagint','tresexagint','quattuorsexagint','quinsexagint','sexsexagint','septsexagint','octosexagint','novemsexagint','septuagint','unseptuagint','duoseptuagint','treseptuagint','quattuorseptuagint','quinseptuagint','sexseptuagint','septseptuagint','octoseptuagint','novemseptuagint','octogint','unoctogint','duooctogint','treoctogint','quattuoroctogint','quinoctogint','sexoctogint','septoctogint','octooctogint','novemoctogint','nonagint','unnonagint','duononagint','trenonagint','duattuornonagint','quinnonagint','sexnonagint','septnonagint','octononagint','novemnonagint','cent','cenunt','duocent','centret');

function smallNum(num, mag){

var a=num.charAt(0);

var b=num.charAt(1);

var c=num.charAt(2);

var s="";

if (a!=0) {

s+=units[a-1] + " hundred";

if (b==0 && c==0) return s;

else s+="&nbsp;";

}

if (b==0) {

if (c==0) return "";

return s+units[c-1];

}

if (b==1) {

return s+teens[c];

}

if (b>1) {

s+=tens[b-2];

if (c>0) s+="-" + units[c-1];

return s;

}

}

function fixChars(){

var subject=document.getElementById('num');

var str=subject.value;

var str2="";

var L=str.length;

var t;

var f=false;

for (var i=0; i<L; i++) {

t=str.charAt(i);

if (t*1==t) {

if (t!=0) f=true;

if (f) str2+=t;

}

}

if (str2=="") str2="0"

subject.value=str2;

}

function totext(){
 alert('asdf');

fixChars();

var s=document.getElementById('num').value;

if (s.length>315) {

alert("Your number is "+s.length+" digits long.\nThe maximum length is 303 digits.");

return false;

}

var r="", temp="";

while(s.length%3>0)s="0"+s;

var max=Math.ceil(s.length/3);

for (var i=0; i<max; i++) {

temp=smallNum(s.substr(i*3, 3));

if (temp!="") {

if (max-i==1 && r!="" && s.substr(i*3, 3)<100) ;

else if (r!="") r+="&nbsp;";

if (max-i==2) temp+=" thousand,";

if (max-i>2) temp+=" "+illions[max-i-3]+"illion,";

}

r+=temp;

}

if (s==0) r="zero";

r=r.charAt(0).toUpperCase()+r.substring(1,r.length)+".";

document.getElementById("output").innerHTML=r;

return false;

}

// End -->

</script>





<form name="form5" method="post" action="">
<strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;TERMS:</strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input type="text" name="text" size="20" style="border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(126, 157, 185); border-right-color: rgb(126, 157, 185); border-bottom-color: rgb(126, 157, 185); border-left-color: rgb(126, 157, 185); padding-top: 2px; padding-right: 2px; padding-bottom: 2px; padding-left: 2px; ; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(235, 255, 255); background-position: 0% 50%; background-repeat: no-repeat no-repeat; ">



</form>
<form name="form6" method="post" action="">
<strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DELIVERY POINT:</strong>
<input type="text" name="text" size="20" style="border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(126, 157, 185); border-right-color: rgb(126, 157, 185); border-bottom-color: rgb(126, 157, 185); border-left-color: rgb(126, 157, 185); padding-top: 2px; padding-right: 2px; padding-bottom: 2px; padding-left: 2px; ; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(235, 255, 255); background-position: 0% 50%; background-repeat: no-repeat no-repeat; ">
</form>








</body>


</html>

Edited by urtrivedi: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.