The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Pop ups
Whenever we link to a pop up page (say, youtube video), the thread jumps from the topic area where the pop up link resides to the main page. Is there any way to stop that? I apologize as I am a bit of a coding newbie.
I am using the latest version of VBB 5. |
#2
|
||||
|
||||
How do you link to a popup page?
|
#3
|
||||
|
||||
Sorry...I should have written this better.
I want a link to pop up in a separate window. Thanks |
#4
|
||||
|
||||
Since you're not giving any detail - for example: how exactly are you triggering the popup? Code! - its hard to help.
Anyway - this is probably a javascript issue. You probably need to add "return false" to the code somewhere. There's plenty of examples around the net. |
#5
|
||||
|
||||
I will give that a try. Thank you
Also, whilst I understand there are different examples, my problem was a bit more complicated. I am able to get the link to open up in another pop up window. However, the page where the link exists always bounces back to the main page. Thanks |
#6
|
||||
|
||||
You must be using something like this. You have to add return false to the onclick handler.
Code:
<a href="#" onclick="window.open('https://www.youtube.com/watch?v=NZYXNofi6zI', '_blank', 'width=400,height=300'); return false;">Watch</a> Code:
<a href="https://www.youtube.com/watch?v=NZYXNofi6zI" onclick="window.open(this.href, this.target, 'width=400,height=300'); return false;" target="_blank">Watch</a> |
#7
|
||||
|
||||
Quote:
|
#8
|
||||
|
||||
My apologies, but many thanks for your help as that was the trick.
I did not paste the entire code thread here because this is a separate computer from the one I use for coding. But here is the final solution. If I typo, forgive me...but this works on VBB 5 a href="" onclick="window.open('URL', 'TITLE, width=XXX,height=XXX'); return false;"> |
#9
|
||||
|
||||
That works. But as I mentioned in post #6, the better solution is to put the url in href. The reason is this still give users a choice to open the link in a new tab instead of the popup window by right-clicking the link and choosing 'Open link in new tab' option.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|