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 Link to comment https://forums.phpfreaks.com/topic/170666-getting-value-of-text-id-wont-show-when-passing-to-next-page/ 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. Link to comment https://forums.phpfreaks.com/topic/170666-getting-value-of-text-id-wont-show-when-passing-to-next-page/#findComment-900228 Share on other sites More sharing options...
haku Posted August 18, 2009 Share Posted August 18, 2009 Show us the opening form tag. Link to comment https://forums.phpfreaks.com/topic/170666-getting-value-of-text-id-wont-show-when-passing-to-next-page/#findComment-900673 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 Link to comment https://forums.phpfreaks.com/topic/170666-getting-value-of-text-id-wont-show-when-passing-to-next-page/#findComment-900768 Share on other sites More sharing options...
haku Posted August 18, 2009 Share Posted August 18, 2009 Show us the opening form tag. ... Link to comment https://forums.phpfreaks.com/topic/170666-getting-value-of-text-id-wont-show-when-passing-to-next-page/#findComment-900961 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.