This is a script for opening a new window. It works with Firefox and not Internet Explorer. IE gives a script error and it references a part of the code that has nothing to do with the script. Someone please tell me if you can figure out why.
I wrote this script for use in a few past projects, and it has worked fine for me ever since, maybe it will suit your needs as well?
CODE
function OpenSubWin( page, w, h, sb ) { var sw = screen.width, sh = screen.height; var ulx = ((sw-w)/2), uly = ((sh-h)/2); var sbt = (sb==1) ? 'yes' : 'no';
var paramz = 'toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=no,scro llbars='+sbt+',width='+w+',height='+h+''; var oSubWin = window.open( "", "SubWin", paramz );
oSubWin.moveTo( ulx, uly ); oSubWin.location.replace( page ); }
The parameters it accepts are: page --> the URL to the page to open w --> the Width of the Sub-Window h --> the Height of the Sub-Window sb --> if 1 then display Scrollbars in Sub-Window (could be set to 0, or auto)
I think what you are missing is the <script> tags as Tyssen mentioned above and you should also add the 'window' part to call the open window like all the other examples other members have given. eg. popUpWin = window.open();
Also, the opened window name ('GunBound Tactics: Screenshots') should only contain alphanumeric characters (A-Z, 0-9) or underscores (_). Although, I doubt that would be causing the problem.
"GunBound Tactics: Screenshots" is your window name, not your title of the window.
IE only let you use alphabet and _.
you should have something like "newwin" insted.
then use document. write ... <TITLE>...</TITLE> to add title.
-deluxmilkman
parse parameter when open new window
[help] Java Script: Window.open
Page that I create to open a new window already done, but it cannot parse parameter. Where should I put a parameter? jsp or java. Before that in parent window I have filter the value by pttName and month and output display. So I want to bring this 2 parameter to child window.
Below its code that I have done.
Page1.Jsp Function prntLetter() { var url = "ReportBirthdateNameList.Jsp"; var name = "pageLetter"; var features = "toolbar=0,location=0,directories=0,status=0, menubar=0,copyhistory=no,scrollbars=yes,resile=no"; window.Open(url,name, features); } </script>
Button code: <input type="button" name="btnLetter" value="Print Name & Address" onclick="prntLetter()">
I am not able to adjust frames length/width in a frameset using java script functions I am using
firefox 3. In below code changerows is not working for me. Where as same is working in IE6.
Please help me in resolving this issue. Note: here frameset1 is the name given to the FRAMESET.
CODE function changeRows() { parent.frameset1.rows="30%,70%" }function
restoreRows() { parent.frameset1.rows="50%,50%" } ....
I had found this site >> http://learnjava.awardspace.com This website is for people who want
to learn Java Programming Language step by step. This website also includes JAVA lessons from the
beginning to advanced level. So this site appropriates for the beginner of Java programmer language
or non-basic Java Programming Language. The lessons are easy to follow and understand starting
from how to get your PC JAVA ready, the fundamental programming concept and creating the real
application. Moreover, the working examples are also included. Please enjoy the les....
I'm having some issues with working with objects . I get an index out of bounds ex.
Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: 0 heres how
I'm using it ---------------------------- Object contestants = new Object {}; contestants
= "test"; any ideas appreciated. Do I need to specify the initial size on creation or something?
It seems I answered my own question I gave it an inital size then I was able to add things. But is
there a way I can add to it on the fly without knowing its require maximum size?....
Many having tell me to make my MMORPG in java leads me to agree, But I'm not sure truly is it
not yet easier, but yet the outcome of programming an MMORPG in java will make it fail or succeed
more then one in C+= I've learned a lot of variables in javascript, and I don't think that
java would be too bad either. My true question is, is those who use these languages, which seems
to give better outcome, and which seems to be more in ease. Regards -PCessna....
Hey there, I have made an applet that shows images moving about the screen. I have pause/resume
buttons that work. But i've noticed that when the applet is interuppted by something i.e moving
another window over it, it will automatically repaint. My question is how can I stop this? How can
I make it so that the only time that paint is called is when I want it to be called? Thanks in
advance!....
The HTML <script> tag is used to insert a JavaScript into an HTML page. Examples Write text
with Javascript - http://www.w3schools.com/js/tryit.asp?filename=tryjs_text The example
demonstrates how to use JavaScript to write text on a web page. Write HTML with Javascript -
http://www.w3schools.com/js/tryit.asp?file...ryjs_formattext The example demonstrates how to use
JavaScript to write HTML tags on a web page. How to Put a JavaScript Into an HTML Page CODE
<html> <body> [color=red]<script type="text/javascript"....
Hi, I'm doing a course called Software Design and Development for HSC in a high school in
Australia. HSC is basically the courses you do that you get assessed on for University entrance. I
haven't really done programming before, although I've seen source code and can decipher it
and make small changes. I am also quite good with the general use of computers. One of the major
projects we will do in the course is the making of a game (although it's not just game-making
that we do. We also have to develop a software solution package, although I'm not su....
does anyone know of any good websites with free java tutorials for people without a lot of prior
coding experience? i've read some tutorials, but every one i read starts making references to C
and C++... well i don't know either of those so it gets really really confusing really really
fast. ive downloaded the sdk but that is it.... i know a pretty good amount of php and a tiny bit of
perl but those are procedural languages so i dont know if they even helpe me at all with an OOP
language like java.....
/** * Remove from the club's collection all members who * joined in the given month,
and return them stored * in a sparate collection object. * @param month The month of the
membership. * @param year The year of the membership. * @return The number of members.
*/ public ArrayList purge(int month, int year) { if(month >= 1 && month
{ Iterator it = members.iterator(); ArrayList purged;
purged = new ArrayList(); int counter = 0; wh....
Ok at my Uni they teach you OOP with java, They used to do with C++ i believe but swiched to java
because its easier to teach people OOP with java apparently. Anyway I've been working on some
exercises with java (book is 'objects first with java'). I've got this one exercise
which I cant understand. QUOTE Exercise 4.29 Rewrite getLot so that it does not rely on a
lot with a particular number being stored at index (number - 1) in the collection. For instance,
if lot number 2 has been removed, then lot number 3 will have been moved from index 2 ....
With this registry edit you can easily open the current folder in prompt without going through any
Change Directory commands (cd). This is useful for people like me who are programming in JAVA, and
every time to create class files and test them I have a diificult time just entering the commands in
Prompt. But if you don't want to use this registry edit you can create the directory in
C:\ drive like C:\files so you have to navigate very little in prompt. If you are
experienced in regedit you can do it yourself shown below OR download the attachment and app....
JSF Pros: Java EE Standard - lots of demand and jobs Fast and easy to develop with
initially Lots of component libraries Cons: Tag soup for JSPs Doesn't play well with REST
or Security No single source for implementation Spring MVC Pros: Lifecyle for
overriding binding, validation, etc. Integrates with many view options seamlessly: JSP/JSTL, Tiles,
Velocity, FreeMarker, Excel, PDF Inversion of Control makes it easy to test Cons: Configuration
intensive - lots of XML Almost too flexible - no common parent Controller No built-in Aja....
Hello I have a simple .js file that seems to work in Firefox but not IE. The error could totally be
my syntax, just not sure why it's working in one browser and not the other. All I'm doing
is waiting for an image to load completely before redirecting. I added an extra step that waits an
additional 1.5 seconds just for 100% smooth transition (sometimes firefox reroutes before the image
is actually fully loaded). This script works perfectly for Firefox, meaning if the image is already
loaded/cached it reroutes immediately and if not, then waits with extra dela....
I have written a simple lottery script that I want to manually use with my InvisionPlus forum and
main web site. Currently I have a page with the lottery script on my main page that can be accessed
from a redirection forum on my forums. The script creates a button on the lottery page of my main
site that creates a number entry prompt that acts as a password field. If the lotto number is
correct, then my user is taken to my winners forum where they post they won. The purpose of the
lotto is for members to win account upgrades. My script though is not working. Here is the ....
I dont have much knowlege with java yet. Im a php programer not a java programer but i want to learn
java and i need this coding to correct so that i can carry on my learning of java. So please some
one just take some time to help me. Heres what i need to do. QUOTE An incoming request for a
specific resource, identified by an URI, must be dispatched to the appropriate handler according to
the server configuration which maps URIs to request handlers. 'HandlerFactory.getHandler'
must be implemented: CODE public class HandlerFactory { public String get....
so most of you guys know mig33. its a wap application,probaly java.most kindly to be java. does
anyone have java knowlege or knows where i can get a chat script like mig33? i also know this server
supports jsp so im planing to use it for my application. i was hosted here last year but moved
because i found a better host. now im back just to use the jsp on this server. Im planing to run
chat applictions so if any one wants to help me in my project let me know.....
Java technology has various usage from mobile applications to Enterprise applications. I think the
power of Java technology in web applications and applets is showed in "meez.com" where u can create
your own 3d avatars. /rolleyes.gif" style="vertical-align:middle" emoid=":rolleyes:" border="0"
alt="rolleyes.gif" />....
This code wont work in Safari, but works fine in Firefox 2. Can someone help. The error pops up
however. It just doesn't do anything unless you dont pick one and then it says Pick a Windows
tweak, but if you DO pick one it doesnt even try to load anything. Everything you see below is
everything inside my PHP Include. If you would like to view my actual site it's
http://boozkerstweaks.trap17.com There might be PHP errors and stuff right now, but i am working on
those, but this i can not get. CODE <td valign="top" class="right"> ....
This script will help you to protect your source code Add this to Section of your site
! HTML <script language=JavaScript> var message="Function Disabled!";
/////////////////////////////////// function clickIE4(){ if
(event.button==2){ alert(message); return false; } } function
clickNS4(e){ if
(document.layers||document.getElementById&&!document.all){ if
(e.which==2||e.which==3){ alert(message); return false; } } }
if (docume....
Hellow friends, I am creating this thread for all queries and suggestions related to java coding. If
you face any problem, post it here, and others who have a solution can post the reply here. Hope it
helps the users.....
hi, I have found a term called JSON, it's Javascript Object Notation. After go through few web
pages still dont get what it is? This is what it described : QUOTE JSON , which stands for
"JavaScript Object Notation", is a lightweight computer data interchange format. JSON is a subset of
the object literal notation of JavaScript but its use does not require Javascript. JSON's
simplicity has resulted in its widespread use, especially as an alternative to XML in Ajax. One of
the claimed advantages of JSON over XML as a data interchange format in this context ....
aving some problems taking in the Java at Uni, Was wondering if anyone could shine some light on it
for me. My task is to write a program that will ask you to enter 2 words. the program will then
print out both words on one line. However the words will be seperated by dots that will make the
total length of the line 40. so if your first word was turtle and the second was abc, the output
would be turtle...............................abc The program should check for certain conditions:
1. a word can not be longer than 37 characters; 2. there must always be atlest 2 do....
hi to all!!!! just like to ask if it would be possible if i could make a custom
button or frame in java. i got tired of using the build infeatures in java. i would like to create
my own dessign of button or frame.. can it be possible!!! /biggrin.gif' border='0'
style='vertical-align:middle' alt='biggrin.gif' /> thank!!!! /laugh.gif'
border='0' style='vertical-align:middle' alt='laugh.gif' /> New Help In! is NOT a descriptive
topic title. Next time you decide not to follow the posting rules, you will be issued a w....
Introduction This is a code that I use to dynamically create the drop down menus. First, you have
to edit the following code and put it in your Javascript. Notice : /*** SET BUTTON'S FOLDER HERE
***/. Edit that to your folder. Also, the /*** SET BUTTONS' FILENAMES HERE ***/. This creates a
mouseover when the drop down is activated. Put all your onmouseover images under: oversources = new
array; and your onmouseout images under : upsources. Be sure to set your on and out images above
each other. CODE /*** SET BUTTON'S FOLDER HERE ***/ var buttonFold....
Some of the installables in java comes in form of .jar file, one has to just double click or type
"java -jar file.jar", and it starts executing. The reason for this is a line appended in the
MANIFEST.MF file of that jar file. For writing a similar jar file of your own, just write your java
file, then compile the same and create a jar file. Create a MANIFEST.MF file and the content should
have the followings: CODE Manifest-Version: 1.0 Created-By: xyz Main-Class:
xyz.MainClass Here xyz.MainClass is the main class. Now create a jar file with the man....
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE
forum, Create your own topics, Ask Questions, track topics, setup
subscriptions & notifications and Get a Free Website w/ Email and FTP.