Controling a Browser. Can anyone help?

I am currently trying to display formatted HTML through the use of Java. I know that the easiest way to display formated HTML is by opening the document in a browser using the clientAppletContext.showDocument method. This does not allow me to control the browser window. I know that Javascript allows you to have more control over the browser and would like to use it somehow through java but I'm new to java and I'm not sure how or what I need to do in order to do so. Can anyone help?

wimbishd,
I am providing some javascript functions that you can use that give you an example of how to control the window size, toolbar, menu, etc. I am a little unsure as to what you are doing with your applet. If you are tying to display your java code in HTML format, download textpad from http://www.textpad.com/. There is a plugin for it that will also you to convert your java code to color-coded html. Or, maybe you are just having your applet open up a new window using HTML that you created with your applet. If that is the case, you will need to code the javascript into the html. See sample below:
<HTML>
<HEAD>
<TITLE>Sample</title>
<SCRIPT language="JavaScript">
<!--
* openSizablePopupWindow(): opens a javascript window based upon the file Name  *
function openSizablePopupWindow(fileName,windowName,width,height) {
   var sHeight = screen.availHeight;
   var sWidth = screen.availWidth;
   //center the window on the screen
   var y = (sHeight/2 - height/2);
   var x = (sWidth/2 - width/2);
   var newWindow = getNewWindow(fileName,windowName,"no","no","no","yes","no",height,width,x,y);
   return newWindow;
}//end openSizablePopupWindow
* getNewWindow(): opens a javascript window (customizable) *
function getNewWindow(fileName,windowName,statusbarValue,menubarValue,toolbarValue,
   resizableValue,scrollbarsValue,height,width,x,y) {
      //use "yes" or "no" for statusbarValue, menubarValue, and titlebarValue
      var newWindow = window.open(fileName,windowName,
         "status="+statusbarValue+",menubar="+menubarValue+",toolbar="+toolbarValue+","+
         "resizable="+resizableValue+",scrollbars="+scrollbarsValue+","+
         "height="+height+",width="+width+","+
         "top="+y+",left="+x+"," + //IE only
         "screenX="+x+",screenY="+y //netscape only
   return newWindow;
}//end getNewWindow  
* doButton(): Action to take when they press a button *
function doButton() {
   newWindow = openSizablePopupWindow("sample.html","someWindowName",400,500);
   newWindow.focus();
   return true;
}//end doButton function
//-->
</script>
</head>
<BODY>
<FORM name="sampleForm" method="get">
<input type="button" name="action" value="Press Me" onclick="doButton();">
</form>
</body>
</html>I hope this helps,
tajenkins

Similar Messages

  • I use some special characters (vowels with an accent mark), these are not showing up properly, whereas they do on my old IE browser-can anyone help?

    Here's an example. The Irish word "Lúnasa" is showing up as "L�nasa" when I post it in places such as Yahoo! Groups. This does not happen with my old IE browser. Thanks for any help!

    No, the first "Lúnasa" looks correct. The second one is how it appears after posting it to a Yahoo! Group. It's odd, because when I view the same post in the Yahoo! Group via IE8, it looks fine. Just to fill out the details, I wrote the original "Lúnasa" in MS Word, then copied and pasted it into my Yahoo post. Needless to say, I am confused!
    Thanks again for you help!

  • When I try to set up Icloud control panel in Windows Vista, I get "your setup couldn't be started because the Icloud server stopped responding. I've tried loads of fixes suggested on the net but none worked. Can anyone help me please?

    When I try to set up Icloud control panel in Windows Vista, I get "your setup couldn't be started because the Icloud server stopped responding. I've tried loads of fixes suggested on the net but none worked. Can anyone help me please?

    Hello, ksb2. 
    Thank you for visiting Apple Support Communities.
    We are investigating this issue. This article will be updated as more information becomes available.
    iCloud: iCloud Control Panel setup cannot be started
    http://support.apple.com/kb/TS5178
    Cheers,
    Jason H.

  • I have a MacBook Pro with Snow Leopard. After connecting my HP Photosmart D110 to it, the printer works but the scanner doesn't. The message is"The scan cannot be performed because another program has control of the HP imaging device". Can anyone help?

    I have a MacBook Pro with Snow Leopard. After connecting my HP Photosmart D110 to it, the printer works but the scanner doesn't. The message is"The scan cannot be performed because another program has control of the HP imaging device". Can anyone help?

    Found the answer on the HP site. It's the original software that works with this printer OS X 10.6!!
    http://h20000.www2.hp.com/bizsupport/TechSupport/SoftwareDescription.jsp?lang=en &cc=us&prodTypeId=18972&prodSeriesId=3558902&prodNameId=3562006&swEnvOID=219&swL ang=8&mode=2&taskId=135&swItem=ma-60835-3

  • Flash swf that runs on every browser except in Firefox. Can anyone help me please?

    Hello.
    I have an flash swf in a site that runs on every browser except in Firefox. I get an warning telling me that the page requires a newer version of flash player but i already have the 10,0,32,18 and the swf was published for flash player 9.
    Can anyone help me please?

    The figures you mention only make sense on your intranet.  Are you still using the same wireless router.  The verizon one is somewhat limited as far as max wireless-n performace.  For one thing it only has a 2.4 radio.   I like many people who wanted wireless-n performance before they even added a wireless-n gigabit router, have my own handling my wireless-n network.

  • Hi there, I want to change the background-color of the browser, when a popup-picture is shown. This picture pops up by clicking a hyperlink in the text...can anyone help me please...thanks a lot

    Hi there, I want to change the background-color of the browser, when a popup-picture is shown. This picture pops up by clicking a hyperlink in the text...can anyone help me please...thanks a lot

    Hi,
    CSS is interpreted by your browser, so server cache seems unlikely in htis case. There is however some hierarchy in CSS, so parts of the APEX CSS, theme CSS or page CSS might overwright or block yours.
    Does changing the CSS on runtime affect your page? Eg, run the following in your browser console and see if your page turns black: $('#uBodyContainer').css("background-color","black")
    Also try moving up your css in the hierarchy labeling it as important:
    div#uBodyContainer { 
      background-color:#000000 !important;  
    See:Assigning property values, Cascading, and Inheritance
    Regards,
    Vincent
    http://vincentdeelen.blogspot.com

  • Can't remember how to enlarge web browser screen on OSX 10.6. Can anyone help?

    Can't remember how to enlarge web browser screen on OSX 10.6. Can anyone help?

    Hi ..
    Click and drag out the bottom right corner of any Safari window.

  • How can we give a padding-right:28px; to a frame in firefox, while all the other browsers are supporting the padding style which firefox Mozilla browser doesn't . can anyone help me on this.

    How can we give a padding-right:28px; to a frame in firefox, while all the other browsers are supporting the padding style which firefox Mozilla browser doesn’t . can anyone help me on this.

    That should be working.<br />
    Can you post a link?
    Reload web page(s) and bypass the cache.
    * Press and hold Shift and left-click the Reload button.
    * Press "Ctrl + F5" or press "Ctrl + Shift + R" (Windows,Linux)
    * Press "Cmd + Shift + R" (MAC)
    A good place to ask advice about web development is at the mozillaZine Web Development/Standards Evangelism forum.<br />
    The helpers at that forum are more knowledgeable about web development issues.<br />
    You need to register at the mozillaZine forum site in order to post at that forum.<br />
    See http://forums.mozillazine.org/viewforum.php?f=25<br />

  • I have a state space model of a complex system. can anyone help me for implementi​ng MPC and e-MPC control for the same?????

    Hi everyone. I am new to the forums, so let me be as mprecise as possible. i know the basic functionalities of Labview with MPC block etc. However, i dont know how to go ahead with implementing MPC control for a system whose state space model i possess. can anyone help me out?? the problem is that i dont even know the approach or the starting point..

    This happens if you remove a program manually, but still have the registry keys to load files from this program.<br />
    You can use the MSConfig program or the Autoruns utility to see which software and services are getting started.
    *http://technet.microsoft.com/en-us/sysinternals/bb963902.aspx
    You can use registry editor and do a search (Ctrl+D) for imesh to see if you can locate the registry key(s) that launches this program on a reboot.
    Try to ask advice at a Windows oriented forum if you can't fix this.
    * http://www.bleepingcomputer.com/forums/ - BleepingComputer.com - Computer Help Forums
    * http://windowssecrets.com/forums/ Windows Secrets Lounge

  • I am looking for the volume control for skype /iPad ? Can anyone help please?

    I am stumped.
    I can hear people on my iPad skype but they can't hear me.
    They say to turn up the volume on the volume control on the menu bar ?? I can't see any menu bar.
    They say check the Audio Settings ?? Where ?? Ohhhhh I am so sad!
    Can anyone help this old digger ? Please.

    Is the iPad connected to the internet?
    If so, and it's still not working just restore the iPad.
    Note: Take a picture with your iPhone, wait 5 mins then check photo stream on your iPad and see if it appears.

  • My iTunes parent control keeps giving me the same error message. "Parent control preferences could not be unlocked. You may need to reinstall iTunes. "I have uninstalled ant reinstalled iTunes that 4 time now and I still can't get on. Can anyone help?

    My iTunes parent control keeps giving me the same error message. “Parent control preferences could not be unlocked. You may need to reinstall iTunes. “I have uninstalled ant reinstalled iTunes that 4 time now and I still can’t get on. Can anyone help?

    Experimental advice ... but, plausibly, the preference files containing the parental control setting may be damaged. If so, removing the iTunes preference files may help.
    For the basic technique, see the "Remove iTunes preference files" section from the "User-specific troubleshooting" section of the following document:
    iTunes for Windows Vista or Windows 7: Troubleshooting unexpected quits, freezes, or launch issues
    To see those folders, you'll need to first set your PC to view hidden files and folders
    In your Start menu, open Computer.
    In your Organise menu, select Folder Options.
    In the View tab, make sure that "Show hidden files and folders" is selected, and Hide extensions for known file types is unchecked.
    Click OK.
    Prior to doing the preference file rebuilds: Best to make a note of any custom preferences you have set up for your iTunes. (Rebuilding pref files returns preferences to their defaults ... so you'll likely have to set some of those custom preferences up again from scratch.) Also make a note of any third-party plugins/add-ons you have installed. You may have to reinstall those after the rebuilds.
    Things to watch out for during the rebuilds
    Rebuilding the preference files in the \Local\ location causes the iTunes license agreement to run. So you'll need to agree to that again.
    Rebuilding the preference files in the \Roaming\ location causes the iTunes Setup Assistant to run. When prompted to do so, do not add files to your iTunes library. (Otherwise you'll end up with a library full of duplicates.)

  • I just loaded Lion oxs 10.71 and now my Logic 9 software wont show up it says its not compatible also i cant find my macintosh harddrive icon that is usually shown on dektop and device browser column can anyone help me with this problem

    I just loaded Lion oxs 10.71 on my I-mac computer, and now my Logic 9 software wont show up it says its not compatible also i cant find my macintosh harddrive icon that is usually shown on dektop and device browser column can anyone help me with this problem.

    Mike,
    I had a similar issue with Photoshop when I upgraded to both Snow Leopard and Lion.  it turned out to be Rosetta is no longer present in the newer OS.  Once I upgraded to Lion, Appleworks stopped working after all these years.

  • I can't sign in to my icloud control panel, I have uninstalled and reinstalled icloud, but when i sign in I just get a permanent "egg timer" I can't make any changes to my set up! Can anyone help?

    Hi can anyone help with my problem?
    thanks Caz

    You have to go to icloud.com from your computer browser, not from your iPad.  When you do, you won't bet the prompt to install iCloud.

  • Updated my ipad 2 to ios 7.1, I cannot delete no more safari browsing history, can anyone help me?

    Updated my ipad 2 to ios 7.1, I cannot delete no more safari browsing history, can anyone help me?

    Hello, Robertofromfo. 
    Thank you for visiting Apple Support Communities. 
    This sounds like you may have Private Browsing enabled.  The article below will show you how to disable this feature.
    iOS: Safari web settings
    http://support.apple.com/kb/HT1677
    You can also attempt to clear your history via the steps below. 
    Follow these steps to clear information from your device:
    To clear your history from Safari, tap Settings > Safari > Clear History.
    To clear all cookies from Safari, tap Settings > Safari > Clear Cookies and Data.
    To clear other stored information from Safari, tap Advanced > Website Data > Remove All Website Data.
    Cheers,
    Jason H. 

  • I inherited an 2003 ipod from my daughter. The controls will not work when it is plugged into a power source. Can anyone help?

    I inherited a 2003 ipod from my daughter. The controls will not work when it is plugged into a power source. Can anyone help?

    But they work normally when not plugged in?  What kind of power source are you plugging it into? It maybe outputting more than what the iPod can handle.  I had this happen to an iPod I plugged into a powerstrip that was plugged into the cigarette lighter in a vehicle an experienced the same thing.
    B-rock

Maybe you are looking for

  • DVD Drive stalls/crashes computer

    Having some odd problems with my DVD drive in my G5 2x2.66 GHz Dual Core. If I put a DVD in the tray the DVD player launches and the DVD window is completely screwed up. The perspective is screwy and the image is mangled as well. It also stall my OS

  • After HUGE document, Pages will not launch

    I've been helping someone build up a big "photo-book" in Pages. We've scanned 700+ hi-resolution (300 dpi) images and filled a Pages document to the tune of 106 pages. The document itself is now 3.17 GB. Ouch! (This is all happening on an iMac with 4

  • LEDs on front panel

    Employed my Vista Pavilion for several years without incident until last night when I noticed the top "on/off" button which usually glows a light blue was unlit.   I originally assumed a power glitch, so I just restarted the machine to note the follo

  • Garageband with focus rite scarlett 2i2 troubleshoot

    i am attempting to record vocals over an mp3 using a focusrite 2i2 interface in garageband. i don't have monitors, but i'm plugged into the headphone mac for in-ear monitoring. i changed sound inputs and outputs to the interface and i can hear myself

  • Rewire, 1010lt and my sanity...

    (Reason4.0) okay...Ive got rewire setup in Audition and it all interacts properly. Using an m-audio delta 1010LT. Sound is there, all seems proper. I just cannot figure how to record it. I record into Reason and the block is there but how the hell do