Results 1 to 9 of 9

Thread: Video on a new window.

  1. #1
    Join Date
    Apr 2007
    Posts
    149
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Video on a new window.

    How can i put some sort of a drop down menu that has options and when i click on each one of them, it will open a video on a different window with the same dimentions as the video?

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    You can use window.open(), a javascript function.

    <select onChange="window.open(this.value,null,'height=240,width=320);">
    <option value="page1.htm">video1</option>
    <option value="page2.htm">video2</option>
    <option value="page3.htm">video3</option>
    </select>
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. #3
    Join Date
    Apr 2007
    Posts
    149
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    do i have to put a script on the head? because it doesn't work when i do it...

  4. #4
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Hmm... I'm not sure why it isn't working.
    This has nothing to do with where the script is placed, but I'm not sure how to fix it anyway.
    I think someone else will know.
    I likely just have something simple wrong that I'm missing.
    I'm no Javascript expert.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  5. #5
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    I think it is supposed to be like this:

    Code:
    <select onChange="window.open(this.options[this.selectedIndex].value,null,'height=240,width=320);">
    <option value="page1.htm">video1</option>
    <option value="page2.htm">video2</option>
    <option value="page3.htm">video3</option>
    </select>
    Hope this helps.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  6. #6
    Join Date
    Apr 2007
    Posts
    149
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    i put the code but nothing happens when i change the option... does anyone know if i have to put a script in order for this to work?

  7. #7
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Are you by chance getting a popup blocker message?
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  8. #8
    Join Date
    Apr 2007
    Posts
    149
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    it works now but i want to change it a little, instead of opening in a different window i want it to play the video right on top of the switcher, on the same page. how can i do this.

  9. #9
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Ah. That's different, then. You said popup window, which is what that is.

    Take a look at the 'window widget' or other similar scripts in the dynamic drive library to see if one of those will fit what you need.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

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
  •