Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Page 1 of 3 123 LastLast
Results 1 to 10 of 25

Thread: Button coding?

  1. #1
    Join Date
    Dec 2007
    Posts
    2,807
    Tokens
    0

    Latest Awards:

    Default Button coding?

    What code would I give to a button so that when I click it it launches lol.html in a new window at a fixed size of 900x440. A bit like habbo does with their launch the hotel button. +Rep to whoever knows it.

  2. #2
    Join Date
    Feb 2007
    Posts
    2,941
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by Mythim View Post
    What code would I give to a button so that when I click it it launches lol.html in a new window at a fixed size of 900x440. A bit like habbo does with their launch the hotel button. +Rep to whoever knows it.
    I am pretty sure on the lol.html page you would have to enter some code on that so it opens at 900x440.

  3. #3
    Join Date
    Dec 2006
    Posts
    3,970
    Tokens
    0

    Latest Awards:

    Default

    Lets set the stage on fire, and hollywood will be jealous.

  4. #4
    Join Date
    Dec 2007
    Posts
    2,807
    Tokens
    0

    Latest Awards:

    Default

    Cool site but I want to apply it to a button I have already made not generate another button.

  5. #5
    Join Date
    Feb 2005
    Location
    Sheffield
    Posts
    2,288
    Tokens
    1,686

    Latest Awards:

    Default

    Put this in the head section:

    Code:
    <script language="JavaScript">
    function popUpWindow(URL) {
    day = new Date();
    id = day.getTime();
    eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=900,height=440');");
    }
    </script>
    and this around the image of your button:

    Code:
    <a href="javascript:popUpWindow('lol.html')"></a>

  6. #6
    Join Date
    Dec 2007
    Posts
    2,807
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by Smiffla View Post
    Put this in the head section:

    Code:
    <script language="JavaScript">
    function popUpWindow(URL) {
    day = new Date();
    id = day.getTime();
    eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=900,height=440');");
    }
    </script>
    and this around the image of your button:

    Code:
    <a href="javascript:popUpWindow('lol.html')"></a>
    Doesnt work, just misaligns all the buttons verticall Thanks anyway.

  7. #7
    Join Date
    Feb 2005
    Location
    Sheffield
    Posts
    2,288
    Tokens
    1,686

    Latest Awards:

    Default

    :S Should work :S

    I tested it before I posted it, what browser are you using?

  8. #8
    Join Date
    Oct 2007
    Location
    Luton, England
    Posts
    1,548
    Tokens
    388
    Habbo
    DeejayMachoo

    Latest Awards:

    Default

    Quote Originally Posted by Smiffla View Post
    :S Should work :S

    I tested it before I posted it, what browser are you using?
    No use if it doesnt work in all browsers...


  9. #9
    Join Date
    Feb 2005
    Location
    Sheffield
    Posts
    2,288
    Tokens
    1,686

    Latest Awards:

    Default

    Quote Originally Posted by Oojamaflip View Post
    No use if it doesnt work in all browsers...
    I'm perfectly aware of that, don't insult my intelligence. I was just asking which browser so I could try it out when I get home.

    Obviously it's a very weird thing to happen as a result of the code I gave, so I was going to have a look and see why it did that.

    Permission to continue doing so, sir?

  10. #10
    Join Date
    Dec 2006
    Posts
    3,970
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by Mythim View Post
    Cool site but I want to apply it to a button I have already made not generate another button.
    Just use css to apply the style to the button so it looks like the one you allready made.
    Lets set the stage on fire, and hollywood will be jealous.

Page 1 of 3 123 LastLast

Posting Permissions

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