Javascript full screen display and IFRAME scrolling

Source: Internet
Author: User

Recently I made a simple touch screen program. I wanted to open the window directly with IE on the client, and I didn't want to develop anything on the client any more. I tried to block all the excess ie stuff. The Code is as follows:

<Script language =/"javascript/">

Window. Opener = NULL; window. Close ();

Self. Close ();

Newwin = Window. open ('"+ URL +"', '"+ target +"', 'top =-5, toolbar = 0, location = 0, directories = 0, menubar = 0, scrollbars = 0, resizable = 0, status = 0, copyhistory = 0, fullscreen = 1 ');

Newwin. moveTo (-6,-30); // move the block ie bar

Newwin. resizeTo (screen. availwidth, screen. availheight); // move to full screen

Newwin. outerwidth = screen. availwidth; newwin. outerheight = screen. availheight;

</SCRIPT>

On the touch screen, it is best to completely block the scrollbar:

Add: Style = "OVERFLOW-Y: hidden; OVERFLOW-X: hidden; cursor: Hand" to the body.

For IFRAME, frameborder = "0" scrolling = "no"

Check IFRAME in the page, change SRC, and display different pages. The effect is very good. All scrollbars are blocked. What should I do with the rollback frequency?

The following code can solve the problem.

VaR currentpos, timer;

VaR direct, move;

Function initialize (Dir, m)

{Direct = dir; move = m; timer = setinterval ('scrollwindow () ', 100 );}

Function SC ()

{Clearinterval (timer );}

Function scrollwindow ()

{Currentpos=iframe.doc ument. Body. scrolltop;

If (direct = "up ")

{Iframe.document.body.scrolltop=iframe.doc ument. Body. scrolltop-move ;}

Else

{Iframe.document.body.scrolltop=iframe.doc ument. Body. scrolltop + move ;}

}

The above code passes the test on IE 6

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.