Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:37

Submitting form in post method.


Poster: GK
Dated: Tuesday April 10 2007 - 12:30:16 BST

Onclicking menu item I would like to pass the method type as "post/get".
Is it is possible?

If it is possible please, let me know the solution.

{In 'menu-data.js' file with in the "aI()" there is an attribute URL, like this there is any attribute with name "method" for the solution of my query?}


Thanks
Ganga Krishna.


Poster: Ruth
Dated: Tuesday April 10 2007 - 15:43:22 BST

Hi,

No, as far as I know there's no attribute to set post/get. But, you can do forms in the aI where you can set it. Try a search using the term forms set for this forum. There are a bunch of results, though I don't know what you might need, since you didn't specify any particular thing.

Ruth


Poster: GK
Dated: Wednesday April 11 2007 - 12:50:53 BST

Hi Ruth,

Thanks for reply.

I searched as you mentioned, but unable to find the solution to my problem.

As you mentioned you are not clear about my problem, here I am mentioning my problem clearly.

"When we click on the menu option, request will go with 'get method' type and will show the screen. But I want the request to be go in 'post method' type and show the screen."


Thanks
Ganga Krishna.

Submitting form in post method.


Poster: GK
Dated: Monday April 16 2007 - 8:33:56 BST

Hi,

For form submission by post method I followed like this. Is this is the correct or any other solution exist?

Actual code is like this.
In "mmenudom.js" in the function 'o$()' at 'onclick' event '$K()' function is called and in this function submitting the form, but it is in the get method.

What I followed:
In "mmenudom.js" in the function 'o$()' at 'onclick' event I replaced calling of '$K()' with my own function calling.
My function code is,
Code:
function callmemenu(url)
    {
          document.<formname>.action=url;
          document.<formname>.submit(); 
    }

The above function is written in the jsp where I used my menu.
By this way I am able to submit the form in 'post' method.

Thanks
Ganga Krishna.


Poster: Ruth
Dated: Friday April 20 2007 - 0:00:47 BST

Hi,

I found you an example of a form in the menu using the method=post
as far as I know you can just put in whatever method it is you need/use. The aI string would be set as type=form; You'll see it in this post and the response to it.

http://www.milonic.com/forum/viewtopic. ... 0998#30998

Ruth


Poster: GK
Dated: Friday April 20 2007 - 8:27:07 BST

Hi Ruth,

In the link you have provided they used like this to submit form in post method.

Code:
aI("text=<form method=post action=http://www.laurentian.ca/cgi-bin/htsearch_e.cgi><input type=text name=words size=15><input type=submit value=go></form>;type=form;");


In my menu for one of the option I used previously like this:
Code:
aI("text=Procesar Datos TVR;url=/Cavali/TVRMainAction.do;itemwidth=150;");

Now I replaced this with,
Code:
aI("text=<form method=post action=/Cavali/TVRMainAction.do></form>;type=form;");


this leads to script error and menu options list is disappeared.

And also I placed the same code as in link page
Code:
aI("text=<form method=post action=http://www.laurentian.ca/cgi-bin/htsearch_e.cgi><input type=text name=words size=15><input type=submit value=go></form>;type=form;");

as one of the menu option. It also leads to same error.

Thanks
Ganga Krishna.


Poster: Ruth
Dated: Friday April 20 2007 - 10:11:22 BST

Hi,

Well, the error I'm getting when you use the one I posted as a link is that the file is not found, that the page doesn't exist, which of course you'd not get anything if the page isn't available anymore.


As to the one you have, how exactly is it supposed to work? You can't even see it in the menu, there's nothing there to 'click' or whatever you want done. That would be like putting this on the page


Code:
<form method=post action=/Cavali/TVRMainAction.do></form>


If you post that on the html page and then view the page you don't see it, because all it has is the form with no button to submit, or options to pick, no link to click, there's nothing between the opening form and the closing form tag.

You keep saying you want method=post and as I showed you can put that in the form, but you have to have some way to get the form to work.

Ruth


Poster: John
Dated: Friday April 20 2007 - 16:04:58 BST

GK wrote:
And also I placed the same code as in link page
Code:
aI("text=<form method=post action=http://www.laurentian.ca/cgi-bin/htsearch_e.cgi><input type=text name=words size=15><input type=submit value=go></form>;type=form;");

as one of the menu option. It also leads to same error.

It looks to me like this code should work.

Please post a URL so we can get a better look.