Jump to content

DickDeeds

Members
  • Content Count

    9
  • Joined

  • Last visited

Community Reputation

0 Neutral

About DickDeeds

  • Rank
    Newbie
  1. First,Thanks for the response.I tried using $_SESSION variables in both the class model and the php module. So I guess my question(s) are:1. How do you compare?? That shows I don't really understand what the browser is doing. Evidently, it does not cycle through the php or class modules.2. How do you redirect?TIA###### Deeds
  2. I've written a program that deals with finances. The entry page (datain.php) calls a class (datarec.cls) to record each entry and then returns to datain.php for the next entry.The problem, after recording if somone hit the refresh or back button it records an addition entry each time the button is pressed. Obviously, this is extremely dangerious in a financial program.Does anyone have code or a method to prohibit this?TIA,###### Deeds
  3. Hi all,If I have a number like 300, how do I format that to show 300.00? I handle bad numbers like 300.138723 using: x=Math.round(Number(document.frm_journal_entry.debit1.value)*100)/100; document.frm_journal_entry.debit1=x;but cannot find a function like instr to look for a period.Any help would be apprecieated.TIADickDeeds
  4. I have to get start and end times for volunteer workers. I use an input tag in php where I ask for the time in an hour minute format (hh:mm). I can't seem to separate the string into hours and minutes in the javascript function. Below is the last code I tried. I also tried explode() with no results. I get the error:hr has no properties hr = strCan anyone give me some help?TIA,###### Deeds<script language="javascript" type="text/javascript"><!-- hide the script for older browsersfunction checktime($which){var pos=0;var i, j=0;var str;var hr;var min;switch ($which) { case 1: str=document.frm_volunteer_hours.starttime.value; alert(str); for (i=0; i<str.length;i++) { if (pos>"0") min[j++]=str; if (str==":") { pos=i; i=str.length; } if (pos=="0") hr=str; } break; }}--></script>
  5. I have a large program requiring many different reports. These reports span many pages. I cannot find much information about printing from HTML/XHTML. The program is generated using PHP. The only way I can pring now is to use the browser print function. Is there a way to force a page break on a page so that the report can be paged logically?I see "printer friendly" versions on some web pages.Q. Can anyone steer me to a place were I can get information for printing, printer friendly and/or a program that can interface which will allow the reports to be formatted?TIA,###### Deeds
  6. I have a problem accessings information in a accounting program. I have to know what type of account in order to insure accurate entries. The type is shown by the value in the fields below. The number of fields will depend on the client.<input type="hidden" name="hid0" id="hid0" value="L"><input type="hidden" name="hid1" id="hid1" value="A"><input type="hidden" name="hid2" id="hid2" value="R"><input type="hidden" name="hid3" id="hid3" value="E"><input type="hidden" name="hid4" id="hid4" value="R"><input type="hidden" name="hid5" id="hid5" value="A">..... on to end, end found from database.I’ve been using this code in the java script:$what="hid0";var tt=getElementById("hid0").value;alert("tt="+tt);But the alert NEVER shows up. I have to use the $what because the number of hiddens is unknown so I have to build the call in code like:Var tt=getElementById($what).valueNeither works.Can anyone help?###### Deeds
  7. To all, I have a large program where I need to print reports. I'm using php, javascript Ajax and mysql. I have a library oif php books but cannot find information on printing and formatting a report.Can anyone steer me to a book or information on how to do this?TIA,######
  8. Hi all,Below is the code and what is returned from the code. Even though I'm using the request.responseXML I get the message:[Object HTMLCollection]. It obtains the data correctly and inserts it into the XML code. Can you help??PHP function writing the code from databaseheader("Content-Type: text/xml");echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n";echo "<inform>\n";echo "<From_Date>" . $rr['PP_From_Date'] . "</From_Date>\n";echo "<To_Date>" . $rr['PP_To_Date'] . "</To_Date>\n";echo "<Pledge_Amount>" . $rr['PP_Pledge_Amount'] . "</Pledge_Amount>\n";echo "<Contribution_Amount>" . $rr['PP_Contribution_Amount']. "</Contribution_Amount>\n";echo "</inform>";Javascript using the request object. alert(request.responseText); var xmlDoc = request.responseXML; var From_Date = xmlDoc.getElementsByTagName("From_Date"); document.frm_pledge_pledged.From_Date.value=From_Date; var To_Date = xmlDoc.getElementsByTagName("To_Date"); document.frm_pledge_pledged.To_Date.value=To_Date; alert("From="+From_Date+" To="+To_Date);From requequest.responseText From request.responseXML TIA,###### Deeds
  9. I have a function that was working OK and now does not seem to respond at all. Here is some of the code:$one=”1”;Amount #1 <input type="text" id="amount1" name="amount1" onblur="getremainder($one);" onfocus="setback(this);" disabled value="'.$amount1.'"><script language="javascript" type="text/javascript"><!-- hide the script for older browsersfunction getremainder(iwhich){var total;alert("in getremainder");if (!isNaN(document.frm_collection.amount))amount=0;elseamount=document.frm_collection.amount.value;amount = parseFloat(amount);amount1=0;amount2=0;amount3=0;amount4=0; …….I tried just (1) in the onblur call as well as (\'1\') and (\"1\"). I put the alert statement ("in getmemainder") and it never shows nor does the logic work any longler. No code was changed in the function since it was working.Q1. Can you have more than one call in the <input tag-onblur="getremainder($one);" onfocus="setback(this);" ?If you can, any ideas why the function does not respond??TIA###### Deeds
×
×
  • Create New...