aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Opening A Page in Javascript Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Opening A Page in Javascript" Watch "Opening A Page in Javascript" New topic
Author

Opening A Page in Javascript

Arpit Gadle
Ranch Hand

Joined: Dec 16, 2008
Posts: 69

On our website we have several links to faq videos. when user comes for the first time and clicks on one of the links he is asked to get register himself after registration the video in shown in a popup window. The issue is, popup are blocked by the browser. What we want is after filling up registration form the user will see the video in other page not in popup window.The code used is window.open("the video link","mywindow"); to show the video
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Is the registration in the pop up window or in the main page? Not sure what your actual flow is.

Eric
Arpit Gadle
Ranch Hand

Joined: Dec 16, 2008
Posts: 69

Dear Eric,
The registration form is on the webpage. Following is the actual flow
1. Web page list the FAQ videos. User click on one of them and he is redirected to the registration page.
2. As user submit the registration form. The FAQ videos is show in a new window using window.open() of javascript(i.e popup window).
What i want is the video show be open in the new page(in other words say in a new tab) and not in a popup window.

As we have target attribute in href of tag. Is any thing to this for window.open.

This should have given you a much better idea what i want to say.

Thanks,
Arpit U. Gadle
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
well can't you put the registration in the pop up window? would kill your porblem.

There is no way to get around a pop up blocker.

In this day in age, most peopel avoid pop up windows and use layers. http://jquery.com/demo/thickbox/

Eric
Arpit Gadle
Ranch Hand

Joined: Dec 16, 2008
Posts: 69

Thanks Eric,
Now we have changed the logic. Instead of showing swf in a new popup window(using window.open) now we are using window.location.href in javascript function but what it does is,it opens the video in the same page instead of opening in the new page. and i cant have in javascript which get automatically clicked.

Any solutions

Bye
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
window.location will open it up in the same page, there is no way to make it open up in a new page. That is what window.open is for.

Eric
 
 
subject: Opening A Page in Javascript