Webmaster Forum

Go Back   Webmaster Forum > Web Development > Coding Forum

Coding Forum Problems with your code? Discuss coding issues, including JavaScript, PHP & MySQL, HTML & CSS, Flash & ActionScript, and more.


Reply
 
LinkBack Thread Tools Display Modes
Old 07-25-2009, 07:02 PM   #1 (permalink)
Contributing Member
 
thumbtak's Avatar
 
Join Date: 08-18-05
Posts: 103
iTrader: 0 / 0%
Latest Blog:
None

thumbtak is liked by many
Javascript popup window and new page

I am having issues with making a button that displays a new page and then the page the button is on to go to a new page..

I got it somewhat working but it doesn't fully work. Here is the closes I got it working.

Code:
<form> <center><a href="live_popup.html"><input type=button value="Open player in popup window" onClick="javascript:popUp('/popup_player.html')"></a></center> </form>
I want popup_player.html to be displayed and the page switch to live_popup.html. Popup works find but page change doesn't always work. Does anyone know how to do this?
thumbtak is offline  
Add Post to del.icio.us
Reply With Quote
Old 07-25-2009, 09:57 PM   #2 (permalink)
Moderator
 
Hades's Avatar
 
Join Date: 01-23-07
Location: Buenos Aires, Argentina
Posts: 1,258
iTrader: 0 / 0%
Hades is a web professional of the highest orderHades is a web professional of the highest orderHades is a web professional of the highest orderHades is a web professional of the highest orderHades is a web professional of the highest orderHades is a web professional of the highest orderHades is a web professional of the highest orderHades is a web professional of the highest orderHades is a web professional of the highest orderHades is a web professional of the highest orderHades is a web professional of the highest order
Quote:
I want popup_player.html to be displayed and the page switch to live_popup.html. Popup works find but page change doesn't always work. Does anyone know how to do this?
Either the link or the button behavior are prone to fail because you are wrapping an <input> within a link <a> tag. It maybe be valid HTML but it is not a very good practice. I would suggest putting both actions on an <a> tag or on the button but don't combine them, try these:

HTML Code:
<form> <center><a href="live_popup.html" onclick="javascript:popUp('/popup_player.html');">Open player in window</a></center> </form>

HTML Code:
<form> <center><input type="button" value="Open player in popup window" onClick="javascript:popUp('/popup_player.html');window.location='live_popup.html'"></center> </form>
I'd go for the first example but both should work.

Regards,
__________________
Hades,
Ancient god, King of the Nether World, and Guardian of the Dead.
...and on my free time I'm also a web developer, contact me if you need one!
Hades is online now  
Add Post to del.icio.us
Reply With Quote
Old 07-26-2009, 01:00 AM   #3 (permalink)
Contributing Member
 
lordspace's Avatar
 
Join Date: 05-30-06
Location: Canada
Posts: 673
iTrader: 0 / 0%
lordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nice
Send a message via ICQ to lordspace Send a message via Skype™ to lordspace
thumbtak,
another options is to use an A HREF (using target="_blank") and then when the file is loaded resize the newly opened window either by setting lower height and width or using some nice jQuery effects on onLoad action.

Code:
<a href="live_popup.html" target="_blank">Player</a>
lordspace is offline  
Add Post to del.icio.us
Reply With Quote
Old 07-26-2009, 09:19 AM   #4 (permalink)
Moderator
 
Hades's Avatar
 
Join Date: 01-23-07
Location: Buenos Aires, Argentina
Posts: 1,258
iTrader: 0 / 0%
Hades is a web professional of the highest orderHades is a web professional of the highest orderHades is a web professional of the highest orderHades is a web professional of the highest orderHades is a web professional of the highest orderHades is a web professional of the highest orderHades is a web professional of the highest orderHades is a web professional of the highest orderHades is a web professional of the highest orderHades is a web professional of the highest orderHades is a web professional of the highest order
Quote:
Originally Posted by lordspace View Post
thumbtak,
another options is to use an A HREF (using target="_blank") and then when the file is loaded resize the newly opened window either by setting lower height and width or using some nice jQuery effects on onLoad action.

Code:
<a href="live_popup.html" target="_blank">Player</a>
But the _blank links open in a new tab in Firefox (and possibly in Chrome too?), and if you resize the window after opening the _blank page it will resize the whole browser with all the tabs that you have opened.

From the usability point of view I think the real solution would be not using popups at all. And open the videos in the same window, or give the user the option to open it in a different window if they choose (adding a <a href="..." target="_blank">[^]</a> next to the play option). Try to avoid popups or resizing windows because more and more browsers are disabling this feature and it will preclude your users from enjoying your content.
__________________
Hades,
Ancient god, King of the Nether World, and Guardian of the Dead.
...and on my free time I'm also a web developer, contact me if you need one!
Hades is online now  
Add Post to del.icio.us
Reply With Quote
Old 07-26-2009, 07:23 AM   #5 (permalink)
Contributing Member
 
thumbtak's Avatar
 
Join Date: 08-18-05
Posts: 103
iTrader: 0 / 0%
Latest Blog:
None

thumbtak is liked by many
Hades thanks. I tryed out the second one and it worked out great. Now crappy internet explorer uses can use the site...lol

I don't know if this is off topic but I have another internet explorer issue if anyone can help out.

Look at the iframe at link below in k-meleon or mozilla firefox and your see text in it. Look at it in internet explorer and you will not. That is because k-meleon / mozilla firefox makes the background become what is below it. Which is what I want. iIn IE the bakground is made to be white. White is not good as the text is white.

Any Ideas?

Here is the page:
unofficialradio.com/request.html

Last edited by htmlbasictutor; 07-27-2009 at 12:25 AM..
thumbtak is offline  
Add Post to del.icio.us
Reply With Quote
Old 07-26-2009, 09:11 AM   #6 (permalink)
Moderator
 
Hades's Avatar
 
Join Date: 01-23-07
Location: Buenos Aires, Argentina
Posts: 1,258
iTrader: 0 / 0%
Hades is a web professional of the highest orderHades is a web professional of the highest orderHades is a web professional of the highest orderHades is a web professional of the highest orderHades is a web professional of the highest orderHades is a web professional of the highest orderHades is a web professional of the highest orderHades is a web professional of the highest orderHades is a web professional of the highest orderHades is a web professional of the highest orderHades is a web professional of the highest order
Add the allowtransparency attribute to the iframe.

HTML Code:
<iframe ... ALLOWTRANSPARENCY="true"></iframe>
__________________
Hades,
Ancient god, King of the Nether World, and Guardian of the Dead.
...and on my free time I'm also a web developer, contact me if you need one!
Hades is online now  
Add Post to del.icio.us
Reply With Quote
Old 07-26-2009, 01:41 PM   #7 (permalink)
Contributing Member
 
thumbtak's Avatar
 
Join Date: 08-18-05
Posts: 103
iTrader: 0 / 0%
Latest Blog:
None

thumbtak is liked by many
Quote:
Originally Posted by Hades View Post
Add the allowtransparency attribute to the iframe.

HTML Code:
<iframe ... ALLOWTRANSPARENCY="true"></iframe>
Thanks worked like a charm.
thumbtak is offline  
Add Post to del.icio.us
Reply With Quote
Old 07-26-2009, 10:53 AM   #8 (permalink)
Contributing Member
 
lordspace's Avatar
 
Join Date: 05-30-06
Location: Canada
Posts: 673
iTrader: 0 / 0%
lordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nice
Send a message via ICQ to lordspace Send a message via Skype™ to lordspace
I am a little bit concerned about opening windows with JS.
There are so many popup blockers e.g. google's toolbar.
lordspace is offline  
Add Post to del.icio.us
Reply With Quote
Old 07-26-2009, 01:36 PM   #9 (permalink)
Contributing Member
 
thumbtak's Avatar
 
Join Date: 08-18-05
Posts: 103
iTrader: 0 / 0%
Latest Blog:
None

thumbtak is liked by many
This window is not needed it is an extra so if it doesn't open then that would be okay.
thumbtak is offline  
Add Post to del.icio.us
Reply With Quote
Old 07-27-2009, 09:10 AM   #10 (permalink)
Contributing Member
 
thumbtak's Avatar
 
Join Date: 08-18-05
Posts: 103
iTrader: 0 / 0%
Latest Blog:
None

thumbtak is liked by many
Next step I forgot to say is... is there a way that when the popup is closed that the old page goes back to what it was before or the old page loads a page? Old as in page below the popup.
thumbtak is offline  
Add Post to del.icio.us
Reply With Quote
Go Back   Webmaster Forum > Web Development > Coding Forum

Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Control IEFRAME or POPUP Window {urgent} zaxcoder Coding Forum 3 03-27-2009 12:05 PM
Popup new window bekdesigns Coding Forum 1 03-03-2008 01:17 AM
Title Javascript popup window thumbtak Coding Forum 16 03-09-2007 05:44 AM
Simple javascript popup window not working in FF spyderscripts Coding Forum 2 07-15-2006 08:02 PM
Help: Popup Window from Flash kontra Coding Forum 2 05-21-2004 10:43 AM


Sponsor Links
Get exposure! Contextual Links V7N SEO Blog V7N Directory


All times are GMT -7. The time now is 07:47 AM.
© Copyright 2008 V7 Inc
Powered by vBulletin
Copyright © 2000-2009 Jelsoft Enterprises Limited.


Search Engine Optimization by vBSEO 3.3.0 ©2009, Crawlability, Inc.