SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Mentor NightStalker-DNS's Avatar
    Join Date
    Jul 2004
    Location
    Cape Town, South Africa
    Posts
    2,880
    Mentioned
    48 Post(s)
    Tagged
    0 Thread(s)

    drop down list on change

    Hey guys

    I have a dropdownlist on my website, with about 3 items in it that users can coose from. Now wat wat I want to do is wen a user select something from the list it changes a flash movie also on the page.

    Is that at all possible? Even if i must just place all three of the movies on the page and make them all not visible and then on selection change, change the visiblitly of the one I want to play.

    Please give me some suggestions on how I can accomplish this.

    Thanks

  2. #2
    SitePoint Wizard bronze trophy C. Ankerstjerne's Avatar
    Join Date
    Jan 2004
    Location
    The Kingdom of Denmark
    Posts
    2,702
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    Christian Ankerstjerne
    <p<strong<abbr/HTML/ 4 teh win</>
    <>In Soviet Russia, website codes you!

  3. #3
    SitePoint Enthusiast navtej's Avatar
    Join Date
    May 2006
    Posts
    74
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi night staker

    You can hide or make visibily by suing dom(document object model) ,in javascript, by accessing the style of the contanier of the image.

    something like document.getElemetById("Idoftheparentmovie").style.visibility="hidden" or "visible"

    now caputre the event of selection event and use the above property to do the desired effect for making the selection change.try getting hold of dom.

    .

  4. #4
    SitePoint Guru toasti's Avatar
    Join Date
    Feb 2004
    Location
    Grahamstown
    Posts
    634
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    put your default flash movie in a div:

    Code:
    <div id='flashmovies' name='flashmovies'>
    <!-- embedded flash movie -->
    </div>
    on change of your dropdown run a functoin which sets the innerHTL of the div:

    Code:
    changeMove(){
     switch(mydropdownbox.value){
       case x: document.getElementById("flashmovies").innerHTML = 'embed code for this flash movie';
       break;
       ...
     }
    }
    there is prob a better way of doing it.
    check out: http://www.w3schools.com/js/js_obj_htmldom.asp. you may be able to manupulate the flash object directly rather than rewriting the entire block's html.

  5. #5
    SitePoint Mentor NightStalker-DNS's Avatar
    Join Date
    Jul 2004
    Location
    Cape Town, South Africa
    Posts
    2,880
    Mentioned
    48 Post(s)
    Tagged
    0 Thread(s)
    Hey guys

    Thanks a lot for the replies. Its helped me a lot. I will give it a shot. Im sure ill get it working though

    Thanks again


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
  •