| Author |
HTML Help needed again :( |
XabbaRus
Joined: Feb 28, 2002 Posts: 2792 | Posted: 2002-12-23 17:42  
Sorry to keep bumping this but I'd love to get this fixed as it is bugging me something cronic.
Anyone know any good books for learning Java Script, and I mean ones I can get walking into Waterstones or Ottokars...
_________________
Project 971
 
|
Monophonic
Joined: Feb 28, 2002 Posts: 279 From: Espoo, Finland
| Posted: 2002-12-23 18:19  
Don't know any books, I've learned most that I know by trial and error alone. But let's see, here's your newspec function:
Code:
|
function newspec (page, pagename, description, x, y)
{
newWindow=window.open ('',pagename,'width = '+x+', height = '+y+', menubar = 0, scrollbars = 0, locationbar = 0, directories = 0, resizable = 0, statusbar = 0, toolbar = 0')
newWindow.document.write ('<href = '+ page +'>');
}
|
|
Now I see no point in opening a window with a null URL then writing a tag (whose existence in HTML4.0 I'm not certain either) as into the document in that window. If that is what the script does after all, I haven't done any JS myself, I'm just extrapolating my knowledge... The following code works with the absolute URL at least (tried it off my hard disk) but try it with the relative URL too:
Code:
|
function newspec (page, pagename, description, x, y)
{
newWindow=window.open (page,pagename,'width = '+x+', height = '+y+', menubar = 0, scrollbars = 0, locationbar = 0, directories = 0, resizable = 0, statusbar = 0, toolbar = 0')
}
|
|
So the first parameter to the window.open function is the URL of the page to be displayed in the new window.
[EDIT]
I found the relevant information from this link: http://www.mcli.dist.maricopa.edu/tut/tut27c.html
You might find more useful information from that tutorial series?
[EDIT: When did "relative" replace "relevant" in my mind?!?]
[ This Message was edited by: Monophonic on 2002-12-23 18:22 ]
[ This Message was edited by: Monophonic on 2002-12-23 18:23 ]
 
|
XabbaRus
Joined: Feb 28, 2002 Posts: 2792 | Posted: 2002-12-23 18:23  
Ok Mono I appreciate this, I modded the code and tried it again off my hard disk but I just get the same thing.
A box but no text nothing.
_________________
Project 971
 
|
XabbaRus
Joined: Feb 28, 2002 Posts: 2792 | Posted: 2002-12-23 18:26  
Basically that script works for the pictures in the gallery so I thought I could use the same script and get the same effect replacing the .jpg url with and .html url. seems it doesn't work
_________________
Project 971
 
|
Monophonic
Joined: Feb 28, 2002 Posts: 279 From: Espoo, Finland
| Posted: 2002-12-23 18:30  
Now that's wierd... maybe I did a typo above, this is cut'n'paste from the page which I know to work on my HD:
Code:
|
<script language = "JavaScript">
<!--
function newspec (page, pagename, description, x, y)
{
newWindow=window.open (page,pagename,'width = '+x+', height = '+y+', menubar = 0, scrollbars = 0, locationbar = 0, directories = 0, resizable = 0, statusbar = 0, toolbar = 0')
}
//-->
</script>
|
|
Can't help but wonder why code that works with jpegs fails with html... umm.. what's the phase of the moon?
_________________ Signature unavailable during refit&resupply.
 
|
XabbaRus
Joined: Feb 28, 2002 Posts: 2792 | Posted: 2002-12-23 18:32  
OK weird,
I deleted that null bit and put the } sign in the right place but still it's failing to pick up the path on my HD, very odd.
Maybe I should send you the page code.
_________________
Project 971
 
|
Monophonic
Joined: Feb 28, 2002 Posts: 279 From: Espoo, Finland
| Posted: 2002-12-23 18:34  
Ok, send in the code... umm... to mono*city.fi, you know the drill, that's my least-priority-can-take-some-spam addy too. I'll probably reply from another address if I need be.
_________________ Signature unavailable during refit&resupply.
 
|
XabbaRus
Joined: Feb 28, 2002 Posts: 2792 | Posted: 2002-12-23 18:34  
ok did a cut and paste and it works with the relative URL
Thanks man. very very weird
_________________
Project 971
 
|
Monophonic
Joined: Feb 28, 2002 Posts: 279 From: Espoo, Finland
| Posted: 2002-12-23 18:38  
Got to be the moon... Just got to be the moon. Man.
No prob either, I learned something myself too, and I just LOVE learning stuff.
_________________ Signature unavailable during refit&resupply.
 
|
|