Jump to content


  • Posts

  • Joined

  • Last visited

About smerny

  • Birthday 06/27/1985

Previous Fields

  • Languages
    (x)HTML, CSS, PHP, JavaScript. Always working to improve.

Contact Methods

  • Website URL
  • ICQ

Profile Information

  • Location

smerny's Achievements


Member (2/7)



  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
  • Create New...