WebFaction
Community site: login faq
0
1

Hello World!

This one I definitely wont figure out on my own. I want to have a box, that when you click it, a drop down thing comes down with a textbox and a submit button. Is this possible? I can't find anything about it on google.

thanks, Sean

asked 25 Oct '10, 13:03

Sean Lambert
261616
accept rate: 25%


I'd recommend just using jquery's slide toggle.

<head>
<script type="text/javascript" src="jquery-1.4.2.min.js"></script> 
<script type="text/javascript" src="jquery-ui-1.8.5.custom.min.js"></script>
<script type="text/javascript">
    $(function() {
        $('#clickme').click(function() {
            $('#what_you_want_toggled').slideToggle('slow', function() {
                // You can add other functionality here, or just leave blank
            });
        )};
    });
</script>
</head>
<body>
    <button id="clickme">Click here</button>
    <div id="what_you_want_toggled">
        <form name="input" action="html_form_action.php" method="get">
            Username: <input type="text" name="user" />
            <input type="submit" value="Submit" />
        </form>
    </div>
</body>

Think something like that should work.

sdf

permanent link

answered 26 Oct '10, 07:55

bwooceli
111137
accept rate: 0%

You will probably not find exactly what you want but will have to hack one together. I use this menu in some of my projects,

http://www.dynamicdrive.com/dynamicindex1/dropmenuindex.htm

It is based on CSS and JavaScript. You might be able to insert the code you want within its anchor. Most likely you will have to find an AJAX library and write one. Something like Google Web Toolkit or Dijit,

http://gwt.google.com/samples/Showcase/Showcase.html#!CwDialogBox http://www.dojotoolkit.org/reference-guide/dijit/index.html

permanent link

answered 25 Oct '10, 13:51

johns
5.4k312
accept rate: 23%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×13

question asked: 25 Oct '10, 13:03

question was seen: 3,753 times

last updated: 26 Oct '10, 07:55

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM