Author Topic: Any java bods onboard?  (Read 218 times)

Offline gpwurzel

  • Gold Member
  • *****
  • Posts: 3836
Any java bods onboard?
« 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
I'm the worst pilot ingame ya know!!!

It's all unrealistic crap requested by people who want pie in the sky actions performed without an understanding of how things work and who can't grasp reality.


Offline RTHolmes

  • Plutonium Member
  • *******
  • Posts: 8260
Re: Any java bods onboard?
« Reply #1 on: August 26, 2010, 08:52:45 PM »
you want javascript not java, get the O'Reilly pocket guide :aok
71 (Eagle) Squadron

What most of us want to do is simply shoot stuff and look good doing it - Chilli

Offline gpwurzel

  • Gold Member
  • *****
  • Posts: 3836
Re: Any java bods onboard?
« Reply #2 on: August 26, 2010, 09:07:17 PM »
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'm the worst pilot ingame ya know!!!

It's all unrealistic crap requested by people who want pie in the sky actions performed without an understanding of how things work and who can't grasp reality.


Offline AAIbyteu

  • Zinc Member
  • *
  • Posts: 22
Re: Any java bods onboard?
« Reply #3 on: August 26, 2010, 09:40:43 PM »
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

Offline RTHolmes

  • Plutonium Member
  • *******
  • Posts: 8260
Re: Any java bods onboard?
« Reply #4 on: August 26, 2010, 11:25:25 PM »
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
71 (Eagle) Squadron

What most of us want to do is simply shoot stuff and look good doing it - Chilli

Offline gpwurzel

  • Gold Member
  • *****
  • Posts: 3836
Re: Any java bods onboard?
« Reply #5 on: August 27, 2010, 12:33:38 AM »
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
I'm the worst pilot ingame ya know!!!

It's all unrealistic crap requested by people who want pie in the sky actions performed without an understanding of how things work and who can't grasp reality.


Offline RTHolmes

  • Plutonium Member
  • *******
  • Posts: 8260
Re: Any java bods onboard?
« Reply #6 on: August 27, 2010, 05:40:07 AM »
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)
71 (Eagle) Squadron

What most of us want to do is simply shoot stuff and look good doing it - Chilli