Jump to content

c172cpt

Members
  • Posts

    18
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

c172cpt's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I might try it out thanks for the tip -scott-
  2. do you use an IDE, because i need to if it helps find this stuff, what would you recommend if you do use one right now i do everything in VI in linux
  3. its still not working i dumped the html output into a test.html file and here are the contents it displays fine i need the "Update this call" to call the verify() function <html> <head> <title>Call Logger</title> <script language="Javascript"> function loading(){ var form = document.logger; quick_date(); form.from.value = ""; form.result.value = ""; form.issue.value = ""; } function quick_date(){ var data = document.logger.date.value; var now = new Date(); var monthnumber = now.getMonth()+1; var monthday = now.getDate(); var year = now.getYear(); if(year < 2000) { year = year + 1900; } if(monthnumber < 10){ monthnumber = "0"+monthnumber; } if(monthday < 10){ monthday = "0"+monthday; } var today = monthnumber+"-"+monthday+"-"+year; if (data == "t" || data == "T"){ document.logger.date.value = today; document.logger.from.focus(); } function verify(){ alert("hello"); return false; } </script> </head> <body> <form method="POST" action="updatelog.php" name="logger" onsubmit="return verify();"> <fieldset> <legend>Phone Call logger</legend> <table border="0" width="300"> <tr> <label for="date"><td width="61">Date:</td></label> <td width="225"><input type="text" id="date" name="date" size="31" onfocus="document.logger.date.value = null;" onkeyup = "quick_date();" value="07-07-2008"></td> </tr> <tr> <label for="from"><td width="61">Customer</td></label> <td width="225"><input type="text" name="from" size="31" id="from" value=""></td> </tr> <tr> <td colspan="2"> <input type="radio" name="direction" value="in" ><font color="#FF3333">Incoming</font> <input type="radio" name="direction" value="out" Checked>Outgoing </td> </td> <tr> <label for="length"><td width="61">Result:</td></label> <td width="225"><input type="text" name="result" size="31" id="length" value="Development"></td> </tr> <tr> <td width="286" colspan="2">Issue:<br> <textarea rows="9" cols="34" name="issue">Im working on new features and this is a test record</textarea> </td> </tr> <tr> <td colspan="2"> <p align="center"><input type="submit" value="Update This Call" name="log"><input type="button" value="Reset" name="reset" onclick="loading();"><input type="button" Value="Cancel" name="cancel" onclick="self.close();"></td> </tr> </table> <input type="hidden" name="id" value="227"> </form> <script language="javascript"> function sure(){ msg = "Are you sure you would like to delete this call from the call logger forever?"; return confirm(msg); } </script> <tr> <td colspan="2"> <form action="delete.php" method="post" onsubmit="return sure()"> <input type="hidden" name="id" value="227"> <input type="hidden" name="confirm" value="yes"> <p align="center"> <input type="submit" value="DELETE THIS CALL" name="delete"> </p> </form> </td> </fieldset> </body> </html>
  4. ok i thought that would fix it but for some reason the submit still isnt calling the verify_data() function any ideas?
  5. Its always something simple isnt thank you this has bothered me for hours
  6. What am i not seeing there are 2 JS functions that get called by an onsubmit call (2 separate forms) what should happen is that the "Update this call" should run through a JS verification (right not it should just alert hello for debugging purposes but it doesn't even do that) but the second onsubmit call works just fine with the confirm() below is the code any ideas??
  7. speed is not a problem thank you very much i never thought of the $row++ its always the simple things that stump you it works thank you again -scott-
  8. i need help i cant figure out how to create a 3d array in php from a mysql query the query is: select name, file from images order by rand() limit 0,18 this gives me 18 random rows from the db and i i can sort though all of it with mysql_fetch_array but only one row at a time what i want is all the data at once eg. $answer['row#']['name']['data'] $answer['row#']['file']['data'] essentially i want 36 variables from the one mysql query thanks, -scott-
  9. i cant seem to get any output data from the following structure i have looked it over and over $gresult is the proper mysql result but no output is displayed while($good_data = mysql_fetch_array($gresult)){ $system = $good_data['system']; $port = $good_data['port']; $errcode = $good_data['errcode']; $time = $good_data['time']; $date = $good_data['date']; echo <<<HERE <tr> <td> $system </td> <td> $port </td> <td> $errcode </td> <td> $time </td> <td> $date </td> </tr> HERE; }
  10. so could i use $day1,$day2,$day3...etc..without the ['name']
  11. sorry the output is located at http://orangepeelsoft.com/orange/reports.php?t=username&v=superuser
  12. i am having problems using the baachart class i cant figure out how to get it to display the variables (defined before the following code) $chart = new baaChart(600); $chart->setTitle('Orangepeel Connection Stats','for $value'); $chart->setXLabels($day1['name'],$day2['name'],$day3['name'],$day4['name'],$day5['name'],$day6['name'],$day7['name']); $chart->setXAxis("Past 7 Days"); $chart->setYAxis("Connections",0,100,10,1); $chart->setSeriesColor(1,0,204,255);//successfull color $chart->setSeriesColor(2,0,204,153);//failed color $chart->addDataSeries('C',0,$day1['good'],$day2['good'],$day3['good'],$day4['good'],$day5['good'],$day6['good'],$day7['good'], "Successfull Connections"); $chart->addDataSeries('C',0,$day1['bad'],$day2['bad'],$day3['bad'],$day4['bad'],$day5['bad'],$day6['bad'],$day7['bad'],"Failed Connections"); $chart->drawGraph(); the output is at www.orangepeelsoft.com/orange/reports.php any ideas?? -scott-
  13. that solved my problem thanks, -scott-
  14. im having a problem ive looked around and cant figure it out i have a 95 line switch statement to compleate the task but i want to simplify the code i want to take the current date ("XX") minus 10 days regardless of the month or year and get a new date ex: $past = $today - 10; my issue lies when $past is negitive how can i solve this any ideas -scott-
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.