I have a form that I'm trying to submit with buttons in a different frame. For the most part it works, but there are a couple instances where it doesn't. It works fine when I just need to script to display different things, but when I need to update some info, then the js doesn't seem to work. I'm wondering if this is even possible.
using onSubmit and onClick hasn't worked. The form is normally submitted by an image type input. This is the js I'm trying right now.
And then the script is looking for:
<INPUT TYPE="image" src="../buttons/but_aendern_r.gif" ALIGN=TOP BORDER="0" onClick="top.mainFrame.document.forms.submit()">
Since the page comes back blank and no data has been written to the file that is supposed to have the data written to it, I can only guess that the script is not getting that value, so it just exits. Is there a way to pass that value from a different frame? Is the problem that the form is not normally sent with a submit button?
I hope I explained this clearly.
Try changing your image input to a normal img tag, and surround it with an href, like so:
Netscape doesn't officially recognize an image as an input type. Netscape would submit the form, but you can't use an onClick event handler on the image input type - Netscape won't see it. Netscape also won't know that you clicked on the image and the value for yourButtonName.x won't be available.
onClick = "parent.otherframename.document.formname.submit();"
Also, where does 'what_to_do_next' come in to play in your code?
P.S. The little green guy with his tongue out is not required in the href tag.
hmmm, how would I embed a pplbbt guy into my code? ;)
I'll give that a try, thanks.
The what_to_do_next is for the perl script that the form is submitted to. That part needs to be submitted with the form (it's part of an image-type input and works fine when everything is done in one frame)