Does anybody have a workable exemple of JavaScript to open windows

Hello I have been trying to use Javascript to open a window
with no toolbar and resizeable with no success. Does any you have
an exemple that has worked for this. I tried the following code:
MM_openBrWindow('
http://www.mrperezonlinemathtutor.com/GEOFLASH/3_1_Similar_Triangles.pps.swf','','width=80 0,height=600,resizable=1');
and including the following function in the Page that opens
the captivate 2 quiz, placed between the two head tags just after
the title tag:
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) {
window.open(theURL,winName,features);
return false;
}//-->
</script>

Hello shperez.
Here is a JavaScript that works well for me.
void window.open('file.html','myWin','width=300, height=300,
top=300, left=500, toolbar=1, menubar=1, location=1, status=1,
scrollbars=1, resizable=1')
Let me explain a few things. The 'myWin' is just naming your
new window, in case you may have more than one button or click box
that opens a new window. Gives it a unique name. It does not put
that name at the top of the new browser window.
The properties from toolbar to resizable can be either 1's or
0's. 1's mean Yes I want that feature and 0's mean No. Also, if you
don't want your window to have a property, it is not necessary to
declare it with a false value, just leave it out.
The void at the beginning of the code is to prevent the text
[Object] being written in the main window, as a result of the
open() method being directly invoked from the HREF attribute.
When you place the code on a button or click box, just type
it as above without putting in javascript:.
You will have to publish and place it on your server to see
it work. Javascript running on a PC invokes error messages or
blocks off malicious code being run.
Play around with the code to get the type window you want.
Regards,

Similar Messages

  • Does anybody have a solution to such a problem?

    i want to put a jsp code inside a new window created by the javascript method( window.open())does anybody have a solution to such a problem?*

    the first page is:+*
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <%@ page import="java.sql.*" %>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <script>
    function test()
    frm=document.forms.form1;
    frm.action="homevisteDetails.jsp";
    window.open (&rdquo;homevisiteDetails.jsp");
    </script>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>homevisit Page</title>
    <%!
    private Connection con;
    private Statement state;
    private int i=0;
    private String fb;
    private ResultSet res;
    private ResultSet res1;
    private char selection;
    private ServletContext context;
    private HttpSession session;
    private void connect()
    throws ClassNotFoundException,SQLException
    context=this.getServletContext();
    con=(Connection)context.getAttribute("con");
    if(con==null)
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    con=DriverManager.getConnection("jdbc:odbc:data","root","root");
    context.setAttribute("con",con);
    state=con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_UPDATABLE);
    }%>
    </head>
    <body>
    <%
    try
    connect();
    out.println(con);
    %>
    <form name="form1" method="post" action="homevisiteDetails.jsp" target="_blank">
    <%
    res=state.executeQuery("select * from homevisit join patient_data on homevisit.homevisit_patient_id=patient_data.patient_id");
    while(res.next())
    %>
    <label>
    <input type="radio" name="patient" value="<%=res.getShort("patient_id")%>">
    <%=res.getString("patient_name")%> : </label>
    <%}%>
    <label>
    <input type="submit" name="Submit" value="view visite details" onClick="test();">
    </label>
    </form>
    <%
    } catch( Exception ex)
    ex.printStackTrace();
    } %>
    </body>
    </html>
    *+_then i'd like to put this page in a new window:_+*
    <</strong><%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <%@ page import="java.sql.*" %>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <script>
    function test()
    frm=document.forms.form1;
    frm.action="homevisteDetails.jsp";
    window.open (&rdquo;homevisiteDetails.jsp");
    </script>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>homevisit Page</title>
    <%!
    private Connection con;
    private Statement state;
    private int i=0;
    private String fb;
    private ResultSet res;
    private ResultSet res1;
    private char selection;
    private ServletContext context;
    private HttpSession session;
    private void connect()
    throws ClassNotFoundException,SQLException
    context=this.getServletContext();
    con=(Connection)context.getAttribute("con");
    if(con==null)
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    con=DriverManager.getConnection("jdbc:odbc:data","root","root");
    context.setAttribute("con",con);
    state=con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_UPDATABLE);
    }%>
    </head>
    <body>
    <%
    try
    connect();
    out.println(con);
    %>
    <form name="form1" method="post" action="homevisiteDetails.jsp" target="_blank">
    <%
    res=state.executeQuery("select * from homevisit join patient_data on homevisit.homevisit_patient_id=patient_data.patient_id");
    while(res.next())
    %>
    <label>
    <input type="radio" name="patient" value="<%=res.getShort("patient_id")%>">
    <%=res.getString("patient_name")%> : </label>
    <%}%>
    <label>
    <input type="submit" name="Submit" value="view visite details" onClick="test();">
    </label>
    </form>
    <%
    } catch( Exception ex)
    ex.printStackTrace();
    } %>
    </body>
    </html>

  • I have an Macbook with OS 10.6.8 using Itunes 10.4.1 to sync my Iphone4. The itunes just do not sync my contacts ... No error messages .... nothing ... just do not work ... Does anybody have a clue what is going on ? tks

    I have a Macbook with OS 10.6.8 using Itunes 10.4.1 to sync my Iphone4. The itunes do not sync my contacts ... No error messages .... nothing ... just do not work ... However, It is working for apps, calendar and email. Does anybody have a clue what is going on ? tks

    There is also an option to reset all data on the device with the next sync.
    MJ

  • Does anybody have a perfect new 15 inch 2.0ghz Macbook Pro

    I had to exchange 3 MBP's over the past month due to Kernel panics. Does anybody have a new MBP (Week 20, 21, 22 or 23) which has not had a single kernel panic.
    If you have one, how hot does your machine get and do you have any whine?
    15' MBP WEEK   Mac OS X (10.4.6)  

    The Heat issue is bearable, but the whine is not.
    The quality is a big issue for apple products now even though they have good customer service.
    Unless they improve the qualities of their products, they will face an exodus to a company who produce better models. The quality control is one big issue for Apple enthusiasts!
    The production system in China will not help Apple make more money unless they come up with quality products.
    MacBoook Pro   Mac OS X (10.4.6)   iMac

  • The button on the side that turns my phone to silent does not work and niether does the up volume button.  I have tried restarting my phone, I did a soft reset, I checked all my settings, but nothing has worked.  Does anybody have any suggestions?

    Hello,
    I have an iPhone 4 and recently started to have some problems.  First, the button on the side of my phone, that puts the phone on silent is not working. I can move the switch, but my phone stays in silent. However, If I plug my headphones in, Then I can hear everything like I am supposed too.   Also, my up volume button does not work.  This is with the headphones also. 
    I have tried doing a soft reset, I reset all of my settings, I updated my software, I restored everything back to factory settings, and nothing has fixed it.  I bought it from best buy and can send it in for service, but the last time I sent a phone in, it took them 3 months!  and I really don't want to go without my phone that long. 
    Does anybody have any suggestions? 
    Thanks so much!!

    Sounds like it either believes that there are headphones plugged in, or the switch is broken.
    Why in the world would you take it to Best Buy for service? Take it to an Apple Store. They can replace it on the spot if it's defective.

  • Does anybody have any advice about updating your book description once the book is live?

    I made a careless spelling mistake while filling out the metadata for my children’s ebook. Obviously I quickly changed it and resubmitted my “package”. That was four days ago and the spelling mistake is still there in the book description for all the world to see. Does anybody have any suggestions on how to push this through? It really should only be a 30 second fix yet has turned into a complete nightmare. Please help. Thanks.

    The description is one of the metadata fields that you cannot update yourself. You need to contact Apple and ask them to make the change for you. Quote the title, Apple ID, and ISBN of the book, and added description of the exact change needed, or complete replacement text for the description.
    Michi.

  • The battery for my macbook pro 13 says "service battery".  Now I want to get a replacement but the reviews for it are horrible! Does anybody have any suggestions?

    The battery for my macbook pro 13 says "service battery".  Now I want to get a replacement but the reviews for it are horrible! Does anybody have any suggestions? I don't want to spend 130 dollars on something I'm going to have to replace in less than a year (which is what normally I been reading)  I do design work and I take my mac everywhere.  Having to always look for a plug or having to be constantly plugged in doesn't sound ideal to me.  Please help me. what should I do???

    Why does it matter if it a scam????? I'll let you figure that out by yourself.  If I'm going to replace it, why should I be contempt with a battery that I have to replace within months (as stated by some people in the comments). The issue here is not if I should or not replace it OBVIOUSLY I'm going to have to before it starts going crazy.  The underlying issue is why is the replacement battery for a lack of better words " a bit crap."  It comes with a 3 month guarantee?? Is that a joke?!??!?! Some people complained it malfunction after only 8- 9 months? I'm sorry but as an Apple fan I think it's absolutely rubbish. I know there is no magic cure I'm just hoping someone shines the light on how crappy this replacement is.

  • I just received a new macbook pro. I am looking for a usb3 external storage 500 GB drive.  Some manufacturers of drives aren't for sure their drive will work with the new lion system. Does anybody have any suggestions for drives that will workw

    I just received a new macbook pro. I am looking for a usb3 external storage 500 GB drive.  Some manufacturers of drives aren't for sure their drive will work with the new  system. Does anybody have any suggestions for drives that will workw

    There seems to be a problem, just now, with the USB 3 ports on the new MBP's supporting eternal USB 3 drives. Some people have no luck at all - can't even recognize the drive - and some are reporting USB 2 speeds (those who drives are recognized). I'd call a dealer such as LaCie or OWC to see if they have USB 3 drives that actually work with MBP's with USB 3 ports. You may have to wait for a software/firmware update.
    Clinton

  • Ipad2 plus ipad air all of a sudden instantly goes back to home screen.doesnt matter what app i am using just when it decides to do it it does.apple tech has no answer or fix for me does anybody have any idea what is wrong

    ipad2 plus ipad air all of a sudden instantly goes back to home screen.doesnt matter what app i am using just when it decides to do it it does.apple tech has no answer or fix for me does anybody have any idea what is wrong

    First thing to try is to reset your device. Press and hold the Home and Sleep buttons simultaneously until the Apple logo appears. Let go of the buttons and let the device restart. See if that fixes your problem.
    Could also be not enough free space for the iPad to operate efficiently. With iOS 7 it is recommended that you have 15-20% of the storage space on the device free.  For a 16 GB device that is 2.4-3.2 GB free. For a 32 GB device that is 4.8-6.4 GB free. For a 64 GB device that is 9.6-12.8 GB free.
    If neither of these suggestions helps, Make an appointment at an Apple Store to have your device examined by a technician. Or contact Apple Support.

  • Graphic card problem maybe? Since when I have changed the hard drive to my macbook pro and I installed all the new softwares, my mac is very slow and the screen gives crazy pictures,could maybe be the graphic card, does anybody have experienced this?

    Graphic card problem maybe? Since when I have changed the hard drive to my macbook pro and I installed all the new softwares, my mac is very slow and the screen gives crazy pictures,could maybe be the graphic card, does anybody have experienced this?

    after a restart it works for a time, but always slow. I went to the Applestore this afternoon and the made a check and said it would be the logicboard and they would have to change it for CHF 600 and it would be ready in 10 - 15 days

  • I have installed the new iOS 5 on my Iphone 3GS and my bluetooth connection doesn't work anymore. Does anybody have a solution?

    I have installed the new iOS 5 on my Iphone 3GS and my bluetooth connection for my Philips bluetooth headset doesn't work anymore. Does anybody have a solution?
    I have checked the headset on another Iphone with iOS 4 and it works well.
    Thanks for your help!
    Pierre (from Paris - France)

    Bonjour Pierre,
    there seems to be a bug in iOS5 with regards to Bluetooth. THere are a lot of threads in here on this. We're all waiting for Apple to fix this...

  • Does anybody have a WLST script for step-by-step cluster restart?

    Does anybody have a WLST script for step-by-step "smart" cluster restart?

    Dear SAM,
    are you looking for exchange 2013 installation. Please follow below link. I have done the same scenario as yours
    1. install first VM - 2012
    2. Static IP / loopback as primary DNS
    3. install ADDS /DNS (forwarder to ISP)
    4. install second VM - Static IP again
    5. DNS of second VM to be the IP of first VM
    6. this will join the domain
    7. installation of exchange will be simple, configuration from this link : http://www.techieshelp.com/exchange-2013-step-by-step-configuration/
    MARK AS USEFUL/ANSWER IF IT DID
    Thanks
    Happiness Always
    Jatin

  • I just bought my mac book pro and updated to mountain lion and I don't know why it is taking around 1minutes and 10sec to boot up,does anybody have any idea? thank you in advance

    I just bought my mac book pro and updated to mountain lion and I don't know why it is taking around 1minutes and 10sec to boot up,does anybody have any idea? and also how can I make my laptop boot up faster?thank you in advance

    Call Apple Care. 
    #1 - You have 14 days from the date of purchase to return your computer with no questions asked.
    #2 - You have 90 days of FREE phone tech support.
    #3 - If you've purchased an AppleCare Protection Plan, your warranty last for 3 years.   You can obtain AppleCare anytime up to the first year of the purchase of your computer.
    Take FULL advantage of your warranty.  Posting on a message board should be done as a last resort and if you are out of warranty or Apple Care has expired. 

  • After updating to Maverick, Photoshop cs6 is freezing up repetitively. The "initializing text tool" progress bar seems to be popping up out of nowhere. Does anybody have any ideas about why this is happening?

    After updating to Maverick, Photoshop cs6 is freezing up repetitively. Does anybody have any ideas about why this is happening?

    After updating to Maverick, Photoshop cs6 is freezing up repetitively. Does anybody have any ideas about why this is happening?

  • Upgraded iPad3 to iOS6.1 and cannot connect with Cell service.  Does anybody have a fix?

    I just upgraded my iPad3 to iOS6.1 and now I cannot connect with Cell service.  Says its "Searching".  Everything else appears to be working.  Does anybody have a fix?  Thx!!

    full update

Maybe you are looking for

  • Siebel 8.1[21039] installation problem on Windows

    I'm installing Siebel 8.1[21039] HOR build on a Windows 2003 server machine and it pop out bunch of error messages as following during the gateway server installation. unable to launch:"C:\tmp\2\LRE2.tmp\bin\java.exe -Dtemp.dir=C:\tmp\2 -cp e:\appmgr

  • Advice on creating an email template in CS4

    I have CS4 and am pretty good at using it. I want to create a templet that I can add my product and send out as a news letter. I am not sure how to do this. Can I build one in DW and cut and paste in imail? I also want to add this buttons so I can ge

  • Why are there no login bars on Amazon and other sites on my computer?

    When i go to log in on Amazon or even just go to Kroger.com and try to complete a survey, the spaces/bars do not appear for me to enter my information into. I have tried nearly everything i can find including starting firefox in safe mode so it can't

  • Requisition has different doc. type NB and item cat

    hi all, i got one PR from project system account assignment category N  item category standard but i am converting that pr to subcontracting PO  i am getting following error" _Requisition has different doc. type NB and item cat"_

  • Substitution of a page in Pdf file

    how to substitute a page , the front one , in pdf file