Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2008-10-07
3
Medium Priority
?
174 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this. Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it i…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Suggested Courses

604 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