Make sure you dont have any field or button whose id or name is also
submit as in javascript a function is just another type of object, so
a button or field on the form named 'submit' will hide the forms submit
method and your call to frm.submit() would be trying to refer to the
button which
Try this:
html:form action=/something.do styleId=myFrm
/html:form
input type=button onClick=javascript:callSubmit()
script language=javascript
function callSubmit() {
frm = document.getElementById(myFrm);
frm.submit();
}
/script
Note that styleId attribute
Wjau are you using button? Why not use image?
Neil Erdwien wrote:
I think the piece you're missing is that the input type=button...
tag is only valid inside a FORM element according to the HTML standards.
If I remember correctly from the last time I misplaced the element,
the browsers differ
Michael McGrady wrote the following on 10/10/2004 4:42 PM:
Wjau are you using button? Why not use image?
What's the advantage of using an image in this case? Wouldn't this
require someone to make an image to look like a form button? I'm
probably missing something obvious here:)
--
Rick
Hi, RIck,
I don't understand why this would make someone make an image look like
a form button. I am not sure what that means. All my form buttons are
images. They look however I want them to look. I probably don't see
what you are saying either. We may be coming from different directions
I often use the regular html buttons for various things. Users are used
to seeing these buttons so they know they can click on them. So for
example someone might have a button view logs which doesn't
necessarily submit a form but opens up a pop up window or maybe goes to
some other url. Sure
Hello, again, Rick,
Thanks for the clarification. Your posts are always enlightening and
informative. I mean that. I am not being sardonic in the slightest.
I have to admit that I don't think they look bad either. However, they
do greatly restrict the GUI team. I like my taste but I know
Michael McGrady wrote the following on 10/10/2004 10:09 PM:
I do wonder in this case, however, whether you use buttons or rely on
the auto-gui, why use button rather than submit, if you want to
submit? I might also say, that is what submit buttons are for. I
assume, however, that there is a
Heh, Rick,
I think we both misread what this gentleman is doing. I know I did. I
missed that the button used to submit the form was outside the form.
Why it is outside is not clear. But, he said it was. But, you seem to
have missed that it was being used to submit the form. An odd
Geesch! Wrong again -- I AM. He does have an input type='button'
but it is outside the form and used to submit the form. REALLY ODD!
Why is he doing that?
Michael McGrady
Rick Reumann wrote:
I do wonder in this case, however, whether you use buttons or rely on
the auto-gui, why use
Sorry, I'm not very good with JavaScript, but could it be that your
function needs a return value? All my JavaScript functions return true
or false, and it seems like I had a problem with a submit function
similar to yours until I put in a return statement.
Erik
sachin wrote:
hello all ,
i
I don't see any problem with your code on first sight.
Do you have more than one form in the page? Is the page you're trying to
Submit is the first one in the page?
Try putting the name of the form instead of forms[0].submit do
Document.name-of-your-form.submit();
And also, in your onclick=...
12 matches
Mail list logo