Results 1 to 5 of 5

Thread: JavaScript for Dropdown HTML control

  1. #1
    Join Date
    Aug 2006
    Posts
    253

    JavaScript for Dropdown HTML control

    Hii Everyone,
    I am designing a web page. I am trying to make a script for creating a drop down control for arbitrary content. I have tried lot of scripts but was not getting the desired output. So thought to post over here, so that some one can help me.! I just want the script, such that when the user clicks on a link, the content drops down and is shown on demand. I think that someone would have understood my problem. In simple words, please tell me the JavaScript for Dropdown HTML control.!! Expecting the Help from you Guys..!!

  2. #2
    Join Date
    Aug 2006
    Posts
    235

    Re: JavaScript for Dropdown HTML control

    You can use the following script for creating a drop down control for arbitrary content on the page. If you are able to use ASP.NET then that would be much helpful for you. Using ASP.Net is useful because ASP.NET is a very fast and efficient way to program small as well as enterprise level web applications. Also it provides lot of controls and components to build web pages when compared to the JavaScript. You can also develop this control by using the simple HTML classes, CSS and Javascript.
    3.2 (northwood)
    2gig ram
    ATI AIW X800xt 256mb
    Gigabyte GA-8knxp 875p Chipset
    Optiwrite 8X DVD Burner
    Win XP PRO Sp2 (Works Perfectly)
    2 SATA Raptor 74gig Raid 0
    2 7200 IDE 320gig HD

  3. #3
    Join Date
    Aug 2006
    Posts
    227

    Re: JavaScript for Dropdown HTML control

    I think that you want the coding very similar to the search box. Because in search also, when the user clicks on a link, the content drops down and is shown on demand. So I have provided you with an example of drop down search box. The following example shows a search form that drops to the right of a DIV when clicked on. And below is the code for that :
    Code:
    <div id="src_parent">Site Search</div>
    
    <form id="src_child">
      <b>Enter search terms:</b>
      <br />
      <input type="text" name="Conditions" size="25" />
      <center>
        <input type="submit" value="Submit" />
      </center>
    </form>
    
    <script type="text/javascript">
    at_attach("src_parent", "src_child", "click", "abc", "pointer");
    </script>
    I do to dead flowers what people at morgues do to dead people. Suck all the moisture out, dip them in plastic, paint them up pretty and put them in a nice frame.

  4. #4
    Join Date
    Jul 2006
    Posts
    442

    Re: JavaScript for Dropdown HTML control

    I am providing you with an example that uses dropdown HTML control to create a dropdown menu. The menu itself is simply a DIV with links contained inside it. Here is the code for that :
    Code:
    <div id="menu_parent">Main Menu</div>
    
    <div id="menu_child">
    <a href="#">Item 1</a>
    <a href="#">Item 2</a>
    <a href="#">Item 3</a>
    </div>
    
    <script type="text/javascript">
    at_attach("menu_parent", "menu_child", "hover", "y", "pointer");
    </script>
    "When they give you ruled paper, write the other way..." J.R.J.

  5. #5
    Join Date
    Mar 2008
    Posts
    672

    Re: JavaScript for Dropdown HTML control

    If you are not able to run the script properly, then you can also download the scripts from the web. Downloading such scripts doesn't have any charges. So you can try it. After downloading the script, you will have to make changes according to your need. This is the only drawback because making the changes is not difficult but very time consuming. But the good point is that you will get an idea for using the script. Once you get the idea, later on you can write your own script.

Similar Threads

  1. How to use javascript to create HTML and CSS
    By KennedII in forum Software Development
    Replies: 5
    Last Post: 23-02-2010, 12:10 AM
  2. HTML/JavaScript/onclick
    By KADEEM in forum Software Development
    Replies: 4
    Last Post: 03-11-2009, 06:37 PM
  3. How to create dropdown list under tab in HTML
    By Mentos in forum Windows Software
    Replies: 3
    Last Post: 30-07-2009, 11:49 AM
  4. JavaScript code outside html page
    By Gefry in forum Software Development
    Replies: 3
    Last Post: 30-04-2009, 03:53 PM
  5. JavaScript with HTML Parsing!
    By Samsher in forum Software Development
    Replies: 4
    Last Post: 02-02-2009, 12:30 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,246,992.13515 seconds with 17 queries