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

Help embeding a form tag into a menu entry


Poster: ripnoel
Dated: Tuesday June 8 2004 - 20:58:10 BST

Could someone please show me the correct way to get the following code into Melonic 5? I have tried switching all the double quotes to single and also tried escaping (\') but Melonic still renders a blank entry. Help appreciated. Rip
---------------------------------------


<form action="shopsearch.asp?search=Yes" method="post" id=form3 name=form3>
&nbsp;<input name="B1" type="submit" value="Search Store" class="submit-text">
<br>
&nbsp;
<input type="text" name="keyword" CLASS="input-text">
</form>

----------------------------------------
example URL: http://www.alicemooregallery.com/store/default3.htm

Here is my example escaping and also stripping out the class:
-----------------------------------
aI("text=<form action=\'shopsearch.asp?search=Yes\' method=\'post\' id=form3 name=form3>&nbsp;<input name=\'B1\' type=\'submit\' value=\'Search Store\'><br>&nbsp;<input type=\'text\' name=\'keyword\'></form>;type=form;");
-------------------------------------
help appreciated!


Poster: Ruth
Dated: Wednesday June 9 2004 - 1:26:36 BST

I'm not up on forms, but have you tried checking out the Beginner's Guide? Maz did a section about putting forms into a menu item.

Ruth


Poster: Maz
Dated: Wednesday June 9 2004 - 5:58:50 BST

The best way is to strip all the quotes, you can do that with your code without causing problems.

Mac ie appears to be the only browser that doesn't like quotes as far as I can tell.

maz

Thanks. That worked but I have a extra space after form ele?


Poster: ripnoel
Dated: Wednesday June 9 2004 - 11:26:38 BST

Thanks Ruth & Maz,

Here is my stripped code:

aI("text=<form action=shopsearch.asp?search=Yes method=post id=form3 name=form3><input name=B1 type=submit value=Search Store class=submit-text><br><input type=text name=keyword CLASS=input-text></form>;type=form;");
aI("text=<form action=shoplogin.asp method=post><input type=hidden name=returnurl value=shopdisplaycategories.asp><span CLASS=text-white>Client Login</span><br><span CLASS=text-white-bold>Last Name<br></span><input type=text name=strlastname CLASS=input-text><br><span CLASS=text-white-bold>Email</span><br><input type=text name=stremail CLASS=input-text><br><input name=L1 type=submit value=Login CLASS=submit-text></form>;type=form;");

which works fine but I now have an extra line after each form element in my menu which is making it too long on some pages. Here is the URL: http://www.alicemooregallery.com/store/
Do you think this possibly could be caused by the width of the input area?

Thanks again,

Rip


Poster: Maz
Dated: Wednesday June 9 2004 - 17:47:48 BST

yes, I've had the same problem, every browser has its own way of handling form fields that often takes some workarounds.

One way is to take if off the main menu and make it its own separate menu item, useing background transparent can hide the size, then it won't change the main menu by browser.

Although your spacing is the complete opposite of my spacing so there probably is hope yet. Try adding after type=form;padding=0;

maz

Good workaround! But now I have a scrolling menu problem


Poster: ripnoel
Dated: Wednesday June 9 2004 - 22:49:39 BST

Hi Maz:

Thanks for your seperate menu suggestion. That will work well for this usage. Unfortunately adding "padding=0;" did not correct the problem.

I do want my menus to scroll and now when I do so they accordion up onto each other. The top menu starts to scroll down before the second one. See example of this problem at: http://www.alicemooregallery.com/store/ ... raphic+Art

Do you know how to possible prevent these menus from overlapping?

THX

Rip


Poster: kevin3442
Dated: Thursday June 10 2004 - 2:26:01 BST

Hi Rip,

Nice to see another repeat Milonic Menu user back in the forums. I don't think Maz will mind if I jump in.

If I were you, in "Main Menu" I'd set:
Code:
followscroll="0,40,10";

By using 0 instead of 1 as the starting point for scroll following, you'll eliminate the 1px space between the top of the Main Menu and the top of the viewable area that you currently have.

In "searchMenu" I'd also change top=287; to top=288; because it looks like the top of your "Search" button is overlapping the bottom of the Main Menu by about 1px. Having done that, we'll whip out a little math. Since your Main Menu is at top=140 and your searchMenu is at top=288... 288 - 140 = 148, so we'll use that as the starting point to start the scroll following for the "searchMenu". So, in "searchMenu" set
Code:
followscroll="148,40,10";


I prefer the three-parameter approach to setting followscroll because (1) you can eliminate the 1px gap at the top and (2) you can control the scroll rate. You'll find a more detailed explanation of the various settings used in followscroll in this post.

BTW... nice looking site design, as always.

Hope that helps,

Kevin