vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   link pop-up? (https://vborg.vbsupport.ru/showthread.php?t=31885)

Neo 10-30-2001 11:42 PM

does anyone know how to make a like that when it is clicked it will open a new window and close itself?

nandastone 10-31-2001 04:15 AM

I think you need to explain further, I'm not really sure what you are saying. Do you mean have a link that, when clicked, close the current window and pops up a new one?

silence 10-31-2001 04:30 AM

Sure go get a javascript pop up script. Then find the template that the link is in that you want to have pop up. Add the needed code there, and then add the rest in the header as whatever the script says.

MrLister 10-31-2001 02:05 PM

i'm sure there's a way in javascript. search for something similar inside google.com

eva2000 10-31-2001 02:07 PM

yup google.com and alltheweb.com search ;)

JamesUS 10-31-2001 05:20 PM

Try this: (not tested, and probably won't work) :D

Code:

<a href="whatever.com" target="_blank" onClick="javascript:window.close()">
But remove the space between java and script; vB adds a space automatically to stop any scripts being executed.

MrLister 11-01-2001 12:57 AM

post here if it works... i want to see if it worked... i could probably use this also.

Neo 11-05-2001 01:51 AM

put java & script together and it works

Aman 11-07-2001 08:18 PM

Hello Neo! I am very much hoping your request is for what I am thinking it is. Anyway, hopefully I will be able to help.

Try this:
In the head section:
<STYLE TYPE="text/css">
<!--
BODY {OVERFLOW:scroll;OVERFLOW-X:hidden}
.DEK {POSITION:absolute;VISIBILITY:hidden;Z-INDEX:200;}
//-->
</STYLE>



In the body section:

<DIV ID="dek" CLASS="dek"></DIV>

<SCRIPT TYPE="text/javascript">
<!--

Xoffset=-60; // modify these values to ...
Yoffset= 20; // change the popup position.

var nav,old,iex=(document.all),yyy=-1000;
if(navigator.appName=="Netscape"){(document.layers )?nav=true:old=true;}

if(!old){
var skn=(nav)?document.dek:dek.style;
if(nav)document.captureEvents(Event.MOUSEMOVE);
document.onmousemove=get_mouse;
}

function popup(msg,bak){
var content="<TABLE WIDTH=150 BORDER=1 BORDERCOLOR=black CELLPADDING=2 CELLSPACING=0 "+
"BGCOLOR="+bak+"><TD ALIGN=center><FONT COLOR=black SIZE=2>"+msg+"</FONT></TD></TABLE>";
if(old){alert(msg);return;}
else{yyy=Yoffset;
if(nav){skn.document.write(content);skn.document.c lose();skn.visibility="visible"}
if(iex){document.all("dek").innerHTML=content;skn. visibility="visible"}
}
}

function get_mouse(e){
var x=(nav)?e.pageX:event.x+document.body.scrollLeft;s kn.left=x+Xoffset;
var y=(nav)?e.pageY:event.y+document.body.scrollTop;sk n.top=y+yyy;
}

function kill(){
if(!old){yyy=-1000;skn.visibility="hidden";}
}

//-->
</SCRIPT>

And finally this into your link tag:
ONMOUSEOVER="popup('Text goes here','00FFFF')"; ONMOUSEOUT="kill()"


All times are GMT. The time now is 06:04 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01084 seconds
  • Memory Usage 1,723KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete