How to scroll within a datagrid without the browser window scrolling as well

Hi,
I have a datagrid with a vertical scrollbar. When the mouse
is over the datagrid i'd like to use the mouse wheel to scroll
through its contents. However when i do this the main browser
window (which also has a vertical scrollbar) scrolls as well. How
can i prevent the main browser window from scrolling when the mouse
is over the datagrid so that only the contents of the datagrid
scroll?
Thanks

I found some javascript code that solves this problem. Credit
for the code has to go to the person who wrote the excellent
article at the following link:
http://www.switchonthecode.com/tutorials/javascript-tutorial-the-scroll-wheel
If you read this article the code below should make sense.
From this article i used the hookEvent and cancelEvent
functions. In my particular case I embed the SWF object inside a
JSP page using some javascript code. After the SWF is loaded i
added the following line of code:
hookEvent('my_swf_id', 'mousewheel', handleMouseWheel);
where handleMouseWheel is defined as follows:
function handleMouseWheel(e)
if (document.getElementById("my_swf_id"))
document.getElementById("my_swf_id").focus();
return cancelEvent(e); // This is the key to the solution...
When the mouse is over the datagrid in the SWF i can use the
mouse wheel to scroll its contents without the main browser window
scrolling at the same time.
Thanks to all who took time to post their ideas, it was
appreciated.

Similar Messages

  • How can you stop slideshow from resizing the browser window iframe ?

    Does anyone know where the code is that causes the iweb slideshow to resize the browser window when it is opened?
    When it is placed on a page using <iframe src="http://homepage.mac.com/coreydee/slideshow/index.html" width="760" height="580" scrolling="no" style="border:none;" frameborder="0"></iframe> It resizes the browser window when it starts.

    Does anyone know where the code is that causes the
    iweb slideshow to resize the browser window when it
    is opened?
    When it is placed on a page using <iframe
    src="http://homepage.mac.com/coreydee/slideshow/index.
    html" width="760" height="580" scrolling="no"
    style="border:none;" frameborder="0"></iframe> It
    resizes the browser window when it starts.
    The iWeb .Mac slideshow, which you previously tried to add in an iframe, does have a function to resize the window. But it would not cause the whole window to resize, just page within the iframe so you would never know.
    However, the autoviewer one you are using should not do this.

  • How to set a fixed size for the browser window on startup?

    so the browser window has the same size and location on the desktop every time i open a new window???

    In a 2D coordinate system the horizontal values are represented by some letter, usually x. In the same coordinate system the vertical values are classically represented by y.
    Note: In your code, if you wish, you can replace x and y with anything you desire--p and q or perhaps jeff and alice or any variable name you wish, but for simplicity, and usually ease of understanding because almost everyone has had 100's of math problems drilled into their head with (x, y), x and y are used as convention.
    In Java the screen coordinates run from 0 to the width-1 for x and 0 to height-1 for y of the component you are using to display.
    So logically when you have a value of x or y that goes beyond the addressable bounds of your display, then you have to make some type of adjustment--when your value dips below 0, you reset it to 0, when your value goes above what ever width-1 or height-1 then you have to set that value to width-1 or height-1.
    This all assumes that when you hit the wall, floor, or ceiling you stick there until you change directions--if you wish to wrap then you set your value to the opposite bound--so if you go below 0, you would then pop out back in on the right side--your appropriate x would be set to width-1 instead of 0 and in the case of y going below 0 your y would be set to height-1. This is also to say that when you descend below your minimum, then you would pop back out on the opposite side you went out on--so x greater then width-1 would get set to 0 and y greater than height-1 would get set to 0.
    That is not even a start on if you want to include elastic collisions, angle of impact, any type of deceleration force, or anything else.
    In any case... I would recommend that you add more math to your studies, I've never met an engineer or computer science grad that said: "Wow, I really regret taking all that math in college (or HS), I never use it."

  • How can i print an email without the attached pictures printing as well?

    I am trying to print an email that has pictures attached. I do not need the pictures to be printed.
    The pictures are showing in the body of the email.
    When I try to print it scales down the text to make two of the pictures fit on the first page.
    How do I change this so I can print the text separately?

    If the sender embedded the image instead of attaching it then you could try selecting only the text before printing That should print without the images. Thunderbird will only prints what is selected unless there is nothing selected. Then it prints all. You can test this with Print Preview.
    If the image is truly an attachment, then go to the menu bar and select View and uncheck Display Attachments Inline.
    No menu bar? Press the alt key.

  • How do i get my navbar to stay on one line when the browser window is minimized?

    I am new to coding and have just created my first website in html and css.  I know that the coding is pretty dire and that I have a lot to learn and hope that someone can guide me in how to solve this problem.  When the browser window is minimized, the navbar breaks down into 2 or 3 lines but I want the navbar to fit to the window whatever the size of the client machine.
    I think I need to add a media query but i'm not sure if i do and if so what code to use and where to put it?
    I am worried that the page will only be viewable properly on a desktop and i really want to learn how to make a fluid layout which can be viewed on 320px, 768px and 1200px.
    Any guidance would be greatly appreciated.
    Here is my code:
    HTML
    <!doctype html>
    <html>
    <head>
    <meta charset="utf-8">
    <title>The Engineer's Corset</title>
    <link href="styles/style.css" rel="stylesheet" type="text/css" media="screen">
    <style type="text/css">
    body {
        background-color: #000;
    </style>
    </head>
    <body>
    <div id="container">
    <div id="navbar">
        <ul id="nav">
        <li><span class="current-menu-item">Home</span></li>
        <li><a href="about.html">About Us</a></li>
        <li><a href="workshops.html">Workshops</a></li>
        <li><a href="news.html">News</a></li>
        <li><a href="gallery.html">Gallery</a></li>
        <li><a href="contact.html">Contact Us</a></li>
        </ul>
    </div>
    <div id="header">
      <img src="images/final/headerbeauty3.png" width="1100" height="341" alt="The Engineer's Corset">
    </div>
    <div id="links">
    <ul id="link">
    <li><a href="https://www.facebook.com/Bristolengineer" target="_blank"><img src="images/final/fb3.png" width="200" height="45" alt="Follow Us on Facebook"></li>
    <li><a href="https://twitter.com/Engineerscorset" target="_blank"><img src="images/final/twitter2.jpg" width="200" height="45" alt="Follow us on Twitter"></a></li>
    </ul>
    </div>
    <div class="chantry">
    <img src="images/final/CD Logo fin.png" width="240" height="200" alt="Chantry Dance Company">
    </div>
    <div class="about">
      <p> The Engineer's Corset is a new play written by Janet Goddard for performance by the community of Bristol in 2015. <br>  ~ <br>
    The play is based on the extraordinary real-life events of 1843 surrounding Isambard Kingdom Brunel's near-death experience after swallowing a coin.  We travel through time to explore the adventure and horror of Victorian industrialisation. <br> ~ <br> Using a community theatre group The Engineer’s Corset tells a familiar tale of Brunel’s near death experience when he swallows a gold half sovereign. His wife Mary fights to maintain her composure but is ripped apart by the waiting game. Her servants and his workforce, using dance and sound, broaden her horizons. Just like Mary the audience too will see life in the 1840s through a different lens.</p>
    </div>
    <div class="workshops">
    <img src="images/final/bridgebridge.jpg" width="1100" height="713" alt="clifton suspension bridge">
    <span><a href="workshops.html">We will be running a series of workshops prior to production and hope you will join us.  For further information, click here.</a></span>
    </div>
    <div id="sponsorspace"></div>
    <div id="footer"> <p> &copy; Heartprints Web Design 2014 </p> </div>
    </div>
    </body>
    </html>
    CSS
    @charset "utf-8";
    /* CSS Document */
    body {
        font-family:Arial, Helvetica, sans-serif;
        font-size:125%;
    @media screen {
        #navbar:
    #navbar li {
        font: 25px Arial;
        display: inline;
        list-style-type: none;
        background: #09F;
        color: #000;
        border-radius: 20px;
        padding: 15px 25px;
    .current-menu-item {
        color: #0FF;
    #navbar a {
        padding: 15px 25px;
        background-color: #6cf;
        color: #000;
        text-decoration: none;
        border-radius: 20px;
    #navbar a:hover {
        background-color:#0FF;
        color: #000;
        padding: 15px 25px;
    #header {
        width: 1100px;
        height: 340px;
        margin-left: 50px;
        margin-top: 0px;
        margin-bottom: 0px;
        border-style: ridge;
        border-width: 5px;
        border-color:#09F;
    #links li {
        display: inline;
        width: 700px;
        margin-left: 300px;
    .chantry {
        margin-left: 40px;
    .about {
        position: relative;
        width: 860px;
        text-align:center;
        background-color: #CCC;
        color: #000;
        border-style: ridge;
        border-width: 3px;
        border-color:#09F;
        border-radius: 15px;
        float: right;
        margin-top: -200px;
        margin-right: 90px;
    .workshops{
        position:relative;
        width: 1100px;
        height: 713px;
        font-size:24px;
        margin-left: 50px;
        border-style: ridge;
        border-width: 5px;
        border-color:#09F;
        margin-top: 130px;
    .workshops span {
        position: absolute;
        background: #6CF;
        color: #000;
        left: 30px;
        top: 30px;
        right: 800px;
        padding: 15px;
        font: 1em georgia, serif;
        font-style:italic;
        text-align:center;
        border: 5px solid #09F;
        border-radius: 20px;
        margin-top: 35px;
    .workshops span a {
        color: #000;
    #link li {
        border-style: solid;
        border-color: #6CF;
        padding: 30px 10px 5px 10px;
    .info {
        text-align:center;
        width: 1100px;
        margin-top: 50px;
        margin-bottom: 50px;
    .CDC {
        float: left;
        margin-right: 50px;
        margin-left: 45px;
    .workshopinfo {
        height: 250px;
        text-align:center;
        margin-top: 50px;
    .photos {
        Height: 500px;
        text-align:center;
        margin-top: 50px;
    #footer {
        text-align:center;
        margin-top: 700px;
        color:#0CF;
    .brunel {
        margin-top: 50px;
        margin-left: 400px;
    #workshops2{
        width: 1000px;
        border-style: outset;
        border-width: 5px;
        padding: 15px;
        border-color:#09F;
        background-color: #6CF;
        margin-left: 100px;
        text-align:center;
    #workshops2 a {
        color: #000;
    #sponsorspace {
        height:  300px;
        background-color: #6CF;
        border-style: outset;
        border-color: #09f;
        margin-top: 15px;

    Give #navbar a width that is wide enough to hold all of the buttons within it.
    #navbar {
         width:####px;
    Replace #### with a pixel number large enough to hold the nav buttons.

  • How can I attach an image without the image is in the email body? (using the new mail the Lion)

    How can I attach an image without the image is in the email body? (using the new mail the Lion)
    I want in attachment, not in the body mail.

    I think your only solution is to zip the image files first and then attach them.
    Read this from a site I found:
    Sending Graphical Attachments -- When you attach a graphical image to your message, the recipient of your message sees the image inline (that is, in the body of the message) if her email client supports inline display. ("Take Control of Email with Apple Mail" contains a table listing the capabilities of popular Mac and PC email clients.) If a client does not support inline display (or the recipient has turned off the inline display option), the file appears as an attachment that must be opened in a separate program.
    On the one hand, an inline image is easier for the recipient to see - all she has to do is look at it. On the other hand, inline images can be frustrating to scroll through. If you do not wish to send a graphical image inline, you must compress the file before attaching it - Mail, sadly, lacks a built-in compression option, though fortunately for Panther users, the Finder offers Zip compression without requiring a separate application.
    Note that when you compose a new message, Mail always shows attachments in the body of your message. You can manually drag them somewhere else, but many email clients display all attachments in a separate list, regardless of where you place them in the message body.
    If you paste an image into a message or drag & drop an image from another window (say, a Web browser), Mail converts the raw image data to an attachment in TIFF format. On the other hand, if you drag & drop the icon of an image file (or use the Attach button to locate the file using the file browser), Mail leaves the attached image in its original format. This difference is significant, because although most email clients can display JPEG images just fine, support for TIFF - especially in non-Mac email clients - is less common. If possible, I suggest attaching image files as opposed to pasting or dragging in raw image data.

  • How can i use my account without the billing info, as i do not have a credit card. and my shipping and billing info is under US. i'm in singapore. how do i change this?

    how can i use my account without the billing info, as i do not have a credit card. and my shipping and billing info is under US. i'm in singapore. how do i change this?

    If you are just visiting Singapore, then leave the account as it is. If you have moved there, then view your account using the iTunes app on a Mac or PC and change the country/region to your current location and address. If you do not have a bank card, you can fund your account using iTunes gift cards if available in Singapore.

  • How can I use Office Update without the Office CD?

    How can I use Office Update without the Office CD? On the microsoft website I've clicked the options which mean I shouldn't need the CD (which wasn't supplied with the laptop), but poartway through updating the service pack I get a request for the Office 2000 Professional CD.
    Any suggestions?

    Hi
    Did you mean a Office or One Note?
    As far as I know the One Note is a part of the Recovering Image and the CD is not delivered with the unit. Furthermore the Toshiba units are not delivered with the Office 2000 software.
    Nevertheless, did you check the update function in the Help i.e. in Word?
    There you will find a options called Check for Updates
    http://office.microsoft.com/en-us/officeupdate/default.aspx
    Bye

  • Mac OS no longer available after trying to remove Windows on Bootcamp. How can I restore Mac OS without the Mac HDD in options?

    Mac OS no longer available after trying to remove Windows on Bootcamp. How can I restore Mac OS without the Mac HDD in options?
    So what I did was, I had bought my iMac from a shop and asked them to do bootcamp for me. However, they installed 32 bit instead of 64. My fault, I did not make my self clear about it. So after it has been delivered to my house, I realized that I wanted the 64 bit. I tried to remove windows on bootcamp but honestly, I have not experienced this before. So I failed. I believe, I did something wrong.
    So I opened the iMac and it keeps asking me to go to windows. Windows OS also corrupted.
    I tried the Option Key but the only option is Windows 7 only. So using a different keyboard, I press option and it only shows Windows HDD and the Mac HDD has gone.
    What am I going to do? How can I restore Mac OS without the HDD anymore?

    iMac, Mac OS X (10.7.2)   < your profile
    Try using Lion Recovery

  • How do I install Flash Player WITHOUT the Google Tool bar ???

    How do I install Flash Player WITHOUT the Google Tool bar ???

    Download the Adobe Flash Player installer directly by clicking one of the following links.
    Flash Player for ActiveX (Internet Explorer)
    Flash Player Plug-in (All other browsers)
    Bypass the downloader/installer altogether.

  • HT5114 How can I create multiple accounts without the necessity to create multiple email addresses?  I now have 2 i-phones (mine and my wife's#, 1 i-pad #mine#, 1 i-pad mini #10 year old's#, and 1 I-pod touch #11 year old's).  I would like to maintain pur

    How can I create multiple accounts without the necessity to create multiple email addresses?  I now have 2 i-phones (mine and my wife's), 1 i-pad (mine), 1 i-pad mini (10 year old's), and 1 I-pod touch (11 year old's).  I would like to maintain purchase control, but would like to be able to have a separate account ID for each person.  Is that possible?

    Each email address can only be on one iTunes account, and all purchases are tied to the account that buys them. If you want to have separate iTunes accounts on each then you will need separate email accounts for each iTunes account

  • Scrolling issues within the browser window

    How do I stop my screen from being able to scroll all the way to the right once the site is published?
    Not sure If that explains it very well, I have just published my site using the business catalyst and everything displays correctly, the only problem I have is that the bottom horizontal scoll bar on the browser window allows me to scroll all the way of the page to the right?
    Hope this makes sense!
    Thanks
    Mark

    Could you please check if you have some object (may be transparent object) outside the pge on the right? It might either be on the page or on Master page.
    Could you please provide us the Website URL where you are facing the isue. It will help us understand the issue better.
    Regards,
    Sachin

  • How can I activate my iphone4 without the owners ID it was just given to me by a friend and we can't contact the owner of this....

    how can I activate my iphone4 without the owner's ID it was just given to me by a friend AND WE CAN'T CONTACT THE OWNER ANYMORE

    There is no other way. Without the correct credentials you won't be able to use it.
    Activation Lock cannot be bypassed, Apple will not help unless you have the original receipt (but not from some 3rd party)

  • HT201441 how to un link apple id without the original apple id

    how to un link apple id without the original apple id my ipod is restored and the owner that had the device past away and dont have a way to fix the ipod in order to sell it for the relative that is trying to deal with the lost I was told to sell this items to help the relative that had the lost... please let me know how to do this '.... tks

    There's no way to do it, sorry.

  • Hie guys..how can i activate my iphone without the original sim card coz it says SIM not valid if i insert it.....im in south africa thanks for your help

    hie guys..how can i activate my iphone without the original sim card coz it says SIM not valid if i insert it.....im in south africa thanks for your help

    Sorry, you can't. If your phone is carrier locked, you will need a sim card from that carrier, to activate it.

Maybe you are looking for

  • How do you remove an e-mail account?

    I just updated to iOS 6.0.  During setup, it asked if I wanted my me.com e-mail to come to my iPad.  I said yes but have changed my mind.  I can't figure out how to remove it.  It does not show as an e-mail account.  Any suggestions?

  • Accept AS400 to send email to Exchange Server 2010

    Settings on Exchange to accept emails from our AS400

  • Receive sms from PC application

    If I want the PC Suite alert me or save the sms message to the file in PC immediately when my phone receive a new sms message, does it possible? Or any program on PC can receive sms from phone to PC in real time? Thank you.

  • I have noticed oily looking film behind my iPad screen. Any ideas?

    I noticed what I thought was an air pocket in screen saver on my iPad 2. I took off the screen saver and that's not the problem. It's a oily looking residue/spot behind the screen. It looks almost like an oil slick. It's moves if you use stylus on it

  • BAPI_SALESORDER_CREATEFROMDAT2 Quantity is not updating in sale orders

    Hi All, the BAPI is creating sales orders without quantity but i am passing target quantity in ORDER_ITEMS_IN but still the sales orders which has been created doesn't have the quantity field updated. Please let me know if you have any answeres on th