Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Opening A Page in Javascript

 
Arpit Gadle
Ranch Hand
Posts: 69
Linux MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 69
Linux MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15385
6
posted 6 years ago
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 69
Linux MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15385
6
posted 6 years ago
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic