Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    May 2005
    Posts
    262
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Basic JS question popups, no scrollbar

    I have a link that loads a list of project times in a popup. This list is pretty long. In fact, you cannot resize the window to view it all even if you tried.

    I have this code
    Code:
    <a href="#" onclick="window.open ('http://mydomain.com/myfile.php?dept=1&idtask=6803', 'Logged times', 'height=300,width=500,scrollbars=yes,resizable=yes'); return false;">View Ticket Times</a>
    you will notice scrollbars set to = yes and also tried scrollbars=true and yet still no scrollbars in the popup. I viewed source in the browser and it is there on the link. Any ideas why I am not getting a scrollbar?

    Thanks for any info
    Last edited by tripwater; 06-26-2009 at 08:37 PM.

  • #2
    Regular Coder
    Join Date
    May 2005
    Posts
    262
    Thanks
    4
    Thanked 0 Times in 0 Posts
    ok here is an odd one. I found this working example on this page

    Example of one working

    The only difference I see in their code and mine is they put the call in a function where mine is in a link.

    they say

    Code:
    window.open(href, windowname, 'width=400,height=150,scrollbars=yes');
    Where href and windowname are local vars they set. So anyone see a difference between theirs and mine? If you click on their link it opens a popup and it has a vertical scrollbar...

  • #3
    Regular Coder
    Join Date
    May 2005
    Posts
    262
    Thanks
    4
    Thanked 0 Times in 0 Posts
    no one has any ideas?

  • #4
    Senior Coder ckeyrouz's Avatar
    Join Date
    Jun 2009
    Location
    Montreal, Canada
    Posts
    1,044
    Thanks
    5
    Thanked 179 Times in 179 Posts
    Quote Originally Posted by tripwater View Post
    no one has any ideas?
    Try the following:

    <script language='javascript' type='text/javascript'>
    function showPopup()
    {
    window.open ('http://mydomain.com/myfile.php?dept=1&idtask=6803', 'Logged times', 'height=300,width=500,scrollbars=yes,resizable=yes');
    return false;
    }

    </script>

    <a href="javascript:showPopup()" target="blank">View Ticket Times</a>

    and try manipulating as well the target property inside the anchor tag

    ckeryouz


  •  

    Posting Permissions

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