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

Link to comment
Share on other sites

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.