Jump to content

Posting a link to a text field

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
3 replies to this topic

#1
holla22

holla22

    Newbie

  • Members
  • Pip
  • 2 posts
I'm looking for a easy way that i can make a link that when you click on it, it posts a variable or a number value into a text field. All of this should be done in php.

Do any of you people know how to do this?

Thanks:confused:

#2
John

John

    Writes binary right handed and hex left handed

  • Moderators
  • 6,321 posts
Links cannot 'POST' variables, only forms can. However you can use a link to allow the text field to 'GET' a variable. Do you specifically need to use post?

#3
holla22

holla22

    Newbie

  • Members
  • Pip
  • 2 posts
What i'm trying to do is to have an image map. On the image is blocks with numbers and when you click on one of the blocks it should open a popup and then put that number in the text box on the popup form. You can have a look at this url: Tax Invest Properties

#4
elle

elle

    Newbie

  • Members
  • PipPip
  • 10 posts
It should be a piece of cake.

Javascript solution inside popup:


<textarea id="Message" name="Message" rows="10" cols="10"></textarea>


<script type="text/javascript" language="JavaScript">

<!--

	document.getElementById('Message').value="NUMBER";

-->

</script>


or when generating popup write it directly to textarea from PHP script


<textarea id="Message" name="Message" rows="10" cols="10">

<?php

echo $number_id; /* or via $_GET

?>

</textarea>