![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Programmer
Join Date: Nov 2005
Location: Estonia
Posts: 94
Rep Power: 0
![]() |
HTML Parameters to document.form.submit()
I have a submit similar to this <input type="submit" class="asdf"....
How can I use the "class=""" with javascript's document.form.submit() or do I have to use some other trick? |
|
|
|
|
|
#2 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
Why don't you just use the name or id?
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#3 |
|
Programmer
Join Date: Nov 2005
Location: Estonia
Posts: 94
Rep Power: 0
![]() |
What name? What id?
I now know that I need the "name=""" attribute included with it. And I do type "document.myformname.submit()" not "document.form.submit()". |
|
|
|
|
|
#4 |
|
Newbie
Join Date: Feb 2006
Posts: 12
Rep Power: 0
![]() |
you want submit your form from jscript code?
then you don't need class property!(and you can't use it for submit method) class is a UI property for HTML elements. |
|
|
|
|
|
#5 |
|
Programming Guru
![]() Join Date: Aug 2005
Location: England
Posts: 1,499
Rep Power: 4
![]() |
|
|
|
|
|
|
#6 |
|
Newbie
Join Date: Feb 2006
Posts: 12
Rep Power: 0
![]() |
yes I know it! for submiting a form should use ID of form but no class property
class property say which class of styles (style tag or CSS file) should apply on element. when I don't understand why(and what) you use class property in submit method Mr/Mrs commodore you can submit your form by a code like this: document.FormName.ElementID.value = 'ElementValue'; //.. and for other form elements document.FormName.method = 'Method Type'; document.FormName.action = 'Action Target'; document.FormName.submit(); //this method gives no parametere |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Basics of HTML Tutorial | crawforddavid2006 | HTML / XHTML / CSS | 14 | Jul 11th, 2006 7:40 AM |
| Basic HTML Tutorial - Reuben Keeney | ReubenK | HTML / XHTML / CSS | 14 | Mar 26th, 2006 5:50 AM |
| HTML =/= Programming | Sane | Coder's Corner Lounge | 32 | Mar 8th, 2006 2:50 AM |
| Python Client for an HTML Server | sabz | Python | 4 | Aug 18th, 2005 7:49 AM |
| Want to upload, show as HTML and other things.... | Invisible | Other Web Development Languages | 4 | Jun 19th, 2005 7:51 PM |