?
Solved

i want to pass info from one page to onther using the post command but

Posted on 2008-10-07
3
Medium Priority
?
171 Views
Last Modified: 2011-09-20
i want to pass info from one page to onther using the post command but i want the info to be passed when i click on a link and not on a button
for example
-------------------------------------------------------------------------------------------------------------
 <form id="form1" name="form1" method="post" action="test33.php">
  1
</form>
-------------------------------------------------------------------------------------------------------------
i wanted to pass the info to test33.php when i click on the number 1
is that posible?
0
Comment
Question by:mgtm3
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 11

Accepted Solution

by:
kelvinwkw earned 1000 total points
ID: 22665486
<script>
function do_onClick(obj){
obj.submit();
}
</script>

<a href='#' onclick='do_onClick(document.form1);'/>
0
 
LVL 11

Expert Comment

by:kelvinwkw
ID: 22665490
<script>
function do_onClick(obj){
obj.submit();
}
</script>


 <form id="form1" name="form1" method="post" action="test33.php">
<a href='javascript:void(0);' onclick='do_onClick(document.form1);'>1</a>

</form>
0
 
LVL 3

Assisted Solution

by:DerkArts
DerkArts earned 1000 total points
ID: 22667202
or even shorter:

 <form id="form1" name="form1" method="post" action="test33.php">
  <a href='javascript:void(0);' onclick='document.form1.submit()'>1</a>
</form>

if you change the form name, you need to change the form name in the onclick action!
0

Featured Post

WordPress Tutorial 4: Recommended Plugins

Now that you have WordPress installed, understand the interface, and know how to install new parts, let’s take a look at our recommended plugins.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Suggested Courses

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question