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:00

What's the difference type=[header|form]?


Poster: Maestro
Dated: Monday December 27 2004 - 0:59:52 GMT

I have been fooling around with "trying" to imbed a simple form into one of Milonic Menues all day; but, have had little luck, mostly due to those pesky browser-inserted line breaks and other browser-specific problems.

HOWEVER, one issue which I believe is mm specific is the type=[form|header] item parameter.

I seem to have better luck using type=header.
When I use type=form, the moment I click in the <input type=text> field the form attempts to submit itself; which renders the form unusable.

I suppose there's a reason for this, but I have not had any luck finding a clear definition of the various "type" value params.

Why IS there a type=form type in the first place?
What does that particular type do?

Thanks - the Milonic Menue is a god-send!

-Tim

Re: What's the difference type=[header|form]?


Poster: John
Dated: Monday December 27 2004 - 5:06:16 GMT

Maestro wrote:
HOWEVER, one issue which I believe is mm specific is the type=[form|header] item parameter.

No such parameter combination that I'm aware of. Should be type=form; . See http://www.milonic.com/itemproperties.php

For example...
Code:
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;");

A simple subscription form.
Maestro wrote:
When I use type=form, the moment I click in the <input type=text> field the form attempts to submit itself; which renders the form unusable.

Post your complete form code here. Remember to use the code tags.
Maestro wrote:
Thanks - the Milonic Menue is a god-send!

The kind words are most appreciated.

Re: What's the difference type=[header|form]?


Poster: Maestro
Dated: Monday December 27 2004 - 19:40:03 GMT

Maestro wrote:
HOWEVER, one issue which I believe is mm specific is the type=[form|header] item parameter.

John wrote:
No such parameter combination that I'm aware of. Should be type=form; . See http://www.milonic.com/itemproperties.php


What I meant was type=[form or header]

John wrote:
For example...
Code:
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;");

A simple subscription form.


OK. I am using your example.
See http://fbcity.securesitehosts.com/default2.html and click on "Search".

But still..
Maestro wrote:
When I use type=form, the moment I click in the <input type=text> field the form attempts to submit itself; which renders the form unusable.


John wrote:
Post your complete form code here. Remember to use the code tags.


Here it is..


Code:
with(TopMainMenuStyle=new mm_style()){
openonclick=1;
closeonclick=1;
onbgcolor="#4F8EB6";
oncolor="#ffffff";
offbgcolor="none";
offcolor="#fff";
separatorcolor="#2D729D";
separatorsize="1";
padding=5;
fontsize="75%";
fontstyle="normal";
fontfamily="Verdana, Tahoma, Arial";
pagebgimage="images/inverseTopNav_bg.jpg";
headercolor="#FBDFB4";
headerbgcolor="none";
}

with(TopSubTwoHeaderStyle=new mm_style()){
openonclick=1;
closeonclick=1;
fontsize="75%";
fontstyle="normal";
fontfamily="Verdana, Tahoma, Arial";
bgimage="images/trans_BlueGrey.png";
align="right";
valign="middle";
bordercolor="#FFFFFF";
borderwidth="1px";
borderstyle="solid";
padding="2px";
}

// "Main Menue" - the items shown in the top navigation bar
with(milonic=new menuname("Main Menu")){
style=TopMainMenuStyle;
top=62;
left=300;
alwaysvisible=1;
orientation="horizontal";
aI("text=Home;url=#;status=Back To Home Page;");
aI("text=Departments;showmenu=TopDepartments;");
aI("text=Library;showmenu=TopLibrary;");
aI("text=Search;showmenu=TopSearch;");
aI("text=My City;showmenu=TopMyCity;");
}

// Simple search
with(milonic=new menuname("TopSearch")){
style=TopSubTwoHeaderStyle;
screenposition="left";
left="offset=10";
top="91";
itemwidth=579;
aI("type=form;rawcss=font-variant:small-caps;text=<form action=http://pdaoutlet.biz/cgi-bin/mail.cgi><input type=hidden name=flavor value=subscribe><input type=hidden name=list value=pda><font color=#FBDFB4>Our Newsletter... </font><input style=background-color:#EBE689 type=text name=email> <input type=submit value=Subscribe></form>;");
}


// Example, using TopMyCity of form when "type=header"
with(milonic=new menuname("TopMyCity")){
style=TopSubTwoHeaderStyle;
screenposition="left";
left="offset=10";
top="91";
itemwidth=579;
aI("type=header;rawcss=font-variant:small-caps;text=<form name=form2 action=http://pdaoutlet.biz/cgi-bin/mail.cgi><input type=hidden name=flavor value=subscribe><input type=hidden name=list value=pda><font color=#FBDFB4>Our Newsletter... </font><input style=background-color:#EBE689 type=text name=email> <input type=submit value=Subscribe></form>;");
}



One last note..
If I change the type to "type=header" the form will not automatically submit if I click in the <input type=text> field.

NOT TRUE any longer!
Now, even when "type=header" the form will submit as soon as I click in the text field. Strange!


Using "type=form" does.
This is why I asked the original question; since, when using "type=header" I can still submit the form - by clicking the submit button - while, when using "type=form" will cause the form to submit prematurely when I put the focus on the text field.

This leads me to ask, what prey tell is "type=form" even good for?

I hope this makes sense.
-Tim


Poster: John
Dated: Monday December 27 2004 - 20:51:16 GMT

Methinks we might have a bug here. Much as I hate to admit it, this form is now failing on my site as well. (obviously it used to work!).

Hang in there - we'll get it.

Andy, we're both running 5.65.


Poster: Andy
Dated: Tuesday December 28 2004 - 11:58:38 GMT

5.66 Should help fix this

Cheers
Andy


Poster: John
Dated: Tuesday December 28 2004 - 17:33:19 GMT

Andy wrote:
5.66 Should help fix this

It does!

Thanks.


Poster: Maestro
Dated: Wednesday December 29 2004 - 17:17:36 GMT

I wrote:
This leads me to ask, what prey tell is "type=form" even good for?

This was not a rhetorical question.
Nowhere is there any documentation (that I could find) to explain any special abilities, qualities or attributes that would set "type=form" apart from "type=header".

Since "type=form" previously had this bug, I used "type=header" instead; so, is there any good reason to change the type back to "form" now that you have fixed the bug?

By the same token, I would like to take advantage of any hidden feature that may be a part of the "form" type declaration - and this is also why I ask about the difference.

Are there any distinguishing differences we should know about?

Thanks for the quick response.
Your Milonic Menu system is a revolutionary tool (in this developer's humble opinion) which satisfies a long standing need for a rapid-development and easy to understand and feature rich menu system that effectively marries DHTML to javascript in a way thet quite simply works! The Milonic Menu system will become a part of every major new project that I will be developing for from now on.

I have recommended that we purchase a full developer's license to my employer. He too wants to spend some time evaluating it, and I am sure we eventually will. Of course, we will be purchasing site licenses for the current project (at the very least).

Thanks again.
I will be curious to hear your reply to my question above.

-Tim Hall


Poster: Andy
Dated: Saturday January 8 2005 - 18:25:54 GMT

Basically, a form type of menu item will allow the user to select appropriate form elements within the menu item by clicking on them or using the tab key to move between each form element. Without setting a form type the menu item will not respond.

A header type of item is simply a disabled menu item that will take its properties (colors etc) from the style you specify.

They are actually very different from each other and should be treated as such but they do have certain similarities.

Sorry for the confusion - we are working on documentation but finding it difficult to get this done. The success of the Milonic DHTML Menu is quite phenomenal and we are currently spending most of our time dealing with tech support and questions we hope to get this sorted out within the next month or so though.

Hope this helps
Andy

Thanks


Poster: Maestro
Dated: Saturday January 8 2005 - 18:34:21 GMT

Milonic is flat out awsome.
Thanks for the answer.

-Tim


Poster: kevin3442
Dated: Tuesday January 11 2005 - 1:01:02 GMT

Just a quick add-on:

There are a few other type settings that you may wish to know about.

type=dragable to make a menu item (along with the rest of the menu it occupies) dragable. Also requires the dragdrop.js file. See sample22.

type=tree for use in a collapsible menu or tree menu. Requres treemenu.js (still in beta I believe). See this page for more info.

type=html is best used when embedding a large amount of html code into the text property of a menu item.

Hope that helps,

Kevin


Poster: Maestro
Dated: Tuesday January 11 2005 - 1:16:12 GMT

It definately helps.
Thanks.


Poster: John
Dated: Tuesday January 11 2005 - 14:00:49 GMT

My turn to add...

Tree is out of beta (v1.12), and working very nicely. Menu code v5.62 or higher is required.


Poster: Maestro
Dated: Tuesday January 11 2005 - 16:47:47 GMT

Thank you.