[Current Forum ] [Archive 2003 - 2005]
[Register]  [Profile]  [Preferences]  [Search]
[Private messages]  [Memberslist]  [FAQ]  [Login]
Subsim Radio Room Forum Index » » Sub Command » » HTML Help needed again :(
Goto page ( 1 | 2 Next Page )
Author HTML Help needed again :(
XabbaRus


Joined: Feb 28, 2002
Posts: 2792
Posted: 2002-12-20 17:27   
Right web page dev is going well.

If you have visted my site you will see the gallery is up and running and pics popping up as clicked.

Now I want to do a similar thing but with what is in effect another html page. Well in fact it is.

What I did was take the java script from the gallery page and modify it a little and put the right stuff in the href. anway all is not well. It is openeing up the little window but now page, just a box with a little red cross as if it is trying to put in a picture.

Below is my java script.
Appreciate the help. ie what I need to fix and the html that needs to be put after the href.

()script language = "JavaScript"()
(!--
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 ('');

}
//--)
(/script)

Brackets have been put in certain parts so it won't parse and therefore show up on the forum.

_________________

Project 971

[ This Message was edited by: XabbaRus on 2002-12-20 17:28 ]

[ This Message was edited by: XabbaRus on 2002-12-20 17:29 ]

[ This Message was edited by: XabbaRus on 2002-12-20 17:30 ]


  View Profile of XabbaRus   Goto the website of XabbaRus   ICQ status       Edit/Delete This Post   Reply with quote
XabbaRus


Joined: Feb 28, 2002
Posts: 2792
Posted: 2002-12-21 04:02   
bumb
_________________

Project 971


  View Profile of XabbaRus   Goto the website of XabbaRus   ICQ status       Edit/Delete This Post   Reply with quote
Madcowz


Joined: Feb 28, 2002
Posts: 574
From: Cambridge (UK)
Posted: 2002-12-21 06:44   
Is it opening the right page, But not the image in the page?

If so your javascript is fine its the img ref that is wrong.

If its the page that isn't opening check your javascript tags and make sure your not referencing the same newpage name (not url but the javascript name)


Can you supply the url so we can have a look.



Mad


_________________

Comsa

'When the hunter comes, the tiger runs with the deer'


  View Profile of Madcowz   Goto the website of Madcowz   ICQ status       Edit/Delete This Post   Reply with quote
Ramius


Joined: Feb 27, 2002
Posts: 1932
From: United Kingdom
Posted: 2002-12-21 06:51   
Mad,

Just gonna just on Xabba's thread here

I'm in the middle of updating a web page, and want to change the menu system on it. I will be using a java based menu. Now i want to remove the frames pages that it was using before.
So the ?? is - do i have to put the java script for the muenu on EVERY page ??

Thanks

Ramius

Hope you don't mind Xabba


_________________


SCX Model Previews


  View Profile of Ramius   Email Ramius   Goto the website of Ramius   ICQ status         Edit/Delete This Post   Reply with quote
OlegMst


Joined: Mar 01, 2002
Posts: 73
Posted: 2002-12-21 10:52   
Quote:

On 2002-12-21 06:51, Ramius wrote:
I'm in the middle of updating a web page, and want to change the menu system on it. I will be using a java based menu. Now i want to remove the frames pages that it was using before.
So the ?? is - do i have to put the java script for the muenu on EVERY page ??



1. Java and JavaScript are not the same, they are not even similar. I'll assume you meant JS for menus on your page.

2. Java is BAD. Don't use it. I won't even install Java engine on my PC, if I don't have to. Use JS or something else instead.

3. Frames are bad. Good for you you dropped them

4. Assuming you make JS menus on pages without frames - then yes, you'll have to use JS code on every page with a menu.

5. HOWEVER, there is this thing called server side includes (SSI). If you have full control over the server that hosts your pages, you may use SSIs, to "re-use" portions of your code. Ie. you make a piece of code that is to be reused on more than one of your pages, and simply "include" it in every page that has to use the said code (menu in your case).

But, to use this, you have to have (kind of) "complete" control over the server...

O.


  View Profile of OlegMst   Goto the website of OlegMst      Edit/Delete This Post   Reply with quote
Operator


Joined: Feb 28, 2002
Posts: 331
From: Toronto, Canada
Posted: 2002-12-21 11:26   
As Oleg pointed out, frames are bad, java is bad, cheers to that. You can try using CSS to make a 'frame', seems like people have a tough time transitioning from old web design to new.

  View Profile of Operator   ICQ status       Edit/Delete This Post   Reply with quote
Ramius


Joined: Feb 27, 2002
Posts: 1932
From: United Kingdom
Posted: 2002-12-21 11:59   
Thanks Oleg - won't be able to do the SSI thing with the page im working on at the moment . Ive only got certain server rights.

But i'll keep it in mind when i get around to updating my own page, since the server is my pc - will that still work then ?

Think I'm gonna look into that CSS thing and see how that goes

Yep, Operator, its like learning a language all over again

Ramius
_________________


SCX Model Previews


  View Profile of Ramius   Email Ramius   Goto the website of Ramius   ICQ status         Edit/Delete This Post   Reply with quote
XabbaRus


Joined: Feb 28, 2002
Posts: 2792
Posted: 2002-12-21 14:35   
OK Madcowz here is the link,

(area shape = "rect" coords="5,5,213,73" href= "javascript:newspec

('../Project971/shkvall.html','Shkvall','Shkvall VA-111',400,300)"" alt= "Shkvall")

Now as you can see I want to open up an html page in a small fixed size window which will show the specs for the Shkvall Torpedo. However it opens up the fixed size window but it is blank white and instead of saying Shkcall VA-111 in the title bar of the window it shows the path to the root directory.

Please help me out.

Oh I know what people have said about frames but I'm just figuring this stuff out and I'm not ready to hit CSS yet, also I'm using tables in certain parts of my page. I'm impressed with what I've done so far..
_________________

Project 971


  View Profile of XabbaRus   Goto the website of XabbaRus   ICQ status       Edit/Delete This Post   Reply with quote
XabbaRus


Joined: Feb 28, 2002
Posts: 2792
Posted: 2002-12-22 05:34   
Bump
_________________

Project 971


  View Profile of XabbaRus   Goto the website of XabbaRus   ICQ status       Edit/Delete This Post   Reply with quote
Monophonic


Joined: Feb 28, 2002
Posts: 279
From: Espoo, Finland
Posted: 2002-12-22 16:32   
First thing to occur to me would be that javascript code might not prepend your web site's address to the address you give to the newspec call. You could try out giving it the fully qualified URL instead, like

Code:

javascript:newspec('http://www.whateveryourhostis.com/...



instead of the relative path, like

Code:

javascript:newspec('../Project971/shkvall.html',...



Do note that this is not good practise, and you should look into the javascript specs for obtaining the document root (probably a property of such name somewhere) and using that to create fully qualified URLs.

[EDIT: added missing colon]
_________________
Signature unavailable during refit&resupply.

[ This Message was edited by: Monophonic on 2002-12-22 16:33 ]


  View Profile of Monophonic   ICQ status         Edit/Delete This Post   Reply with quote
Madcowz


Joined: Feb 28, 2002
Posts: 574
From: Cambridge (UK)
Posted: 2002-12-22 16:54   
Go with Monophonic's post, sounds like its opening a page so js is ok but the link to your page is wrong. Try the absolute url first ie. http://www.971.com/folder/page.htm and then when that works try the relative link.

If you can provide a link so we can see whats happening it will help a lot.

Double check then triple check everything, then have a cup of tea and do it again. Then go to bed wondering why its not working to wake, several hours later with the solution.

Also don't worry bout frames, css and SSI's for now. Just learn html and get good at it. There are a million different apps and things you could try but learn to walk first.

Obviously you should be creating the site with a MySQL backend and a PHP front end with perhaps a flash GUI but I wouldn't even consider suggesting that to you.

Mad


_________________

Comsa

'When the hunter comes, the tiger runs with the deer'

[ This Message was edited by: Madcowz on 2002-12-22 16:55 ]


  View Profile of Madcowz   Goto the website of Madcowz   ICQ status       Edit/Delete This Post   Reply with quote
Madcowz


Joined: Feb 28, 2002
Posts: 574
From: Cambridge (UK)
Posted: 2002-12-22 17:01   
Ramius

Not sure exactly how you will be doing this but if there is a large chunk of javascript that is going to be repeated stuff, it in a .js file and reference it from the .html page. Means you can update all your javascript at once as well as speeding up d/l times.

SSI's: Are good but I hate them, have to edit a site just now that is over 7 years old, with well over 750mb of data and is so deeply messed up with recursive SSI's it makes me want to bleed to death. Done well they are superb, we used them on the BBC learning site (Biology Section) to great effect but on this site its terrible.


_________________

Comsa

'When the hunter comes, the tiger runs with the deer'


  View Profile of Madcowz   Goto the website of Madcowz   ICQ status       Edit/Delete This Post   Reply with quote
Ramius


Joined: Feb 27, 2002
Posts: 1932
From: United Kingdom
Posted: 2002-12-22 17:46   
Thanks Mad

so if im understanding you right, just place this
Code:
<script type="text/javascript" language="JavaScript1.2" src="stm31.js"></script>


in every page that i want my menu to appear in ?

_________________


[ This Message was edited by: Ramius on 2002-12-22 17:48 ]

[ This Message was edited by: Ramius on 2002-12-22 17:49 ]


  View Profile of Ramius   Email Ramius   Goto the website of Ramius   ICQ status         Edit/Delete This Post   Reply with quote
XabbaRus


Joined: Feb 28, 2002
Posts: 2792
Posted: 2002-12-23 12:09   
OK guys just tried the full URL on my dv stuff and still no go.

What I have done is modify my geocities site.

http://www.geocities.com/shkvalru/index.html

The top left hand image in my image map (53 cm Torpedo) will have a link using the full URL and the right hand image (65 cm Torpedo) will use the relative URL then you can see what is going on.
_________________

Project 971


  View Profile of XabbaRus   Goto the website of XabbaRus   ICQ status       Edit/Delete This Post   Reply with quote
XabbaRus


Joined: Feb 28, 2002
Posts: 2792
Posted: 2002-12-23 14:05   
A little more info in the root directory which is shkvalru there is a file shkvall.html which is what I'm trying to open in its seperate window using the javascript code.

Hope all this makes sense.


_________________

Project 971


  View Profile of XabbaRus   Goto the website of XabbaRus   ICQ status       Edit/Delete This Post   Reply with quote
Goto page ( 1 | 2 Next Page )
Lock this Topic Move this Topic Delete this Topic
Powered by phpBB Version 1.4.4
Copyright © 2000 - 2001 The phpBB Group

phpBB Created this page in 0.045792 seconds.