 |
 |
 |
 |
#109929 - 11/02/04 10:01 PM
JAVA question
|
Enthusiast
Registered: 10/10/02
Posts: 394
Loc: Toronto
|
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: <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
|
|
Top
|
|
|
|
 |
 |
 |
 |
 |
 |
 |
 |
#109936 - 11/06/04 11:26 PM
Re: JAVA question
|
Enthusiast
Registered: 10/10/02
Posts: 394
Loc: Toronto
|
|
|
Top
|
|
|
|
 |
 |
 |
 |
 |
 |
 |
 |
#109937 - 11/06/04 11:52 PM
Re: JAVA question
|
Enthusiast
Registered: 10/10/02
Posts: 394
Loc: Toronto
|
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: <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: # 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
|
|
Top
|
|
|
|
 |
 |
 |
 |
 |
 |
 |
 |
#109942 - 11/18/04 02:29 AM
Re: JAVA question
|
Enthusiast
Registered: 10/10/02
Posts: 394
Loc: Toronto
|
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: <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 <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: <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
|
|
Top
|
|
|
|
 |
 |
 |
 |
|
|