Aces High Bulletin Board
General Forums => The O' Club => Topic started by: gpwurzel on August 26, 2010, 08:27:24 PM
-
Hi Chaps, I need some advice from a guru on Java - basically what I need is to control how a window opens on clicking a link - basically I want it to be a popup, with the ability to remove the work bars (status etc) and stop it being resized etc (ie, I want to define the size and control what shows bar wise)
Or if anyone could point me to a java generator for webpages, that would be useful too - its driving me nuts (or nuttier) whichever the case may be.
Thankeee in advance,
Wurzel
-
you want javascript not java, get the O'Reilly pocket guide :aok
-
Thats helpful, thanks RT - but I'm skint at the mo...what I have so far is:-
this takes me to the HTML page "minefieldmap.html". In the code for "minefield.html" there is a tag called "body"
It would look like this:
<body onload = "newPop('bolo2pop.htm','window1')">
you would need another JavaScript in the <head> area of the pam page (minefieldmap.html in this example)
<SCRIPT LANGUAGE="JavaScript">
<!--
var newWin=null
var i=0
function newPop(file,window1) {
msgWindow=open(file,window1,'toolbar=no,status=no,menubar=no,location=no,directories=no,resizable=no,scrollbars=no,width=450,height=318,left=40,top=40');
}
//-->
</SCRIPT>
But this is opening in a full size window, prompting for script/directx permissions to run, then opening the popup...so Im a bit stumped now
Wurzel
-
I am using JQuery at work and not a pro by any means but it has popup windows and time sliders as drop-ins. I can find lots of code on the internet. Try MS/JQuery site. I may be able to post some actual code for you soon. Look at using this and see if it fits what you are looking for. :D
-
put the function newPop() in the head of the original page and use it as an onclick event in whatever you click to open the popup, not in the body of the taget popup page :aok
-
Aaaaaaaah, finally the penny drops - I can see where I'm going wrong...der........wonders will never cease lol......
RT, thanks fella (will pick a copy of that book up once I get some cash)
;)
Wurzel
-
np :)
the reference is optional - all that stuff is online anyway but I like to have the pocket references handy to quickly lookup syntax etc (I have a bunch of them because I switch between languages alot) and still cant get out of the habit of leafing through a paper book :D
amazon usually have em for ~£4.50 inc p&p (http://www.amazon.co.uk/JavaScript-Pocket-Reference-OReilly/dp/0596004117/ref=tmm_pap_title_0 (http://www.amazon.co.uk/JavaScript-Pocket-Reference-OReilly/dp/0596004117/ref=tmm_pap_title_0))