SitePoint Sponsor

User Tag List

Results 1 to 7 of 7

Hybrid View

  1. #1
    SitePoint Zealot
    Join Date
    May 2002
    Location
    Oslo
    Posts
    138
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    window.open question

    I copied this script from a friend:

    <SCRIPT LANGUAGE="JAVASCRIPT">

    function CaricaFoto(img){
    foto1= new Image();
    foto1.src=(img);
    Controlla(img);
    }
    function Controlla(img){
    if((foto1.width!=0)&&(foto1.height!=0)){
    viewFoto(img);
    }
    else{
    funzione="Controlla('"+img+"')";
    intervallo=setTimeout(funzione,20);
    }
    }
    function viewFoto(img){
    largh=foto1.width+20;
    altez=foto1.height+20;
    stringa="width="+largh+",height="+altez;
    finestra=window.open(img,"",stringa);
    }
    </SCRIPT>


    How can I get the window that opens on the last line to be scrollable and resizable?

  2. #2
    Web-coding NINJA! silver trophy beetle's Avatar
    Join Date
    Jul 2002
    Location
    Dallas, TX
    Posts
    2,900
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just add this line
    Code:
    stringa="width="+largh+",height="+altez;
    stringa += ",scrollbars, resizable";
    finestra=window.open(img,"",stringa);
    beetle a.k.a. Peter Bailey
    blogs: php | prophp | security | design | zen | software
    refs: dhtml | gecko | prototype | phpdocs | unicode | charsets
    tools: ide | ftp | regex | ffdev




  3. #3
    SitePoint Zealot
    Join Date
    May 2002
    Location
    Oslo
    Posts
    138
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanx

  4. #4
    Perl/Mason Guru Flawless_koder's Avatar
    Join Date
    Feb 2002
    Location
    Gatwick, UK
    Posts
    1,206
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm not definate about this - but i think you can
    affect both those properties on an opened window.

    Flawless
    ---=| If you're going to buy a pet - get a Shetland Giraffe |=---

  5. #5
    The doctor is in... silver trophy MarcusJT's Avatar
    Join Date
    Jan 2002
    Location
    London
    Posts
    3,509
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by Flawless_koder
    I'm not definite about this - but i think you can
    affect both those properties on an opened window.
    Oh no you can't!!!
    (and even if you could how is it relevant??)
    MarcusJT
    - former ASP web developer / former SPF "ASP Guru"
    - *very* old blog with some useful ASP code

    - Please think, Google, and search these forums before posting!

  6. #6
    Perl/Mason Guru Flawless_koder's Avatar
    Join Date
    Feb 2002
    Location
    Gatwick, UK
    Posts
    1,206
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    So you can set them from within the browser once it's open.

    That would mean less code.

    And thanks for the sp correction

    Flawless
    ---=| If you're going to buy a pet - get a Shetland Giraffe |=---

  7. #7
    The doctor is in... silver trophy MarcusJT's Avatar
    Join Date
    Jan 2002
    Location
    London
    Posts
    3,509
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by Flawless_koder
    That would mean less code.
    Less code than adding one line?
    Code:
    stringa += ",scrollbars, resizable";
    MarcusJT
    - former ASP web developer / former SPF "ASP Guru"
    - *very* old blog with some useful ASP code

    - Please think, Google, and search these forums before posting!


Bookmarks

Posting Permissions

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