form doesn't submit

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
david1721
Advanced
Advanced
Posts: 24
Joined: Mon Dec 18, 2006 8:21 pm

form doesn't submit

Post by david1721 »

HI

I added a form to a submenu. It appears correctly but nothing happens when I click on the submit button. I copied the format directly from the milonic home menu search link which I also notice doesn't submit. Can anyone tell me what I need to do to correct this? Thanks,

David

Here is my code of the menu:

with(milonic=new menuname("add_customer")){
margin=3;
style=vertStyle;
top="offset=2";
aI("text=`<form method=post action=http://www.robertaharris.com/tests/mail.php><table cellpadding=0><tr><td>Email Address: <input type=text name=email size=25 maxlength=40><input type=hidden name=do value=address_form><input type=hidden name=form_type value=new> <input type=submit value=Submit></td></tr></table></form>`; type=form; align=center;");
}
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Hi,

Forms are not my thing, but John posted a help using the following which is from his site to subscribe to the newsletter. Perhaps looking at how John did it will help you.

Code: Select all

aI("text=Our Newsletter...<br><form action=http://pdaoutlet.biz/cgi-bin/mail.cgi><input type=hidden name=flavor value=subscribe><input type=hidden name=list value=pda><input type=text name=email><br><input type=submit value=Subscribe></form>;type=form;align=center;");
I just tested that in my editor and it seems to submit, though all I get is page not found since it's on my desktop :)

Ruth
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Hi,

I played around some more and this seems to work

Code: Select all

aI("text=`<form action=http://www.robertaharris.com/tests/mail.php><table cellpadding=0><tr><td>Email Address: <input type=text name=email size=25 maxlength=40><input type=hidden name=do value=address_form><input type=hidden name=form_type value=new><input type=submit value=Submit></td></tr></table></form>`;type=form;align=center;");
Ruth
david1721
Advanced
Advanced
Posts: 24
Joined: Mon Dec 18, 2006 8:21 pm

thanks

Post by david1721 »

Thanks. I didn't have the ` in there which seems to be what was causing the problem.

"text=`form..."
david1721
Advanced
Advanced
Posts: 24
Joined: Mon Dec 18, 2006 8:21 pm

still having a problem

Post by david1721 »

I inserted the code and although I can now input an address into the field, when I hit submit, nothing happens.

Here is the menu & submenu - does it have something to do with the way I'm calling the submenu?

with(milonic=new menuname("customers")){
margin=3;
style=vertStyle;
top="offset=2";
aI("image=http://www.robertaharris.com/tests/menu ... owmenu=add customer;text=Add New Customer;");
aI("image=http://www.robertaharris.com/tests/menu ... ;text=Edit Customer Details;url=mail.php;");
aI("image=http://www.robertaharris.com/tests/menu ... ext=Delete Customer;url=mail.php;");
aI("image=http://www.robertaharris.com/tests/menu ... f;text=Get Credit Card Details;url=credit.php;");
}

with(milonic=new menuname("add customer")) {
margin=3;
style=vertStyle;
top="offset=2";
aI("text=`<form action=http://www.robertaharris.com/tests/mail.php><table cellpadding=0><tr><td>Email Address: <input type=text name=email size=25 maxlength=40><input type=hidden name=do value=address_form><input type=hidden name=form_type value=new><input type=submit value=Submit></td></tr></table></form>`;type=form;align=center;");
}
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Hi,

If I don't put in an email address and just click submit, I get this url

Code: Select all

http://www.robertaharris.com/tests/mail.php?email=&do=address_form&form_type=new
If I do fill out an email address, for example, if I fill it out with whateveremail@whatever the url becomes the following and the same form to fill out is on that page plus the email address is at the top of that existing form with a white background to it.

Code: Select all

http://www.robertaharris.com/tests/mail.php?email=whateveremail@whatever&do=address_form&form_type=new
I think you are going to have to put up a page with your menu on it, including that form you want, so we can test your page since the page I have on my desktop is working fine and takes me to your site and your form to fill out.

Ruth
david1721
Advanced
Advanced
Posts: 24
Joined: Mon Dec 18, 2006 8:21 pm

Post by david1721 »

User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Hi,

What browser and OS are you using, I actually get the page with the form for me to fill out when I click submit.

This is the url I get

Code: Select all

http://www.robertaharris.com/tests/mail.php
which is the same as the one you posted to test, but when I go to that url I get a page with a menu, when I click submit, I get that url, but it has a page with a form on it

Ruth
david1721
Advanced
Advanced
Posts: 24
Joined: Mon Dec 18, 2006 8:21 pm

Post by david1721 »

I'm using firefox (newest ver.) on windows 2000 I just tried it on i.e. and it works there but not in firefox.
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Hi,

Well, I cannot get it to submit in FF either, however, I went back to my test page and removed the ` from the front and bback of the aI so it is only

Code: Select all

aI("text=<form action=http://www.robertaharris.com/tests/mail.php><table cellpadding=0><tr><td>Email Address: <input type=text name=email size=25 maxlength=40><input type=hidden name=do value=address_form><input type=hidden name=form_type value=new><input type=submit value=Submit></td></tr></table></form>;type=form;align=center;");
When I opened that page on my desktop in FF and entered whatever@whatever and clicked submit, it took me to your site to the correct page with the form on it where you have to fill out the different information. So, maybe that ` is doing something in FF. Try copying and pasting the code I posted and then see if you can get it to work.

Ruth
david1721
Advanced
Advanced
Posts: 24
Joined: Mon Dec 18, 2006 8:21 pm

Post by david1721 »

thanks for your efforts. I cut a pasted your code and still nothing happens. I think I'll just change my approach and have the menu load the form on the page from a php script instead of having it on the menu.

David
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Hi,

I have posted this to Milonic for help. I finally got access to my WinXP machine and on that one I also cannot submit on FF. If you could leave the test page up that would help.

Ruth
david1721
Advanced
Advanced
Posts: 24
Joined: Mon Dec 18, 2006 8:21 pm

Post by david1721 »

thanks. I'll leave that alone and just work on some other stuff on the program for now.
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

Using the link you provided a few messages back, I get the form to work fine in IE7, but not in FF2. We're having the same problem on the Milonic site as well, so I'm pretty sure it's not your code!

Andy has been notified (as I think Ruth mentioned), and he'll either fix the menu code (if that's it), or come up with a workaround for the apparent FF problem (if that's it).
John
david1721
Advanced
Advanced
Posts: 24
Joined: Mon Dec 18, 2006 8:21 pm

Post by david1721 »

thanks. I have one other question while we're on the subject of forms. If I wanted to have some sort of javascript validation for a field in a form in a menu, can this be done and if so which file should I put the function in. For example, if I wanted to check that the field contains something so a blank form could not be submitted.

David
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Hi,

You are beyond my level, but since you seem to know about functions there are a few demos which use functions, even a couple to do with forms.

http://support.milonic.com/demos/

The top of the page demos were done in response to questions in the forum to get the menu to do various things. You might take a look and see if any give you an idea of how to do what you want.

This has to do with forms

http://support.milonic.com/demos/select_box/index.htm

Hope this helps.

Ruth
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Post by Andy »

Latest release (v 5.770) contains a fix for submitting forms under Firefox. Could be releated
david1721
Advanced
Advanced
Posts: 24
Joined: Mon Dec 18, 2006 8:21 pm

Post by david1721 »

Thanks, that seems to have done the trick. The form submits now.
Post Reply