SitePoint Sponsor |
|
User Tag List
Results 1 to 11 of 11
Thread: Make A Link A Submit Button
-
Sep 25, 2001, 15:17 #1
- Join Date
- Apr 2001
- Posts
- 34
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Make A Link A Submit Button
Is there anyway to make a link act as a submit button?
Any Javascript code one can use for that?
Thanks!
-
Sep 25, 2001, 16:40 #2
- Join Date
- Mar 2000
- Location
- nevada, usa
- Posts
- 636
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
this will work:
Code:<a onClick="yourFormName.reset();">click to reset</a>
"There's no justice like angry mob justice!" --Seymour Skinner
-
Sep 25, 2001, 17:03 #3
- Join Date
- Apr 2001
- Posts
- 34
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Thanks!
Can I do something like;
Code:<a onClick="yourFormName.submit();">click to submit</a>
Tx!
-
Sep 25, 2001, 17:06 #4
- Join Date
- Mar 2000
- Location
- nevada, usa
- Posts
- 636
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
yep, that'll work
edit: you should also include this in your link:
href="javascript:void(0);"
(java script is one word though...)Last edited by cow; Sep 25, 2001 at 17:14.
"There's no justice like angry mob justice!" --Seymour Skinner
-
Sep 25, 2001, 18:12 #5
- Join Date
- Apr 2001
- Posts
- 34
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Thanks for all the help guys!
Where in the link do you place that?
Can you plz write the entire link so I can see?
Tx!!!
-
Sep 25, 2001, 19:09 #6
- Join Date
- Mar 2000
- Location
- nevada, usa
- Posts
- 636
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
no prob, here you go:
Code:<a href="javascript:void(0);" onClick="yourFormName.submit();">click to submit</a>
"There's no justice like angry mob justice!" --Seymour Skinner
-
Sep 25, 2001, 20:37 #7
- Join Date
- Sep 1999
- Location
- Singapore
- Posts
- 854
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Or:
Code:<a href="javascript:yourFormName.submit();">Submit</a>
-
Sep 25, 2001, 22:35 #8
- Join Date
- Apr 2001
- Posts
- 34
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Much obliged everyone!
Tx for your time and help!
-
Oct 7, 2001, 01:47 #9
- Join Date
- Apr 2001
- Posts
- 34
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
So far, that works great!
One lasssst question...
I want to make it that when the form is submitted, it opens in a new window. But, the width should be 418 and the height 450, with no address bar.
Any ideas?
Tx!!!
-
Oct 7, 2001, 09:39 #10
- Join Date
- Apr 2001
- Posts
- 34
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Anyone.. plz?
Tx Again!
-
Oct 8, 2001, 11:28 #11
- Join Date
- Mar 2000
- Location
- nevada, usa
- Posts
- 636
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
add this to your submit button link:
onClick="javascript:void(window.open('location_of_new_window.htm','','width=418,height=480,addressbar=0'))"
of course, you'll want to replace the "location_of_new_window.htm" with the actual location"There's no justice like angry mob justice!" --Seymour Skinner
Bookmarks