Jump to content

mickeymouse

Members
  • Content Count

    56
  • Joined

  • Last visited

Community Reputation

0 Neutral

About mickeymouse

  • Rank
    Newbie

Previous Fields

  • Languages
    English

Profile Information

  • Location
    France & Canada
  • Interests
    Databased Webs development

Recent Profile Visitors

909 profile views
  1. The third section of code below gave me some results (some amounts) but these were incomplete so I coded the first (TEMP) section to list my rows for debugging purposes. When I did that, the results in my third section all changed to 0 amounts. So, for further debugging purposes, I coded section 2. Section 1 listed my rows but section 2 did not list any rows - only the "LIST2" & "END2". I don't understand why, I get 0 amounts nor why section 2 wont list. (I don't think I have coding errors). //TEMP SECTION 1 -------------------------- print("List1<br>"); $rowcnt=$AffectedRows; $myResults=$Results; while ($rowa = mysql_fetch_row($myResults)) {print("$rowa[0] / $rowa[1] / $rowa[2] / $rowa[3] / $rowa[4] / $rowa[5] / $rowa[6] / $rowa[7] / $rowa[8]<br>");} print("END1<BR>"); //TEMP=========================== //TEMP SECTION 2 -------------------------- print("LIST2<br>"); $rowcntx=$AffectedRows; $myResults=$Results; while ($rowx = mysql_fetch_row($myResults)) {print("$rowx[0] / $rowx[1] / $rowx[2] / $rowx[3] / $rowx[4] / $rowx[5] / $rowx[6] / $rowx[7] / $rowx[8]<br>");} print("END2<BR>"); //TEMP=========================== SECTION 3---------- for ($loop=1;$loop<($AffectedRows+1);$loop++) {while ($row = mysql_fetch_row($Results)) {if($row[8]=="b") {$BBal[$row[4]] = ($BBal[$row[4]] - $row[3]); $BBal[$row[5]] = ($BBal[$row[5]] + $row[3]);} else{$Bal[$row[4]] = ($Bal[$row[4]] - $row[3]); $Bal[$row[5]] = ($Bal[$row[5]] + $row[3]);}}} ...print results...
  2. Upon loading, the code works. My form area get highlighted with yellow. In the second case, Java goes through the code but my area does not get highlighted. I also tried calling myload function but that also didn't work - maybe not doing it the right way. <style type='text/css'> .start-here {background-color: yellow;} </style> <script type='text/javascript'> //======================================= function myload() //This code does it's job of highlighting my form starting at field 'all' {var c = document.ReportsForm.all; c.focus(); c.parentNode.className = 'start-here'; c.onblur = function() {this.parentNode.className = '';} } //====================================== function formcheck(myform) {if (all.checked || .checked || liab.checked || inc.checked || exp.checked){;} else {alert('A Type of Account must be selected.'); //This alert takes place. var c = document.ReportsForm.all; // this code has no results c.focus(); // " c.parentNode.className = 'start-here'; // " c.onblur = function() // " {this.parentNode.className = '';} // " alert('TEST IF REACHED'); //This alert takes place. return false } } //=============================================== function formcheck(myform) {if (all.checked || .checked || liab.checked || inc.checked || exp.checked){;} else {alert('A Type of Account must be selected.'); //This alert takes place. window.myload() //This did not result in highlighting. return false } }
  3. byyr contains 20. If I add 1, I get 201 (wrong result). (See first set of code below) If I multiply by 5, I get 100 (correct result). (See second set of code below) If I multiply by 1, I get 100 (correct result). According to documentation, a + in Java Script is addition. I have spent over 2 hrs trying to figure out what was wrong with my (more complicated) coding. Please, please, tell me why addition doesn't work. function mytab(byyr,bymo,mo,fld,to) {with (byyr, bymo, mo, fld, to) var x = byyr.value var y = x + 1; alert(y);} function mytab(byyr,bymo,mo,fld,to) {with (byyr, bymo, mo, fld, to) var x = byyr.value; var y = x * 5; alert(y);}
  4. Is it possible to style the "alert", I.e., make the message RED and /or make the message font size 14 or the text bold?
  5. Thanks. I made the corrections and all is OK now. However, if frame="box" is obsolete, how do I get a box?
  6. I've corrected the error(s) and put everything as Table attributes and so I get the correct results except for the width - it doesn't work. I just can't understand why not and can't see anything wrong with my attribute spec. I use the same thing in other pages and it works fine. <table cellpadding='10' cellspacing='0' frame='box' width='40%' border='1px'; border-color='Blue' background-color='lavendure' align='center'> P.S. All the best to you in 2020!
  7. I'm using the following according to dsonesuk advice and it works fine.. To pass the parameter: function ancester(myparam) {if(myparam==''){return false;} location.href='FT_Search2.php?param='+myparam;return false; window.open(location.href); return false;} To get the parameter: {$reqref=$_GET['param'];} Thanks for the help!
  8. I'm not getting a frame and I'm not getting a width of 40% but a very large width wider than my screen. Why? <table style='cellpadding:10; cellspacing:0; align:center; width:40%; frame:box; border:1; bordercolor:Blue'; background-color:lavendure' > Same thing with <table cellpadding:10; cellspacing:0; align:center; width:40%; frame:box; border:1; bordercolor:Blue; background-color:lavendure >
  9. It's not a case of "just thinking". There is a decision making via the "if" statement so I don't see why there shouldn't be a facility to go to a new page based on the decision. One should be able to do "anything" without human intervention. However, it seems that is not possible with website programming - something I consider a deficiency. Nonetheless, thanks for your help!
  10. How do I open a new page (replacing the current one) in inline code, i.e. without the need to click something? e.g., if(x=y) open new page else{continue....
  11. mickeymouse

    Baffling CSS

    I just can't understand what's going on. At the bottom of this post is my results - which doesn't follow at all the CSS and I have no idea where the blue bordered incorrect sized box comes from. I did the Inspect Element thing but can't see any answers in there. Would much appreciate your help. Here is a sample code of my page followed by the code of my HA_StyleA.css file. <?php session_start(); print(" <html lang=\"en\"> <head><title>Index</title></head> <link rel=\"stylesheet\" href=\"HA_StyleA.css\" type=\"text/css\" /> <script language=JavaScript> </script><noscript>Your browser does not support JavaScript!</noscript><body> "); //========================================================================================================== print(" <form name=\"Company\" action=\"HA_LogInCheck.php\" method=\"POST\" onsubmit=\"return formcheck(Company)\"> <br><br><br><center> <p class='onea'> <br> <font size=3 Color=\"Crimson\"><b> This is my test data.<br> The quick brown fox jumped over the lazy dog's back.<font Color=\"blue\"> Mary had a little lamb and was the doctor upset!<br> </b><font color=\"black\"> The quick brown fox jumped over the lazy dog's back. <br><br> </p> </body></html>"); ?> //Following is my HA_StyleA.css file code: .onea {max-width: 80%; border-style: solid; border-width: 2px; border-color: transparent; padding-left: 5px; padding-right: 5px; text-align: left}
  12. I have date 2019-02-01 and I need to subtract x days from it. I believe I first need to convert my date to timestamp, subtract my x days, and convert back to my date format. If that's correct, how do I convert to timestamp? (Just can't find it in documentation.) Tks
  13. It takes 18/20 seconds to execute this code when I click my Submit Button- much much too long. Why? Also, why does it not pass focus to my "Submit" button upon completion? function formcheck(myform) {with (myform) if (yy.value.length!=2){alert('Year must be 2 digits.');yy.select();return false;} if (mm.value.length!=2){alert('Month must be 2 digits.');mm.select();return false;} if (dd.value.length!=2){alert('Day must be 2 digits.');dd.select();return false;} if (dd.value<'01' || dd.value>'31'){alert('Invalid Day.');dd.select();return false;} if (mm.value<'01' || mm.value>'12'){alert('Invalid Month.');mm.select();return false;} if (yy.value<'01' || yy.value>'99'){alert('Invalid Year.');yy.select();return false;} if (((mm.value == '04' || mm.value == '06' || mm.value == '09' || mm.value == '11') && dd.value > '30') || mm.value == '02' && dd.value > '29'){alert('Invalid Day for Month or visa versa.');dd.select();return false;} alert{'Finished');return false;}}}}}} <-------- Temporary in order to time the process. else{sub.focus;return true;}}}}}} <-------- Normal code to pass focus to "Submit" button BUT doesn't work! <form name=\"DateSetting\" action=\"HA_DateSet.php\" method=\"post\" onsubmit=\"return formcheck(DateSetting)\"> YY <input style='text-align:center;width:30' name='yy' id='yy' required MaxLength=2 onkeyup='mytab(yy,mm)'> &#160;MM <input style='text-align:center;width:30' name='mm' id='mm' required MaxLength=2 onkeyup='mytab(mm,dd)'> &#160;DD <input style='text-align:center;width:30' name='dd' id='dd' required MaxLength=2 onkeyup='mytab(dd,sub)'>
  14. The link you gave me is not at all clear. It only gives an example instead of explaining/teaching. However, I came up with the following and it works: <style> @media print {.noprint {display: none !important;}} </style> <input type=\"button\" value='Print' class='noprint' onclick='myprint()'> function myprint() {window.print();} Thanks for your help.
×
×
  • Create New...