Current location: Hot Scripts Forums » Programming Languages » PHP » submit button??


submit button??

Reply
  #1 (permalink)  
Old 07-14-04, 04:39 PM
tcooper tcooper is offline
Newbie Coder
 
Join Date: Nov 2003
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
submit button??

Can I submit a form with a submit button that is NOT located on the form?

I have tried to do this by putting the button on the page and using the following: action="document.form1.submit()"

However, I get an error that says "call to undefined function"

For various reasons (which are hard to explain), I do not want the button on the form.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 07-14-04, 10:56 PM
cmonkey's Avatar
cmonkey cmonkey is offline
Newbie Coder
 
Join Date: Jul 2004
Location: Pittsburgh, PA
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
you could just enclose your entire page code within your form tags, ie:
<body><form....>

[ page code ]

</form></body>

that would give you the freedom to put the submit button where ever you wanted. I can't see what could be gained by trying to accomplish what you mentioned above
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 07-15-04, 05:24 AM
clawdragos clawdragos is offline
Newbie Coder
 
Join Date: Jul 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Please be carefull at that JavaScript syntax. Be sure that you have <form name="form1" action....>
__________________
Free Online Iq Test || Perle
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #4 (permalink)  
Old 07-15-04, 05:46 AM
NeverMind's Avatar
NeverMind NeverMind is offline
Community VIP
 
Join Date: Aug 2003
Location: K.S.A
Posts: 2,257
Thanks: 0
Thanked 2 Times in 1 Post
this is Javascript issue !
anyway, I think you could do this by using a normal bottun any where in your page and add an OnClick event with javascript's function submit()
something like that :
Code:
<input type="button" name="submit" value="Submit" onClick="formname.submit();" />
but I am not sure, tho ..
__________________
PHPSimplicity
We don't need a reason to help people - Zidane [FF9]
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to submit a form using a link, not a submit button? Myke311 HTML/XHTML/XML 3 01-12-05 02:26 AM
submit form with more than one href submit and no submit button adlinfanus JavaScript 1 03-09-04 07:45 AM
POST without submit button AbelaJohnB PHP 5 01-22-04 08:56 AM
image submit button problems Pepe PHP 10 12-22-03 09:15 PM
process form without press submit button azwani JavaScript 1 11-03-03 02:10 AM


All times are GMT -5. The time now is 11:52 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.