|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
2 forms to submit using one (CSS) button
Hi All (my first post here),
I've got a page with a form on, and a separate hidden form with an 'action' variable in (this is much shortened version!): PHP Code:
Another form is hidden: PHP Code:
The code for the button is: PHP Code:
Submitting one page is OK in the 'onclick', but the above sends only the last page in the list. Reading on earlier posts, it seems one solution (acceptable to me if I can get it to work) is to post the 'action' from 'hiddendiscardpageform' to 'pageEditForm'. Why a CSS button, instead of a normal submit button? The whole site uses these (menu's, etc), so it's in keeping with the theme. Why not just put the action bit in the other form? Because there are five buttons on the page with different actions, but all send the information from the pageEditForm. What do I need to change to get this to work? Any help would be MUCH appreciated, as I have been stuck on this for weeks, and despite trawling the web, can't find the answer (or more likely I'm too simple to see it ).Trevor
__________________
"Good artists copy, great artists steal." Pablo Picasso |
|
#2
|
|||
|
|||
|
Hi
Well, as someone said, 'the silence was deafening'! I eventually figured it out. Instead of the button doing the submit, make it go to a javascript function. In that function, make the hidden values in one form equal those in the other, and then submit the form. In my case, I did away with most of the hidden forms and used javascript variables instead. Trevor |
![]() |
| Viewing: Dev Shed Forums > Web Design > CSS Help > 2 forms to submit using one (CSS) button |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|