View Full Version : Dynamic HTML Pop-up Window
bgagan911
05-06-2007, 06:52 PM
Hi there guys..!! Well what I'm looking for is.. :D
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
thetestingsite
05-06-2007, 07:03 PM
Why not just make multiple pages for each of the flash files, then make a link like so:
<a href="#" onclick="window.open('flash.html','newwin','width=800,height=622');">View File</a>
Hope this helps.
bgagan911
05-06-2007, 08:49 PM
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... :o 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 ?
Why not just make multiple pages for each of the flash files, then make a link like so:
<a href="#" onclick="window.open('flash.html','newwin','width=800,height=622');">View File</a>
Hope this helps.
djr33
05-06-2007, 09:54 PM
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:
<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.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.