Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Sizing problem with Drop Down Menu w/ description

  1. #1
    Join Date
    Jan 2009
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Sizing problem with Drop Down Menu w/ description

    1) Script Title:
    Drop down menu w/ description

    2) Script URL (on DD):
    http://www.dynamicdrive.com/dynamici...bodescribe.htm

    3) Describe problem:

    I can't seem to get the text descriptions to be more than one line. What do I have to add/change for this?

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Are you asking how to insert a line break somewhere in the text description?
    DD Admin

  3. #3
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    I would assume you would do something like this(works for me...):
    Code:
    var thetext1=new Array()
    thetext1[0]="Comprehensive JavaScript<br />tutorials and over 400+ free scripts"
    thetext1[1]="Direct link to hundreds of free Java applets online!"
    thetext1[2]="Up to date news on the technology front"
    thetext1[3]="News.com- The #1 technology News site."
    thetext1[4]="Web Coding and development forums"
    Jeremy | jfein.net

  4. #4
    Join Date
    Jan 2009
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Oh my gosh that is so simple, I can't believe I didn't think of that. Thanks!

    I was thinking of it being a paragraph of words rather than "seperated lines", but whatever lets me add more to it is find by me :-)

  5. #5
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Yeah - sometimes the simplest things in life work. I'm glad to help you - and your welcome.
    Jeremy | jfein.net

  6. #6
    Join Date
    Jan 2009
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Well I tried it, and it doesn't work for what I need it to. It does break with a small amount of text, but I'd like it to have A LOT of text. This for example:

    "...This is the perfect fall fragrance! Spicy, sweet, and complex. Vanilla intertwines with a spice cabinet of cinnamon, clove, allspice, kissed with sugar. Hints of nutmeg and fruits peak out from the heart notes. If you are not a fan of bakery scents, this is nowhere near the typical "bakery" realm, give it a try! Very unique and different. - Best Seller!"

    I did try breaking it at small intervals, but the amount of text screws it all up. Is this even possible with this code? If not is there another somone could suggest thats similar?

  7. #7
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Change:
    Code:
    <span id="textcontainer1" align="left" style="font:italic 13px Arial">
    To:
    Code:
    <span id="textcontainer1" align="left" style="font:italic 13px Arial;width: 300px;">
    Jeremy | jfein.net

  8. #8
    Join Date
    Jan 2009
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    You know I tried that originally, but thinking back...I think I forgot the stupid semi-colon.

    Thank you again, I'll try it :-)

  9. #9
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Hah - ok, tell me what you get. If that doesn't work, change the span to a div.
    Edit: Change the <span> to a <div> and apply the style - that will work. Tested.
    Last edited by Nile; 01-09-2009 at 03:22 AM.
    Jeremy | jfein.net

  10. #10
    Join Date
    Jan 2009
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    So I've tried width and I've tried height and while that does expand the area below the box...the text just wont show up! There are " in the front and back of the whole text, just like the others. It works this way when it's the original sentence...so I don't know what the large amount of text is messing it up.

    I tried <div> and <span> and nothing. Heres what I got (drastic height/width to see what was working ):

    Code:
    <form name="form1">
    <select name="select1" size="1" style="background-color:#FFFFD7" onChange="displaydesc(document.form1.select1, thetext1, 'textcontainer1')">
    <option selected value="http://www.javascriptkit.com">JavaScript Kit </option>
    <option value="http://freewarejava.com">Freewarejava.com</option>
    <option value="http://wired.com" target="newwin">Wired News</option>
    <option value="http://www.news.com">News.com</option>
    <option value="http://www.codingforums.com" target="newwin">Coding Forums</option>
    </select>
     <input type="button" value="Go" 
    onClick="jumptolink(document.form1.select1)"><br>
    <div id="textcontainer1" align="left" style="font:italic 13px Arial; width:500px; height: 600px">
    </div>
    </form>
    Code:
    //1) CUSTOMIZE TEXT DESCRIPTIONS FOR LINKS ABOVE
    var thetext1=new Array()
    thetext1[0]="This is the perfect fall fragrance!  Spicy, sweet, and complex.  Vanilla intertwines with a spice 
    cabinet of cinnamon, clove, allspice, kissed with sugar.  Hints of nutmeg and fruits peak out from the heart 
    notes.  If you are not a fan of bakery scents, this is nowhere near the typical "bakery" realm, give it a try! Very 
    unique and different.  - Best Seller!"
    thetext1[1]="Direct link to hundreds of free Java applets online!"
    thetext1[2]="Up to date news on the technology front"
    thetext1[3]="News.com- The #1 technology News site."
    thetext1[4]="Web Coding and development forums"

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
  •