Hi Screen Resolution

[b][red]This message was edited by lovelyjob at 2005-12-31 13:16:51[/red][/b][hr]
Hello

I would like to set up screen resolution in java script for my website.
I would like to know more about Onload() function.

1) Will the logic implemented inside the onLoad() function will be
automatically invoked without even calling that function.

2) Can we embedded pieces of Java code in javascript not rather than applets in a web page.

Thanks
Lovely.


Comments

  • If by "set up resoution" you mean the user's window's resolution the answer is no - of course.

    If you mean the size in pixels of the browser window, then the answer is yes, use: window.resizeTo(width, height). But I strongly advise you not to use it, as it will annoy people to have their browser resolution changed. I know I get annoyed.

    The onload event will automatically be called when the webpage has finished loading. Use it like this:

    [CODE][SIZE=2]

    function init() {
    }



    [/SIZE][/CODE]

    And take a look at this page:
    http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/dhtml_node_entry.asp
    The [blue]DHTML reference[/blue] -> [blue]DHTML events[/blue] link is what you need.

    As javascript has nothing to do with java although they are syntactically very similar, you cannot embed java in any other way than in an applet.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion