Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by smerny

  1. okay... i found the problem and it was something you guys couldn't have seeni had the id of the form but forgot to "name" it
  2. it is now:if(isNaN(num) || num < 5)and still nothing happens
  3. Nothing is happening at all.Here is java script: <script type='text/javascript'> function calcperc() { //Declare and assign values var validNumbers = 'true'; var num = parseFloat(document.prosalform.outputnum.value); if(num.lenth < 1 || isNaN(num) || num < 5) { validNumbers = 'false'; } if (validNumbers == 'false') { document.forms['prosalform'].elements['outputperc'].value = '[NA]'; } else { //Calculate var result = num / 75000; //Change HTML document.forms['prosalform'].elements['outputperc'].value = result; } } </script> here are the relevant parts of html (within form name='prosalform'): Set Actual Salary: <input type='text' name='outputnum' id='outputnum' value='".$emp['current_salary']."' onkeyup='calcperc();' />...Set Percent Increase:<input type='text' name='outputperc' id='outputperc' value='0' onkeyup='calcnum();' /> will add 'calcnum()' after i get 'calcperc()' working
  4. got it working now, with this: SELECT rating, date_of_pr, pr_ID FROM performance_review pr RIGHT OUTER JOIN employee e ON pr.employee_ID = e.employee_id WHERE pr.date_of_pr = (SELECT MAX(date_of_pr) FROM performance_review WHERE employee_ID = pr.employee_ID) AND e.manager_id='".$m_id."'
  5. what that does is return the first instance of each employee_ID in the table along with the most recent date_of_pr stuck on the end.... and then sorted by date_of_pr which is just the date of the first instance of each employee_IDit does not return the rating associated with the most recent date_of_pr for each employee.
  6. well, that would get rid of the syntax error, but there would be a logical error.it would:1) subquery should get a list of employee_ID's of employees who have the correct manager2) selecting from performance_review table where employee_ID is IN that list should return all the records for every review all the employees who's ID shows in that list have ever had3) group all that by employee_ID which would only return the first record in the database for each employee rather than the record with the most recent date4) ordering all those records by date descending would just show order the records of the first instance of each employee
  7. Happy Birthday and thanks for your help.

  8. i have a table with employees which includes their ID and their managers IDand a table with performance_reviews which includes rating, date_of_pr, and employee_ID as FKI want a query that returns the MOST RECENT date_of_pr for every employee who has a certain manager (manager_ID)i don't understand why: "SELECT rating FROM performance_review WHERE employee_ID IN ( SELECT employee_ID FROM employee WHERE manager_ID=".$m_id.") ORDER BY date_of_pr DESC GROUP BY employee_ID"; isn't working for me..1) subquery should get a list of employee_ID's of employees who have the correct manager2) selecting from performance_review table where employee_ID is IN that list should return all the records for every review all the employees who's ID shows in that list have ever had3) ordering all those records by date descending would put those records in order starting with most recent date4) grouping those by employee ID should make it only return the first value for each employee ID? (which - after sorting - would be the most recent)help please
  9. it's working, i just tweaked the background color and location a bit to fit... thanks again dson
  10. well, i'm using tables because the information i am outputting is very tabular type information. i'll try putting the div/ul within a td though and see what happens
  11. actually, this will be in a loop while pulling records from the database and making a table with them.for example, if i were to just show the comment, it would look like while($pr = mysql_fetch_assoc($result)){ echo " <tr> ..... <td>". $pr['comment'] ."</td> ..... </tr>";} but sometimes the comments can be big (paragraphs) and i would rather not stretch my table for that, which is why i would rather have a mouse over that displays the comment within a box... much like the way CSS drop down menus display a list of links
  12. How can I make it so I have text that says "Hoover to View Comment" and when someone puts mouse on that text, it displays a simple box with the comment inside of it?I started to attempt this with this:"<a href='#' class='popup'>Hoover to View Comment</a>"and say the comment is in a php variable named $pr['comment']... i started thinking about the CSS behind this but i don't know how i would make the comment show up.thanks for any help
  13. dson, i haven't been to this site in quite awhile but i always remembered you being real good with javascriptthanks guys, it's working now... however, can i make it so ONLY sel1 shows up at first?
  14. okay it's not working for me, here is what i have..in the head tags: <script type='text/javascript'> function showHide(the_id){ if(the_id == 'rad1'){ document.getElementById('sel1').display='block'; document.getElementById('sel2').display='none'; }else{ document.getElementById('sel2').display='block'; document.getElementById('sel1').display='none'; } } </script> the radios: <input type='radio' id='rad1' name='type' value='normal' selected onclick='showHide(this.id);' /> Normal<br /> <input type='radio' id='rad2' name='type' value='progress' onclick='showHide(this.id);' /> Progress and the selects <select name='score' id='sel1'> <option value='0'></option> <option value='1'>NI (Needs Improvement)</option> <option value='2'>SC -</option> <option value='3'>SC (Successful Contributor)</option> <option value='4'>SC +</option> <option value='5'>EC (Exceptional Contributor</option> </select> <select name='score' id='sel2'> <option value='0'></option> <option value='1'>UP (Unacceptable Progress)</option> <option value='3'>SP (Satisfactory Progress)</option> <option value='5'>OP (Outstanding Progress)</option> </select> it's showing both select menus and not doing anything when i click on the radios
  15. hello end, thanks for your reply.i don't see where you are changing the option values for the score though. the terms are a bit different between the normal and the progress types.Edit: nevermind, I think i see what you are saying.. I'll give it a try. hang on.
  16. I have radio buttons... <input type='radio' name='type' value='normal' selected /> Normal<br /><input type='radio' name='type' value='progress' /> Progress and I would like to make it so that if "normal" is selected, the following is shown next: <select name='score'> <option value='0'></option> <option value='1'>NI (Needs Improvement)</option> <option value='2'>SC -</option> <option value='3'>SC (Successful Contributor)</option> <option value='4'>SC +</option> <option value='5'>EC (Exceptional Contributor</option></select> but if "progress" is selected, this is shown instead: <select name='score'> <option value='0'></option> <option value='1'>UP (Unacceptable Progress)</option> <option value='3'>SP (Satisfactory Progress)</option> <option value='5'>OP (Outstanding Progress)</option></select> I know this can be done using JavaScript, and I have looked a little bit for examples online but couldn't find one that fit this really. Thanks for any help provided.
  17. what type of website? you could search for affiliate programs on websites that are somewhat related to yours... for example, i think posters.com or something like that has an affiliate program where if you refer someone to their site and they buy a poster... same with amazon and hundreds of other websites.
  18. Based on the fact I am taking Stats and Computer Science classes... the one that would be better for me would be better for those classes. What are the differences between these calculators on things that would relate to those type of classes?
  19. They are about the same in price. Which one would be better for me? (and why?) Taking Stats and Computer Science classes.
  20. It seems like i've seen a few different ways to keep track of date/time... I am currently using the datetime field type of mysql and updating it with NOW(), although I'm thinking maybe I should have used UTC_timestamp?I'm just looking for whichever is most practical, efficient, and accurate for storing times for messages and posts and logs and such and being able to find the differences in time between two times or one time and the current time.... and make the time fit for the users timezone preferenceany thoughts/ideas?
  21. http://www.bluehost.com/see if this has what you want
  22. mysql_escape_real_string()
  23. first of all, your input field has to be within a form... and make a submit button...like this <form action='mypage.php' method='post'><input type="text" name="HTMLname" /><input type='submit' name='submit' value='submit'></form> what this code means is that when you hit the submit button, it will load "mypage.php" and give $_POST['HTMLname'] the value that is enteredso on mypage.php you could have the code <?php$PhpVarName=$_POST['HTMLname']; echo "Filled in name : ".$PhpVarName;?> and make sure you spell stuff correct....
  24. what are you trying to do?if you are using a style tag like that, you have to close it (</style>).... but i don't see any styling so again i'm not sure what you are trying to do...should be...<style type='text/css'>[styling code here]</style>or use an external style sheet...
  • Create New...