Solved

Java Applet Won't Allow Anything Else on its Page

Posted on 2004-04-15
9
221 Views
Last Modified: 2010-05-18
Hello,

Thanks for reading our question.  We have a java applet.  It’s a chat room.  We want to add a banner rotation applet above it.  When we put the chat applet alone on a page, and set its dimensions to 100% x 100%, the resulting chatroom sits dead center in the middle of the page and is infinitely resizable.  You can make the window even super teensy, but the whole applet shrinks or enlarges to any dimension of the page.

However, if we add <i>anything</i> else above the chat applet, even just a <p>, then the lower edge of the chatroom falls beneath the visible.  You can still drag the window to any dimension, but the bottom edge of the chatroom always bleeds off.  Is there any way to add something to the page a java applet is on and still keep all the edges of the applet visible, and have it automatically resize to any window dimension?

Many thanks,

Yunkaa

We have tried putting both in a table and setting the table to 100% width and height, but still the lower edge of the chat applet falls beneath the visible.
0
Comment
Question by:yunkaa
  • 5
  • 3
9 Comments
 
LVL 2

Expert Comment

by:sc0rp10n
Comment Utility
Hi Yunkaa,

Personally, I dont believe using % values for applet sizes is a good idea. For your situation, I would suggest, the following:

- While page loading, get the window's available width and height,
- then calculate the proper values that you would want to have for the applet, and
- write those values to the applets widht & height params.

Also, for placement of the applet, if the table doesn't work, try using <div> tags and setting the width and height in the div's style properties.

I'm sure you need to play with this for a bit to get it right.

goodluck, HTH.
Ajay


0
 

Author Comment

by:yunkaa
Comment Utility
Hello,

Is there any workaround for this?  We'd love to be able to add something to this page.  The users are really happy with its performance, drag it any which way.  The situation: a chat applet set at 100% x 100%.  Opens in a popup.  We want to add a banner applet above the chat.  Putting tha banner on the page with the chat causes the chat to fall off the lower edge of its window.  Puttin anything on there, a <p> does the same.  Anyone have a little magic code lying around.

Many thanks,

Yunkaa
0
 
LVL 7

Accepted Solution

by:
mark-b earned 500 total points
Comment Utility
How about a two framed frameset?  

Ex:

<FRAMESET ROWS="53,*" FRAMESPACING="0" FRAMEBORDER="0" MARGINHEIGHT="0" MARGINWIDTH="0" BORDER="0">
 <FRAME SRC="banner.html" FRAMEBORDER="0" BORDER=0 SCROLLING="NO" MARGINWIDTH="0" MARGINHEIGHT="0" FRAMESPACING="0" NAME="BANNER">
 <FRAME SRC="chat.html" NAME="MAIN" FRAMEBORDER="0" SCROLLING="YES" MARGINWIDTH="0" MARGINHEIGHT="0" FRAMESPACING="0" BORDER=0>
</FRAMESET>

Have the 'banner.html' contain the banner applet for your banners, and have the 'chat.html' contain the chat applet (still at 100% x 100%).
0
 

Author Comment

by:yunkaa
Comment Utility
Hello,

Well...!  WELL?!!! YOU ARE SUCH A <b>SUPER MAGIC EXPERT!!!!!!!!!!!!!!!!!!!!!!!!!!!</b>  Thank you, THANK YOU!! Please get the wizard's hat.  We fooled around with frames for half the day but they kept collapsing on each other in resizing.  This is so WONDERFUL.  
=) =) =)

Please can you tell us which among the many zeroes here should we work with to create some margins around the outer edges of the "page".  And, again... so many thanks.

Yunkaa
0
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 

Author Comment

by:yunkaa
Comment Utility
We have posted a follow up question... =)
0
 
LVL 7

Expert Comment

by:mark-b
Comment Utility
No problem.  As far as the margin goes, I guess I would suggest you do it by style (in the applet.html file, not in the frameset html file):

<html>
 <head>
  <style type="text/css">
    BODY {
     margin:50px;
    }
  </style>
.
.
.
</html>
0
 

Author Comment

by:yunkaa
Comment Utility
Hello MArk,

THanks agian.  What we should have wrote is that we WILL BE POSTING  a follow up in another question.  We weren't trying to be pushy!  We have posted that follow up now.  Will probably make more sense there.  And again, aginn x 1,000,000 THANK YOU! :) :) :)
0
 
LVL 7

Expert Comment

by:mark-b
Comment Utility
Glad I could help!, and thanks for the points.  

Looks like Cd& has a good answer your other question.

-Mark
0
 

Author Comment

by:yunkaa
Comment Utility
Hello Again Mark,

And, you REALLY did help.  We would never have been able to do it without you.  We were totally stuck.  The developers were dragging their feet, and we were at our wits end.  Our HTML editor was just returning preloaded pages for frames, so we just gave up.  We had Frankenstiened a work around, involving giving the chat applet a height of 80%, but it just looked so rickety.  And, the chat before was so nice, so suddenly rickety was not what we were searching for.  Thank you again for sharing your expertise.  You saved the day, for sure. :))))))))))))))))))))))))))
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now