Jump to content

Getting value of text ID wont show when passing to next page


nd3_2000

Recommended Posts

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.