Hold on - is enipla saying what does happen, or what s/he wants to happen? Is it actually a quirk being described - in that both clicking BUTTON and SUBMIT should do the same thing, but they don’t?
OK, just tested it - it doesn’t work like it should. How odd.
Do you have to have the form submitting? If not, you could change the SUBMIT button to a BUTTON type and then use a form.submit() call from a second function, called by that button.
You got it. It seems to be a quirk. The BUTTON and SUBMIT should do the same thing, but they don’t. I want to use the SUBMIT so that the form is submited when the users hits an enter key.
The alert is just a test to see what the heck is happening. Just want to be sure the function gets called.
Nevermind…I really should read stuff more closely. I don’t see a problem with it, now that the memory is coming back. I’m still digging through my references to find a fix.
Copy and paste, but I just didn’t grab enough of it.
The <script language=javascript> tag is one line above in the actuall code.
The crazy thing is, the function is getting called, but only the alert gets executed with the type=submit. The type=button executes the entire function.
That’s weird. I don’t get it either. Maybe just use the type=button deal and give up on the submit? Still it irritates me when I can’t solve a coding problem like this. :mad:
Opening http://<my apache server>/tframe.html displays the two frames, clicking on either Button or Submit does the same thing. I played with having the function return false, to no effect.
Yeah, drives me nuts. Problem is, by using a type=submit, the form will be submitted if the user either presses the button OR just an enter key. That’s what I’m after.
Don’t want to force the button push.
Anyway, I explained in a couple posts up, the problem seems to be the function will not update the frame that calls it with a submit button. It will work with a button button.
It will work if I have the function call a different frame. Just not the one from the calling form.