|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Use a link to submit?
I want to make a link submit the form it's in. I thought I might be able to do something like this but I'm having trouble.
<a href="#" onClick="javascript:this.form.submit()" name="_go">link name<a/> Any hints will be appreciated. |
|
#2
|
|||
|
|||
|
RE: Use a link to submit?
|
|
#3
|
||||
|
||||
|
RE: Use a link to submit?
You need to change the second action to method but this is nice code.
B |
|
#4
|
||||
|
||||
|
RE: Use a link to submit?
If you put a value in the () will that be the value of the submit variable on the next page?
B |
|
#5
|
|||
|
|||
|
RE: Use a link to submit?
no, if you want to submit a key/value, you would use a hidden input
<input type="hidden" name"key" value="value"> |
|
#6
|
|||
|
|||
|
RE: Use a link to submit?
Does this aproach work in all browsers?
|
|
#7
|
|||
|
|||
|
RE: Use a link to submit?
One tiny, innocent word ... "all".
I know I am not going to say yes, heck I know of 8 browsers of the top of my head ... not including all the different versions of those eight. How about this answer: it should work with browsers that support javascript _AND_ the user has it enabled. |
|
#8
|
||||
|
||||
|
RE: Use a link to submit?
Could this be used to submit to a new window?
|
|
#9
|
||||
|
||||
|
RE: Use a link to submit?
I have always used a different approach but I believe you can have a target attribute in your <form> tag.
Additionally if your hyperlink is inside the form it can be <a href="javascript:submit();">click me</a> |
|
#10
|
|||
|
|||
|
RE: Use a link to submit?
<form method="post" action="<a target="_blank" href="http://www.yourdomainname.com/filename.php">
|
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Client Side Things > Use a link to submit? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|
|