PDA

View Full Version : How to make popup window without add by clicking a link


HyeSung
11-12-2002, 03:35 PM
Erm... I wanted to make a popup window upon clicking a word but I dun want the url of the page of the link to be shown. Is there a way i can make windows pop up upon clicking a word and put wrods and perhaps pictures on tt pop up window? Can anyone help? Thanks in advance~

celiawonder
11-12-2002, 08:03 PM
In the body of your main page:

<a href="YourPopUpPage.asp" target="popup" onclick="YourPopUpFunction()" > Your Link Word </a>

In the script of "YourPopUpPage.asp":

<head>
<title>Put in the words you wish to display on the tt of your pop-up window</title>
</head>

Hope this helps!

HyeSung
11-13-2002, 07:27 AM
:confused: Sorry I'm juz a beginner... and I dunno how u do it... erm.. i did try to make the .asp file but the address still shows... so is there another better way? Sorry to trouble~

celiawonder
11-13-2002, 02:10 PM
Maybe you can show me the code

HyeSung
11-14-2002, 07:09 AM
I did abt the same u told me to... but I've uploaded a .asp file to try... is tt wrong? can u show me an e.g o how u can write those script?

celiawonder
11-14-2002, 02:27 PM
This is in my main page:


<a href="Ent_sum_oldentry.asp" target="popup" onclick=
"NewWindow(this.href,this.target,300,400,'resizable','center'); return false;"> <font color="#FFFFFF">Review Previous Entries</font></a>

--------------------------------------------------------------------------------
A javascript for NewWindow()

function NewWindow(u,n,w,h,f,p,x,y){

var ws= window.screen?:0,m=Math,C='center',R='random',M='custom',sw=screen.availWidth,sh=screen.availHeight, T=(p==C&&ws)?(sh-h)/2:(p==R&&ws)?(m.floor(m.random()*(sh-h))):(p==M)?y:100,L=(p==C&&ws)?(sw-w)/2:(p==R&&ws)?(m.floor(m.random()*(sw-w))):p==M)? :100,s='width='+w+',height='+h+',top='+T+',left='+L;

s+=(!f||f=='')?'':','+f;
win=window.open(u,n,s);
if(win.focus) win.focus();

}


-------------------------------------------------
Script for Ent_sum_oldentry.asp :

<html>
<head>
<title>Review Your Previous Summary Entries</title>
</head>
<body>
</body>
</html>

-------------------------------------------------
This works both on NAS and IE...

HyeSung
11-15-2002, 05:48 AM
wow.... tt's really complicated... erm... I still dun really understand how I'm gonna change them... and some of ur parts u have those smiling faces... so wat are those? Oh... one more thing... where should I put those codes at? Coz I only have on page to it...

Can give me a simpler eg? Sorry to trouble. I'm really a beginner... sorry...

celiawonder
11-15-2002, 01:47 PM
That's why I think it would be easier to pinpoint your problem if you just post your codes..

HyeSung
11-15-2002, 02:00 PM
Hmm... here's a eg of wat i wrote...

<a href="http://xxx.link.asp" target="popup" onclick="YourPopUpFunction()" > Links </a>

I juz type this in... is it wrong?

I dunno the other one u say to type where...coz i make a .asp file oredi... so how to do it?

celiawonder
11-15-2002, 02:07 PM
Hye,
Do you have a javascript name by YourPopUpFunction() in this page or any include file ?

HyeSung
11-15-2002, 02:17 PM
i'm not very sure abt it and i dun think i have... so how to do it?

A1ien51
11-15-2002, 07:44 PM
Here, try to use this
Pick the options you want and then hit the generate button. It will write out the code for you.

http://www10.brinkster.com/A1ien51/scripts/PopUpWinGenV3.htm

A1ien51

HyeSung
11-16-2002, 07:01 AM
wow thanks... tt's cool~ I'll try out and see if i have anymore questions or doubts to it~ =)