SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Mar 2011
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Code Help Needed

    I have this code in a PHP form. Is it possible for me to add some jscript so when I type in 08/29/2011 in the sent_date field & click the calculate button, the "Due to Reviewer" field automatically populates a date -42 days from todays date?


    Code:
    <tr>
    <td>
    <b>Sent Date: MM/DD/YYYY </b><br><input type="text" name="sent_date" size="15" maxlength="30" value="'.$row[8].'" /> 
    </td>
    
    </table>
    
    <p><input type="button" value="Calculate" onclick="return dcheck(this.form);">	
    
    <b>-----------------------------------------------------------</b> <br /><br>
    
    <b>Due to Reviewer:</b><br><input type="text" name="due_rev" size="15" maxlength="30" value="'.$row[10].'" /> <br>
    <br>

  2. #2
    SitePoint Member
    Join Date
    May 2006
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by gjcluttrell@yaho View Post
    I have this code in a PHP form. Is it possible for me to add some jscript so when I type in 08/29/2011 in the sent_date field & click the calculate button, the "Due to Reviewer" field automatically populates a date -42 days from todays date?


    Code:
    <tr>
    <td>
    <b>Sent Date: MM/DD/YYYY </b><br><input type="text" name="sent_date" size="15" maxlength="30" value="'.$row[8].'" /> 
    </td>
    
    </table>
    
    <p><input type="button" value="Calculate" onclick="return dcheck(this.form);">	
    
    <b>-----------------------------------------------------------</b> <br /><br>
    
    <b>Due to Reviewer:</b><br><input type="text" name="due_rev" size="15" maxlength="30" value="'.$row[10].'" /> <br>
    <br>
    are you looking to incorporate it in the function already occuring when you hit calculate?
    Code:
    return dcheck(this.form);


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •