UBB.Dev
Posted By: Felix 10 JAVA question - 11/03/2004 6:01 AM
Hi, I have a small problem. I have two mods that uses a Java applet, but starting a few days back they dont work anymore. I tried everything but I just cant figure it out. The small windows open but blank and another regulaar window opens on top.

I dont think the problem is in my scripts, didnt touch them, it has to be something in the browser or around that because I havent change anaything in this code:

Code
 <script language="JavaScript"> 
function PopupWindow(win) {
PopupWin=window.open(win,"PopupWin","toolbar=no,directories=no,status=no,scrollbars=yes,menubar=no,width=425,height=500"); PopupWin.window.focus()
}
</script>
nor in the scripts that call it.

if you need to see this, please go to http://romanianational.com/cgi-bin/ultimatebb.cgi and click on the the bold links ( chat and citate):

lista membrilor | statistici | calendar | chat | mi | jocuri | galeria foto | e-card | citate | forum home


anybody willing to give me some suggestions?

thanks in advance.

Felix
Posted By: Burak Re: JAVA question - 11/03/2004 6:24 AM
it says:

"Nu esti conectat! Trebuie sa fi inregistrat sa ai acces la functia asta.
Conecteaza sau Inregistreaza"

open a test account, so we can look at it...
Posted By: Felix 10 Re: JAVA question - 11/04/2004 7:27 AM
Burak, it's okay. I took the SP2 out, and all my headaches stopped, it was that that creeated me problems, not only here, all over the place.
I recommand you guys dont accept it as an upgrade for win XP! it is a pain in the neck !

sorry about that, I forgot you need to be registered, however the testing account is Test and the same for the pass.

thank you very muck

AKA Teshekur ederym wink

Felix
Posted By: Gizmo Re: JAVA question - 11/04/2004 9:29 AM
I've been running WinXP SP2 since it was in beta on 6 machines and have yet to have any real issues...
Posted By: Burak Re: JAVA question - 11/04/2004 2:54 PM
Quote
Originally posted by Felix 10:
AKA Teshekur ederym wink
I didn't do anything but, bir şey değil smile

btw, I'm also using XP with sp2, but mine is SP2-Bundled XP. I didn't install SP2, it was already in the system smile and I didn't experience any problem so far...
Posted By: Gizmo Re: JAVA question - 11/04/2004 3:40 PM
List (on-site):
BlueFlame; WinXP Pro SP2; upgraded to SP2 from SP1 (SP1 was upgrade from original XP Pro).

Lappy; WinXP Pro SP2; upgraded to SP2 from SP1 (SP1 was upgrade from original XP Pro).

Laptop; WinXP Pro SP2; upgraded to SP2 from SP1 (SP1 was upgrade from original XP Pro).

Carolyns; WinXP Pro SP2; upgraded to SP2 from SP1 (SP1 was upgrade from original XP Pro).

Work; WinXP Pro SP2; upgraded to SP2 from SP1 (SP1 was upgrade from original XP Pro).

StarGate; WinXP Pro SP2; Installed from SlipLined SP2 CD
Posted By: Ian Spence Re: JAVA question - 11/04/2004 3:54 PM
Why would a server-side Windows install effect a client-side javascript execution?

Code
<a href="http://www.romanianational.com/shoutbox1.html"
target="shoutbox" onClick="window.open('','shoutbox','width=450,height=500,scrollbars=no')" title="chat">chat</a>
Those links don't use the function you specified

Code
<a href="http://www.romanianational.com/shoutbox1.html"
target="_blank" onClick="window.open('http://www.romanianational.com/shoutbox1.html'
,'shoutbox','width=450,height=500,scrollbars=no';) return false;" title="chat">chat</a>
should work better for you
Posted By: Felix 10 Re: JAVA question - 11/07/2004 7:26 AM
Posted By: Felix 10 Re: JAVA question - 11/07/2004 7:52 AM
Quote
Originally posted by Ian Spence:

Why would a server-side Windows install effect a client-side javascript execution?

Those links don't use the function you specified

They do. I have a few applications that work with that Java popup, therefore I planted this code in the header:

Code
 <script language="JavaScript"> 
function PopupWindow(win) {
PopupWin=window.open(win,"PopupWin","toolbar=no,directories=no,status=no,scrollbars=yes,menubar=no,width=425,height=500"); PopupWin.window.focus()
}
</script>


 
and I call that from the public_common.pl with something like this:

Code
 # Chat
push(@items, qq(<a href="http://www.romanianational.com/shoutbox1.html" target="shoutbox" onClick="window.open('','shoutbox','width=450,height=500,scrollbars=no')" title="chat">chat</a>));

# Citate
push(@items, qq(<a href="http://romanianational.com/cgi-bin/quotes.pl" target="quotes" onClick="window.open('','quotes','scrollbars,width=450,height=500')" title="Citatul Zilei">citate</a>));
#
I think it is much easier this way.

Why would your code work better? please explain.


As far as the SP2 is concerned....trust me, the minute I uninstalled it fixed the problem.
Cant blame anything else it occured just aftere I upgraded and I have a pretty good SYSTEM .

Thanks you,
Felix
Posted By: Ian Spence Re: JAVA question - 11/07/2004 7:45 PM
you never called that function, so you never used it.

my way tells it what to open in the window, your's tells it to open a blank page
Posted By: Felix 10 Re: JAVA question - 11/08/2004 4:22 AM
shot! you know, you're right. this:

Code
 <script language="JavaScript"> function PopupWindow(win) { PopupWin=window.open(win,"PopupWin","toolbar=no,directories=no,status=no,scrollbars=yes,menubar=no,width=425,height=500"); PopupWin.window.focus()} </script> 
is useless!. so I took it out of the footer. I would use your code but it gives me an error on the summary page and also it opens a large regular page. I'd rather use a smaller window.
what is wrong?

thanks

smile
Posted By: Ian Spence Re: JAVA question - 11/08/2004 4:57 AM
the error messages are related to the newfader
the size can be changed via the width= and height= parameters
Posted By: Felix 10 Re: JAVA question - 11/09/2004 8:37 AM
Yes, I know to change the size. Your script shows width=425,height=500 but I am not getting this. I get a full window. Can you fix it?

thank you
Posted By: Felix 10 Re: JAVA question - 11/18/2004 10:29 AM
Quote
Originally posted by Ian Spence:

you never called that function, so you never used it.

my way tells it what to open in the window, your's tells it to open a blank page

Ian, I found out! I completelly forgot.

So,
No1. I have this is the Header:
Code
 <script language="JavaScript"> 
function PopupWindow(win) {
PopupWin=window.open(win,"PopupWin","toolbar=no,directories=no,status=no,scrollbars=yes,menubar=no,width=425,height=500"); PopupWin.window.focus()
}
</script>
No.2: I have this in public_common.pl

Code
 <a href="javascript:PopupWindow('$vars_config{NonCGIURL}/hex_codes.html');"><img src="$vars_config{NonCGIURL}/$vars_style{ubbcode_hex}" border="0" align="center"/></a> 
which is a link to a small hack I did called Hex Codes, with a style button in CP and works very well.
I want to do it your way and get rid of my code from the Header but using the code bellow I still get the browser window along with the small one. Can you have a look at this:

Code
 <a href="$vars_config{NonCGIURL}/hex_codes.html" target="hex_code" onClick="window.open('$vars_config{NonCGIURL}/hex_codes.html','hex_codes','width=450,height=500,scrollbars=yes')" ><img src="$vars_config{NonCGIURL}/$vars_style{ubbcode_hex}" border="0" align="center" /></a> 
what is wrong with it? where do I insert the "return false" tag?

Thank you,
Felix
© UBB.Developers