Results 1 to 4 of 4

Thread: Dynamic HTML Pop-up Window

  1. #1
    Join Date
    May 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Lightbulb Dynamic HTML Pop-up Window

    Hi there guys..!! Well what I'm looking for is..

    Basically I want to have an HTML POP-UP Window, which would contain a FLASH File of the RESOLUTION "800x622". I want to have Google ads on both sides and at the bottom too. It's easy to define a layout for ads.

    BUT the problem is I've lot's of Flash files, and I want to have a pop-up window that can actually change the flash files accordingly.

    The RESOLUTION of all the flash files are the same, only the difference is the the files. So I was looking for a HTML/Javascript where I can pass parameter to change the file in the page.

    Thanks
    Gagan

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

    Default

    Why not just make multiple pages for each of the flash files, then make a link like so:

    Code:
    <a href="#" onclick="window.open('flash.html','newwin','width=800,height=622');">View File</a>
    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

  3. #3
    Join Date
    May 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    First of all thanks to such a quick reply & That's a gr8 idea that you gave me, I had thought about it earlier.., Secondly...

    My Site is working on Joomla, I have lot's of content and Want to grow.. if not right now may be later with more and more content and videos..

    BUT then it would consume space (think about 100's of REDUNDANT HTML Pages) on my server, and moreover I have copy the whole code over and over again, and that I don't want to do... and there will be more users who would be contributing there.. and I don't want them to be replace the Adsense Code there... while contributing. That's why I dropped that plan, so if there's any thing I could possibly do with passing filename as parameters ? any Idea possibly other than this ?



    Quote Originally Posted by thetestingsite View Post
    Why not just make multiple pages for each of the flash files, then make a link like so:

    Code:
    <a href="#" onclick="window.open('flash.html','newwin','width=800,height=622');">View File</a>
    Hope this helps.

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

    Default

    That has a fatal flaw.

    If javascript is disabled, it will load "#" instead, which is an empty target, meaning it'll just add that to your URI and do nothing.

    You should instead use:

    Code:
    <a href="flash.html" target="_blank" onclick="return window.open(this.href,'newwin','width=800,height=622');">View File</a>
    This will make the default href of the link be the page you desire. The javascript will get this value and use it to open the window. If javascript is not enabled, it will open this link instead, in a new window (target="_blank"). If javascript is enabled, it will do as it does now, except that I needed to add "return" to the function so it returns just the popup rather than returing the link value. Basically, this sets it to open a new window with the link in it, but overrides it with a popup window if javascript is enabled.

    Always remember fallbacks for older browsers, or those without javascript.
    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
  •