i need help here

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
kamsmartx
Forum Newbie
Posts: 21
Joined: Mon Apr 21, 2008 10:03 am

i need help here

Post by kamsmartx »

Now I am on the net for the examination was Halkod de Hua is a Java Sekrepett easy for me to use the following operations: --

Part I:
1 - The collection was selected from the list
2 - to give a numeric value of each type
3 - Grand Show, alternatively, the total
4 - the introduction of Equalization to collect the tax (namely, the addition of 20% of total)

Part II:
1 - Form of boxes of letters and numbers mobilization
2 - box of history and the phone numbers only if the packaging is represented by the emergence of an error message.
3 - Date: mobilized spontaneously and at today's date.
4 - All fields compulsory, unless one of the boxes filled with the emergence of a letter or a reference to the place of the vacuum to be loaded.
5 - What has been selected and loaded Bakhanat, send an email to the virtual test@test.com


Hua code follows:

Code: Select all

function roundNumber (rnum, rlength) (
   var newnumber = Math.round (rnum * Math.pow (10, rlength)) / Math.pow (10, rlength);
   return newnumber;
)
 
function UpdateForm (ID)
(
     ID = ID.replace ('-','_');
     var IDvalue = document.getElementById ( "ctl00_ContentPlaceHolder_DL_" + ID);
     if (IDvalue! = null) document.getElementById ( "ctl00_ContentPlaceHolder_DL_" + ID). selectedIndex = 1;
     UpdateOrderForm ();
)
 
function UpdateOrderForm ()
(
     var CodeList = new Array ( "01_0100", "01_0101", "01_0102", "01_0103", "01_0104", "01_0105", "01_0106", "01_0107", "01_1100", "01_1101",
                             "01_1103", "01_1104", "01_1105", "01_1106", "01_1108", "01_1109", "01_1110", "01_1111", "02_0100", "02_0101"
                             "02_0102", "02_1100", "02_1101", "02_1102", "02_1103", "03_0100", "03_0101");
 
     var ItemValue ='';
     var SubTotal = 0;
   
     document.getElementById ( "ctl00_ContentPlaceHolder_SelectedItemsVar"). value = "";
   
     for (i = 0; i <= 17; i + +)
     (
         ItemValue = document.getElementById ( "ctl00_ContentPlaceHolder_DL_" + CodeList [i]). Value;
         SubTotal = SubTotal + parseInt (ItemValue.substr (10, ItemValue.length-1));
         if (parseInt (ItemValue.substr (10, ItemValue.length-1))! = 0)
         (
             document.getElementById ( "ctl00_ContentPlaceHolder_SelectedItemsVar"). value = document.getElementById ( "ctl00_ContentPlaceHolder_SelectedItemsVar"). value + document.getElementById ( "ctl00_ContentPlaceHolder_DL_" + CodeList [i]). value + ";";
             document.getElementById ( "ctl00_ContentPlaceHolder_DL_" + CodeList [i]). style.background = '# F2F490';
         )
         else document.getElementById ( "ctl00_ContentPlaceHolder_DL_" + CodeList [i]). style.background = '# FFFFFF';
     )
   
     if (SubTotal == 0)
     (
         document.getElementById ( "ctl00_ContentPlaceHolder_DoOrder"). disabled = true;
         document.getElementById ( "SubTotalTD"). innerHTML = "0";
         document.getElementById ( "TotalTD"). innerHTML = "0";
         document.getElementById ( "ctl00_ContentPlaceHolder_TOTALAMOUNT"). value = "0";
     )
     else
     (
         document.getElementById ( "ctl00_ContentPlaceHolder_DoOrder"). disabled = false;
         document.getElementById ( "SubTotalTD"). innerHTML = roundNumber (SubTotal, 1) + "NIS";
         document.getElementById ( "TotalTD"). innerHTML = roundNumber (SubTotal * 1.145,1) + "NIS";
         document.getElementById ( "ctl00_ContentPlaceHolder_TOTALAMOUNT"). value = SubTotal * 1.145;
     )
)
 
function ConfirmOrder ()
(
     if (document.getElementById ( "ctl00_ContentPlaceHolder_TB_FullName"). value == null | | document.getElementById ( "ctl00_ContentPlaceHolder_TB_FullName"). value =="")
     (
         alert ( "Please sign the full name");
         document.getElementById ( "ctl00_ContentPlaceHolder_TB_FullName"). focus ();
         return false;
     )
     else if (document.getElementById ( "ctl00_ContentPlaceHolder_TB_Address"). value == null | | document.getElementById ( "ctl00_ContentPlaceHolder_TB_Address"). value =="")
     (
         alert ( "Please sign the title in the space provided");
         document.getElementById ( "ctl00_ContentPlaceHolder_TB_Address"). focus ();
         return false;
     )
     else if (document.getElementById ( "ctl00_ContentPlaceHolder_TB_PhoneNo"). value == null | | document.getElementById ( "ctl00_ContentPlaceHolder_TB_PhoneNo"). value =="")
     (
         alert ( "Please sign the phone number in the space provided");
         document.getElementById ( "ctl00_ContentPlaceHolder_TB_PhoneNo"). focus ();
         return false;
     )
     else return true;
)
 
 
Now of course I changed the code as Itapq I prefer the needs of the variables and a simple amendment to the code
 
Come on the following problem:
 
I am Whannou usage How do I use Java with the BBC Sekrepett HP or Alehtml
 
Alform Biatmd code that the Java Sekrepett Hua follows:
 

Code: Select all

 
<html>
<head>
<title> test page </ title>
  
     <style type="text/css">
         . body (font: 10pt Tahoma;)
         . Title (color: # 333333; font-weight: bold; margin: 2px;)
         . Capacity (color: # 003366; margin: 3px;)
         . Type (color: # 000000; margin: 3px;)
         . Price (color: # cc0000; margin: 3px;)
         . Order (color: # 003399; font-weight: bold; margin: 3px; text-decoration: none)
         . hover.Order (text-decoration: underline)
         . RightCell (border-left: 1px dashed # EDDCCB; border-bottom: 1px dashed # EDDCCB; padding: 10px 4px 10px 4px; width: 183px; text-align: center);
         . CenterCell (border-bottom: 1px dashed # EDDCCB; padding: 10px 4px 10px 4px; width: 183px; text-align: center);
         . LeftCell (border-right: 1px dashed # EDDCCB; border-bottom: 1px dashed # EDDCCB; padding: 10px 4px 10px 4px; width: 183px; text-align: center);
         . DLClass (font: 10pt Tahoma; width: 150px; margin: 3px; color: # 990000)
     . style1 (color: # FF0000)
     </ style>
     <script src="JScript.js" type="text/javascript"> </ script>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1256"> </ head>
<body style="margin: 0; padding: 0">
     <form name="Form" method=" "action="" id=" "dir="rtl">
<div dir="rtl">
<p dir="rtl">
<input type="hidden" name=" "id="" value=" "/>
</ div>
 
     <div style="text-align: center;" dir="rtl">
       
 
     <table cellpadding="0" style="border-collapse: collapse; width: 620; padding: 2px; direction: rtl" dir="rtl" height="1">
     
         <tr style="height: 30px; background-color: #520306; color: #eeeeee" dir="rtl">
             <td style="width: 67;" dir="rtl" height="1" align="center">
             <p dir="rtl"> <b> figure </ b> </ td>
             <td style="width: 260;" dir="rtl" height="1" align="center">
             <p dir="rtl"> <b> Class name </ b> </ td>
             <td style="width: 278;" dir="rtl" height="1"> </ td>
             <td style="width: 156;" dir="rtl" height="1" align="center">
             <p dir="rtl"> <span lang="ar-jo"> <b> type </ b> </ span> </ td>
         </ tr>
         <tr style="height: 25px;" dir="rtl">
             <td style="border: 1px dashed #C0C0C0; direction: ltr" dir="rtl" width="601" height="1" align="center">
             <p dir="rtl"> 01 </ td>
             <td style="border: 1px dashed #C0C0C0;" dir="rtl" width="259" height="1" align="center">
             <p dir="rtl">
             <span style="font-family: Times New Roman">
             <span lang="en-us"> </ span> piece 1 </ span> </ td>
             <td style="border: 1px dashed #C0C0C0;" dir="rtl" width="277" height="1" align="center">
                 <p align="center"> Type 1 </ td>
             <td style="border: 1px dashed #C0C0C0;" dir="rtl" width="155" height="1">
                 <p dir="rtl">
                 <select name="ctl00$ContentPlaceHolder$DL_01_0100" id="ctl00_ContentPlaceHolder_DL_01_0100" class="DLClass" onChange="UpdateOrderForm()" size="1" dir="ltr">
                   <option value="01-0100#0#0"> none </ option>
                   <option value="01-0100#2#185"> 1st choice </ option>
                                 </ select>
             </ td>
         </ tr>
         <tr style="height: 25px;" dir="rtl">
             <td style="border: 1px dashed #C0C0C0; direction: ltr" dir="rtl" width="601" height="1" align="center">
             <p dir="rtl"> 02 </ td>
             <td style="border: 1px dashed #C0C0C0;" dir="rtl" width="259" height="1" align="center">
             <p dir="rtl">
             <span lang="en-us" style="font-family: Times New Roman"> Bit 2 </ span> </ td>
             <td style="border: 1px dashed #C0C0C0;" dir="rtl" width="277" height="1" align="center"> type 2 </ td>
             <td style="border: 1px dashed #C0C0C0;" dir="rtl" width="155" height="1">
                 <p dir="rtl">
                 <select name="ctl00$ContentPlaceHolder$DL_01_0101" id="ctl00_ContentPlaceHolder_DL_01_0101" class="DLClass" onChange="UpdateOrderForm()" size="1" dir="ltr">
                   <option value="01-0101#0#0"> none </ option>
                   <option value="01-0101#1#370"> 1st choice </ option>
                 </ select>
             </ td>
         </ tr>
         <tr style="height: 25px;" dir="rtl">
             <td style="border: 1px dashed #C0C0C0; direction: ltr" dir="rtl" width="601" height="1" align="center">
             <p dir="rtl"> 03 </ td>
             <td style="border: 1px dashed #C0C0C0;" dir="rtl" width="259" height="1" align="center">
             <p dir="rtl">
             <span lang="en-us" style="font-family: Times New Roman"> piece 3 </ span> </ td>
             <td style="border: 1px dashed #C0C0C0;" dir="rtl" width="277" height="1" align="center">
                 <span lang="ar-jo"> Type 3 </ span> </ td>
             <td style="border: 1px dashed #C0C0C0;" dir="rtl" width="155" height="1">
                 <p dir="rtl">
                 <select name="ctl00$ContentPlaceHolder$DL_01_0102" id="ctl00_ContentPlaceHolder_DL_01_0102" class="DLClass" onChange="UpdateOrderForm()" size="1" dir="ltr">
                   <option value="01-0102#0#0"> none </ option>
                   <option value="01-0102#1#235"> 1st choice </ option>
                   <option value="01-0102#2#333"> 2nd choice </ option>
                 </ select>
             </ td>
         </ tr>
         <tr style="height: 25px;" dir="rtl">
             <td colspan="3" style="text-align: left; padding-left: 10px" dir="rtl" width="601" height="24">
             <p dir="rtl"> Total <span lang="ar-jo"> s non-exhaustive. z. m </ span> </ td>
             <td id="SubTotalTD" style="border: 1px dashed #C0C0C0;" dir="rtl" width="155" height="25">
             <p dir="rtl"> 0 </ td>
         </ tr>
         <tr style="height: 25px;" dir="rtl">
             <td colspan="3" style="text-align: left; padding-left: 10px" dir="rtl" width="601" height="24">
             <p dir="rtl"> Total comprehensive tax <span lang="ar-jo"> <b> </ b> </ span> (20 %+)</ td>
             <td id="TotalTD" style="border: 1px dashed #C0C0C0; color: #990000; font-weight: bold" dir="rtl" width="155" height="25">
             <p dir="rtl"> 0 </ td>
         </ tr>
     </ table>
     <p dir="rtl">
     </ p>
     <table cellpadding="0" style="border-collapse: collapse; width: 611; direction: rtl" dir="rtl" height="170">
         <tr style="height: 30px; background-color: #333333" dir="rtl">
             <td colspan="2" style="color: #eeeeee" dir="rtl" width="610" height="19">
             <p dir="rtl" align="center"> <strong> demand the mobilization of data </ strong> </ td>
         </ tr>
         <tr style="height: 25px;" dir="rtl">
             <td style="width: 86; border: 1px dashed #C0C0C0; text-align: right; padding-left: 10px" dir="rtl" height="25">
             <p dir="rtl" style="text-align: right"> <span lang="ar-jo">
             </ span> Name </ td>
             <td style="border: 1px dashed #C0C0C0; text-align: right; padding-right: 10px;" dir="rtl" width="500" height="25">
             <p dir="rtl">
             <input name="ctl00$ContentPlaceHolder$TB_FullName" type="text" maxlength="30" id="ctl00_ContentPlaceHolder_TB_FullName" style="font: 10pt Tahoma; width: 300px" size="20" /> <span lang = " ar-jo ">
             Maintain </ span>
                 <select name = "ctl00 $ ContentPlaceHolder $ DL_Districts" id = "ctl00_ContentPlaceHolder_DL_Districts" style = "color: # 333333; width: 129; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; font-family: Tahoma; height: 129 ">
                   <option value="city1"> city </ option>
 
                 </ select> </ td>
         </ tr>
         <tr style="height: 25px;" dir="rtl">
             <td style="width: 86; border: 1px dashed #C0C0C0; text-align: right; padding-left: 10px" dir="rtl" height="55">
             <p dir="rtl"> comments - additions </ td>
             <td style="border: 1px dashed #C0C0C0; text-align: right; padding-right: 10px;" dir="rtl" width="500" height="55">
             <p dir="rtl"> <textarea name="ctl00$ContentPlaceHolder$TB_Address" rows="3" cols="20" id="ctl00_ContentPlaceHolder_TB_Address" style="font: 10pt Tahoma; width: 300px"> </ textarea > <span lang="ar-jo">
             </ span> packaging <span lang="ar-jo"> </ span>
                 <select name = "ctl00 $ ContentPlaceHolder $ DL_IsGift" id = "ctl00_ContentPlaceHolder_DL_IsGift" style = "color: # 333333; width: 111; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; font-family: Tahoma; height: 111 ">
     <option value="NO" dir="rtl"> packaging normal </ option>
     <option value="YES" dir="rtl"> packaging for transport </ option>
 
</ select> </ td>
         </ tr>
         <tr style="height: 25px;" dir="rtl">
             <td style="width: 86; border: 1px dashed #C0C0C0; text-align: right; padding-left: 10px" dir="rtl" height="24">
             <p dir="rtl"> date </ td>
             <td style="border: 1px dashed #C0C0C0; text-align: right; padding-right: 10px;" dir="rtl" width="500" height="24">
             <p dir="rtl"> (today's date automatically care about, is subject to adjustment)
               <input name="ctl00$ContentPlaceHolder$TB_Email" type="text" maxlength="100" id="ctl00_ContentPlaceHolder_TB_Email" style="font: 10pt Tahoma; width: 300px" size="20" /> </ td>
         </ tr>
         <tr style="height: 25px;" dir="rtl">
             <td style="width: 86; border: 1px dashed #C0C0C0; text-align: right; padding-left: 10px" dir="rtl" height="25">
             <p dir="rtl"> phone number </ td>
             <td style="border: 1px dashed #C0C0C0; text-align: right; padding-right: 10px;" dir="rtl" width="500" height="25">
             <p dir="rtl">
             <input name="ctl00$ContentPlaceHolder$TB_PhoneNo" type="text" maxlength="30" id="ctl00_ContentPlaceHolder_TB_PhoneNo" style="font: 10pt Tahoma; width: 300px" size="20" /> <span lang = " ar-jo ">
             </ span> Payment <span lang="ar-jo"> </ span>
                 <select name = "ctl00 $ ContentPlaceHolder $ DL_METHOD" id = "ctl00_ContentPlaceHolder_DL_METHOD" style = "color: # 333333; width: 100; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; font-family: Tahoma; height: 100 ">
                   <option value="BANK"> pay </ option>
                   <option value="MASTER"> pay2 </ option>
 
                 </ select> </ td>
         </ tr>
         <tr style="height: 25px;" dir="rtl">
             <td colspan="2" style="height: 25" dir="rtl" width="610">
             <p dir="rtl" align="center">
             <input type = "submit" name = "ctl00 $ ContentPlaceHolder $ DoOrder" value = "send information" onClick = "return ConfirmOrder ();" id = "ctl00_ContentPlaceHolder_DoOrder" style = "font: 10pt Tahoma; color: # 333333;" />
             <p align="center" class="style1" dir="rtl"> information is sent to the default e-mail:
             <p align="center" class="style1" dir="rtl"> test@test.com </ td>
         </ tr>
     </ table>
     <p dir="rtl">
     <input type="hidden" name="ctl00$ContentPlaceHolder$TOTALAMOUNT" id="ctl00_ContentPlaceHolder_TOTALAMOUNT" value="0" />
     <input type="hidden" name="ctl00$ContentPlaceHolder$ORDERID" id="ctl00_ContentPlaceHolder_ORDERID" value="100209094540" />
     <input type="hidden" name="ctl00$ContentPlaceHolder$SelectedItemsVar" id="ctl00_ContentPlaceHolder_SelectedItemsVar" />
     <script type="text/javascript"> UpdateForm ('01-1104');</ script>
 
       </ p>
 
         <div style="width: 800px; margin: 0; line-height: 100%; color: #5A080C; text-align: left" dir="rtl">
           <hr style="color: #AA5B5F; height: 0px; margin: 0px; padding: 0px; border-width:1px 0 0 0; border-top-style: dashed;" dir="rtl" />
           <p dir="rtl" style="text-align: center"> <span lang="ar-jo"> </ span> <span lang="ar-jo">
           </ span> <br/> </ div>
     </ div>
   
<div dir="rtl">
 
     <p dir="rtl">
 
   
</ div> </ form>
</ body>
</ html> 
 
 
 
How the possible benefit of the existing processes Sekrepett Java code and applied to the BBC or Alehtml HP

If the way that I Sekrepett Java developer with difficult or incomprehensible to some people write a wish for me to carry on the way as possible the following operations:

Part I:
1 - The collection was selected from the list
2 - to give a numeric value of each type
3 - Grand Show, alternatively, the total
4 - the introduction of Equalization to collect the tax (namely, the addition of 20% of total)

Part II:
1 - Form of boxes of letters and numbers mobilization
2 - box of history and the phone numbers only if the packaging is represented by the emergence of an error message.
3 - Date: mobilized spontaneously and at today's date.
4 - All fields compulsory, unless one of the boxes filled with the emergence of a letter or a reference to the place of the vacuum to be loaded.
5 - What has been selected and loaded Bakhanat, send an email to the virtual test@test.com


I should be thankful to him
Last edited by Benjamin on Wed Jun 03, 2009 2:14 am, edited 2 times in total.
Reason: Fixed code tags.
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: i need help here

Post by Benjamin »

:arrow: Moved to PHP - Code
kamsmartx
Forum Newbie
Posts: 21
Joined: Mon Apr 21, 2008 10:03 am

Re: i need help here

Post by kamsmartx »

how i can do it

can u help me about this
mattpointblank
Forum Contributor
Posts: 304
Joined: Tue Dec 23, 2008 6:29 am

Re: i need help here

Post by mattpointblank »

No offence, but did you run your post through a translator or something? I can't really tell what you're asking/saying, sorry :(
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Re: i need help here

Post by onion2k »

This is a PHP forum. You need to ask your question on a Java forum. I think.
User avatar
mikemike
Forum Contributor
Posts: 355
Joined: Sun May 24, 2009 5:37 pm
Location: Chester, UK

Re: i need help here

Post by mikemike »

I think he's getting Java and JavaScript confused.
Post Reply