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

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
User avatar
Maestro
Super Advanced
Super Advanced
Posts: 45
Joined: Fri Dec 24, 2004 12:48 am
Location: Fort Bragg, CA
Contact:

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

Post by Maestro »

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
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

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

Post by John »

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://milonic.com/itemproperties.php

For example...

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;");
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.
John
User avatar
Maestro
Super Advanced
Super Advanced
Posts: 45
Joined: Fri Dec 24, 2004 12:48 am
Location: Fort Bragg, CA
Contact:

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

Post by Maestro »

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://milonic.com/itemproperties.php
What I meant was type=[form or header]
John wrote:For example...

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;");
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: Select all

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
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

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.
John
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Post by Andy »

5.66 Should help fix this

Cheers
Andy
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

Andy wrote:5.66 Should help fix this
It does!

Thanks.
John
User avatar
Maestro
Super Advanced
Super Advanced
Posts: 45
Joined: Fri Dec 24, 2004 12:48 am
Location: Fort Bragg, CA
Contact:

Post by Maestro »

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
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Post by Andy »

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
User avatar
Maestro
Super Advanced
Super Advanced
Posts: 45
Joined: Fri Dec 24, 2004 12:48 am
Location: Fort Bragg, CA
Contact:

Thanks

Post by Maestro »

Milonic is flat out awsome.
Thanks for the answer.

-Tim
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

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
User avatar
Maestro
Super Advanced
Super Advanced
Posts: 45
Joined: Fri Dec 24, 2004 12:48 am
Location: Fort Bragg, CA
Contact:

Post by Maestro »

It definately helps.
Thanks.
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

My turn to add...

Tree is out of beta (v1.12), and working very nicely. Menu code v5.62 or higher is required.
John
User avatar
Maestro
Super Advanced
Super Advanced
Posts: 45
Joined: Fri Dec 24, 2004 12:48 am
Location: Fort Bragg, CA
Contact:

Post by Maestro »

Thank you.
Post Reply