Advanced Search

Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 26

Thread: Java Applet

  1. #11
    Join Date
    Jan 2009
    Posts
    25
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Default

    http://www.chatpit.com/1test/
    Thanks guys, I think you have it perfect. Two questions if I may, how would I add say add another 1 second, or another.5 second delay. Is there any way to keep the one google ad where it was before? I may just take that one ad off anyways.
    Thank you
    Rick

  2. #12
    Join Date
    Jan 2009
    Posts
    25
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Default

    Oh, is there anyway to do this without haveing to put two applet codes on the page?
    Just keeping one in the body tag?
    Thank you
    Rick

  3. #13
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    27,641
    Thanks
    42
    Thanked 2,897 Times in 2,869 Posts
    Blog Entries
    12

    Default

    The delay length is set here:

    Code:
    setTimeout(function(){document.getElementById('app').innerHTML = applet;}, 0);
    The 0 is the number of milliseconds delay. But that's a little misleading. What 0 does is delay execution until the script interpreter isn't busy with something else. If you were to make it 1000, that would add a 1 second delay on top of that. 5000 would add 5 seconds.

    As far as where anything else can go on the page, it shouldn't matter. But if it does, we can probably work that out.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  4. #14
    Join Date
    Jan 2009
    Posts
    25
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Default

    Okay sounds good. What do you have in mind to work out? Do you also have an option for not having the applet code in the head tag?
    Thank you
    Rick

    Here is what I woukd like the page to look.
    http://www.chatpit.com/teenchat/


    Quote Originally Posted by jscheuer1 View Post
    The delay length is set here:

    Code:
    setTimeout(function(){document.getElementById('app').innerHTML = applet;}, 0);
    The 0 is the number of milliseconds delay. But that's a little misleading. What 0 does is delay execution until the script interpreter isn't busy with something else. If you were to make it 1000, that would add a 1 second delay on top of that. 5000 would add 5 seconds.

    As far as where anything else can go on the page, it shouldn't matter. But if it does, we can probably work that out.

  5. #15
    Join Date
    Jan 2009
    Posts
    25
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Default

    http://www.chatpit.com/1test/

    I managed to fix the ad part.

    Rick

  6. #16
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    27,641
    Thanks
    42
    Thanked 2,897 Times in 2,869 Posts
    Blog Entries
    12

    Default

    What I meant by:

    As far as where anything else can go on the page, it shouldn't matter. But if it does, we can probably work that out.
    I meant that if moving other things around on the page caused our current solution to stop working as desired, we could probably work that out. I also meant that I didn't think that moving other things around would be a problem.

    Anyways, looks like this thread is resolved, right?
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  7. #17
    Join Date
    Jan 2009
    Posts
    25
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Default

    I was hoping there was another solution other than having two applet codes on the page. But this solution looks like it will work great. Who do I pay for it?
    Thank you
    Rick

  8. #18
    Join Date
    Jan 2009
    Posts
    25
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Default

    Or to I just make a donation to any of the links posted?
    Thank you
    Rick

  9. #19
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    27,641
    Thanks
    42
    Thanked 2,897 Times in 2,869 Posts
    Blog Entries
    12

    Default

    About having two applet codes - the way that works out is that if a user has javascript disabled, they get the second code, things will not load up as you desired, and other scripts will not run, but at least they will still be able to use the applet. With most users (those with javascript enabled), they will get the first code - in the load order that you have set for it.

    This is a very common practice in javascript - providing a fall back for non-javascript enabled users via the noscript tag.

    However, don't worry about the duplicate code. Regardless of whether or not a given user has javascript enabled, their browser will only have to (be able to) parse one of them.

    As for any payment/donation. None is required. I'm always happy when one of my favorite charities gets some help. And if you feel motivated to compensate me directly, you may always donate to my PayPal account. If you want to do that, and need help doing so, let me know. Otherwise, just click on one of the donation links for one of my favorite charities. Or - go merrily on your way. It's all up to you, no payment or donation is required.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  10. #20
    Join Date
    Jan 2009
    Posts
    25
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Default

    Sounds fair, I can you see if I have it setup correctly on this page first:
    http://www.chatpit.com/teenchat/

    I have already seen one issue where the applet does not load, when I used the back button, I am willing to try it with the code on for a few days to see what happens. The reason I was hoping I could just get one applet on the page is because I have a huge one on here:http://www.chatpit.com/index.htm

    This solution I could not use for that page.
    I was thinking 25 and 25 for the current work or I could just give you 50,
    Please advise.
    Thank you
    Rick
    Last edited by Rick777; 01-24-2009 at 04:53 AM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •