nd3_2000 Posted August 17, 2009 Share Posted August 17, 2009 Hi guys am having a real problem right now, I need to pass a calander control to another page and I cant seem to get it to read the ID of the text box the value is being placed into..... Here is the code <td colspan="2" align="left"><input name="Datelogged" type="text"value ="Click Select" size="15" id="Datelogged" /> <a href="#" name="anchor1" class="style1" id="anchor1" onclick="cal.select (document.forms[0].Datelogged,'anchor1','yyyy-MM-dd'); return false;">select</a></td> </tr> <a href="CompleteProof.php?JobNumber=<?php echo $JobNo; ?>&ProofDate=<?php echo DateLogged; ?>"></BR>[Complete Proof]</a></BR></BR></BR> All I keep getting is this, its just passing through the word Datelogged NOT the date value that is in the text box http://www.xxxxxxxxx.co.uk/CompleteProof.php?JobNumber=PFAug25&ProofDate=DateLogged Quote Link to comment Share on other sites More sharing options...
infiniteacuity Posted August 17, 2009 Share Posted August 17, 2009 Put a $ sign in from of DateLogged if you want it to be a variable. Also, this should be posted in the programming section as it isn't really related to HTML. Quote Link to comment Share on other sites More sharing options...
haku Posted August 18, 2009 Share Posted August 18, 2009 Show us the opening form tag. Quote Link to comment Share on other sites More sharing options...
nd3_2000 Posted August 18, 2009 Author Share Posted August 18, 2009 Apologies if this is in the wrong section Im a newbie and novice here! Another user suggested this an event handler, which I copied! function processClick(jobNo){ window.location = "CompleteProof.php?JobNumber=" + jobNo + "&ProofDate=" + document.getElementById('DateLogged').value; } and then calling that viia this <button type="button" onclick="processClick(<?php echo $JobNo; ?>)">Complete Proof</button><br /><br /> which I can sort of get my head around, yet now when I click on the button it gets an error of GP456 is undefined where GP456 is the job number I am sending through Quote Link to comment Share on other sites More sharing options...
haku Posted August 18, 2009 Share Posted August 18, 2009 Show us the opening form tag. ... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.