|
|
Dr T E Ozone
Nervous Wreck (II) Inmate
From: Insane since: Apr 2003
|
posted 04-16-2003 01:47
I'm an idiot with Javascript.... How would I go about making a link open into a NEW window with a set size of say 300/500?
----------------
So what if I am clinicly insane, Does that mean I am a danger to what is known as socieity? Wait it does...
Regards,
Thaadeous Edward Ozone
|
Dr T E Ozone
Nervous Wreck (II) Inmate
From: Insane since: Apr 2003
|
posted 04-16-2003 01:53
Ok Ive got this:
<a href="javascript:PopupResume('gregmartin', 380, 450, 'gregmartin', 'gregmartin')">RESUME</a>
Off of ArtOfGregMartin.com
But I dont understand it, Can someone explain it to me please?
----------------
So what if I am clinicly insane, Does that mean I am a danger to what is known as socieity? Wait it does...
Regards,
Thaadeous Edward Ozone
|
jdauie
Bipolar (III) Inmate
From: Missoula, MT Insane since: Jan 2003
|
posted 04-16-2003 05:00
Google is your friend...
Here is a random link from google that involves "javascript window.open"
http://www.mcli.dist.maricopa.edu/tut/tut27c.html
soli deo gloria
|
Dr T E Ozone
Nervous Wreck (II) Inmate
From: Insane since: Apr 2003
|
posted 04-16-2003 05:16
Ok that helped me not any, I hate google, Can someone just explain the simpl version above to me?
----------------
So what if I am clinicly insane, Does that mean I am a danger to what is known as socieity? Wait it does...
Regards,
Thaadeous Edward Ozone
|
Dracusis
Maniac (V) Inmate
From: Brisbane, Australia Insane since: Apr 2001
|
posted 04-16-2003 05:54
So, you don't want to learn it you just want us to hand feed you the answers?
Sorry bud, things don't work like that around here. Besides, trying to use javascript when you know nothing about it will only cause you and us hours of greif while we try and explain what you have to do cause your "simpl version above" is only about 20% of the code needed to make it all happen. But if you bothered to even skim through that tutorial you'd already know that. So do yourself a favour, put in a little effort and if you still having problems then I'm sure you'll find people here more than willing to help.
[This message has been edited by Dracusis (edited 04-16-2003).]
|
Dr T E Ozone
Nervous Wreck (II) Inmate
From: Insane since: Apr 2003
|
posted 04-17-2003 23:14
Ok I read the tutorial and to be honest it explained a lot about image javascripts for opening windows and such but honestly, I'm the type who needs someone to explain it to me personally.. It turns out the following code IS the whole code (if I heard something correctly) for opening up an entire window with a prefixed size:
<a href="javascript:PopupResume('gregmartin', 380, 450, 'gregmartin', 'gregmartin')">RESUME</a>
However I am having troubles understanding certain areas of it:
javascript:PopupResume
'gregmartin', 380, 450, 'gregmartin', 'gregmartin'
Now I know the numbers are the size of the window but I dont understand how to LINK to the actual webpage. Can someone explain this to me please?
----------------
So what if I am clinicly insane, Does that mean I am a danger to what is known as socieity? Wait it does...
Regards,
Thaadeous Edward Ozone
|
bitdamaged
Maniac (V) Mad Scientist
From: 100101010011 <-- right about here Insane since: Mar 2000
|
posted 04-17-2003 23:20
it is NOT in fact the whole code.
the rest if it is in the header and looks like this
code:
function PopupResume(url, width, height, title, name)
{
var url_str = "resume/" + url + ".html";
var open_str = "scrollbars=yes,resizable=yes,width=" + width + ",height=" + height;
new_window = window.open(url_str, name, open_str);
}
He has a little short hand here where he's making the url
/resume/gregmartin.html
.:[ Never resist a perfect moment ]:.
|
Dr T E Ozone
Nervous Wreck (II) Inmate
From: Insane since: Apr 2003
|
posted 04-18-2003 00:41
I see well sorry for my idioticy, I think I mis-understood that in that tutorial then. I for the most understand what you just showed me but I again, dont understand the following code and how to direct it to WHERE I want it to be used..
<a href="javascript:PopupResume('gregmartin', 380, 450, 'gregmartin', 'gregmartin')">RESUME</a></p>
----------------
So what if I am clinicly insane, Does that mean I am a danger to what is known as socieity? Wait it does...
Regards,
Thaadeous Edward Ozone
|
bitdamaged
Maniac (V) Mad Scientist
From: 100101010011 <-- right about here Insane since: Mar 2000
|
posted 04-18-2003 00:50
alright back up doc. Did you read the tutorial about how to pop up a window? Because I'll bet a bunch that this line:
<a href="javascript:PopupResume('gregmartin', 380, 450, 'gregmartin', 'gregmartin')">RESUME</a>
was not in the tutorial. Because it's a refrence to a function that they made specifically for this site. (Not very well done either there's no damn reason to be sending "gregmartin" 3 times).
Now going back to that tutorial how did it say to open a window? Something like this?
code:
<a href="http://www.mcli.dist.maricopa.edu/tut/"
onClick="window.open('http://www.mcli.dist.maricopa.edu/tut/',
'myWin', 'toolbar=yes, directories=no, location=no, status=yes, menubar=no,
resizable=yes, scrollbars=yes, width=500, height=400'); return false"
>web page tutorial in the universe</a>
Now try replacing his URL with yours and see what happens
.:[ Never resist a perfect moment ]:.
|
Dr T E Ozone
Nervous Wreck (II) Inmate
From: Insane since: Apr 2003
|
posted 04-18-2003 01:54
Thanks that makes sense to me....... Thanks man for explaining it... I was getting one thing, and another and trying to make sense is something I have a hard time doing, I owe you one...
----------------
So what if I am clinicly insane, Does that mean I am a danger to what is known as socieity? Wait it does...
Regards,
Thaadeous Edward Ozone
|
Scott
Bipolar (III) Inmate
From: schillmania.com Insane since: Jul 2002
|
posted 04-21-2003 01:15
I would recommend also using the "this.href" style of syntax, to save repetition.
ie. a href="www.example.com" onclick="window.open(this.href,'myWindow','width=640,height=480,toolbar=no')" etc.
|
Hiroki
Paranoid (IV) Inmate
From: NZ Insane since: Dec 2002
|
posted 04-21-2003 02:24
Hi, mate.
I have jsut suceed making new pop up window, which is set 300 x 400.
I looked up www.w3schools.com .
Try that site. And see the examples.
Hope it will help you.
Cheers,mate.
[This message has been edited by Hiroki (edited 04-21-2003).]
|