Results 1 to 16 of 16

Thread: Pop up window again....

  1. #1

    Thread Starter
    Fanatic Member chrismitchell's Avatar
    Join Date
    Jan 2001
    Location
    With Hobbes in New Zealand
    Posts
    568

    Pop up window again....

    I have another question about the pop up window I made a while ago... I need to specify the width and the height of the window that is made....

    I was wondering if it is meant to go in the code like this:

    onClick="javascript:window.open('text/oneday.txt',menubar='no',status='no',toolbar='no',width="400",height="600")";

  2. #2
    PowerPoster sail3005's Avatar
    Join Date
    Oct 2000
    Location
    Chicago, IL, USA
    Posts
    2,340
    that should work!

    taken from another site:

    Code:
    remote=window.open("http://www.enteract.com/~rhillego/courses/create_remote.html","remotewindow","width=100,height=250");

    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA

  3. #3

    Thread Starter
    Fanatic Member chrismitchell's Avatar
    Join Date
    Jan 2001
    Location
    With Hobbes in New Zealand
    Posts
    568
    What happens is that it resizes the button image to that size for some stupid reason!! Oh well I will work it out...

  4. #4
    scoutt
    Guest
    the onclick should go in the button but the width and height should go into the javascript function

  5. #5
    Fanatic Member Psyrus's Avatar
    Join Date
    Jul 2000
    Location
    NJ
    Posts
    602
    Try moving the code to a JavaScript function and just call the function in the ONCLICK event:
    Code:
    function openWin(){
    window.open('yourpage.html','newWin',menubar='no',status='no',toolbar='no',height=300,width=300);
    }
    
    <input TYPE = "button" VALUE = "Open" ONCLICK = "openWin();">

    Chris
    Chris

    VB 6.0 Calendar App Video Gamers Group
    Don't forget to rate people if they helped you.

  6. #6
    PowerPoster sail3005's Avatar
    Join Date
    Oct 2000
    Location
    Chicago, IL, USA
    Posts
    2,340
    i think the problem lies in your "" marks

    you have this:
    Code:
    onClick="java script:window.open('text/oneday.txt',menubar='no',status='no',toolbar='no',width="400",height="600")";
    try this
    Code:
    onClick="java script:window.open('text/oneday.txt',menubar='no',status='no',toolbar='no',width='400',height='600')";

    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA

  7. #7
    Fanatic Member Psyrus's Avatar
    Join Date
    Jul 2000
    Location
    NJ
    Posts
    602
    That's not necessarily true. I had the same problem. The only fix was to put the code in a function and call the function in the ONCLICK event. More strange browser behavior.
    Chris

    VB 6.0 Calendar App Video Gamers Group
    Don't forget to rate people if they helped you.

  8. #8

    Thread Starter
    Fanatic Member chrismitchell's Avatar
    Join Date
    Jan 2001
    Location
    With Hobbes in New Zealand
    Posts
    568
    I will try changing the quote maks today.. Unfortunately I don't have time to change this before this meeting they are having so the changes will have to be made after the meeting is over....

  9. #9
    scoutt
    Guest
    I saw an example of the way you are doing it, try this.
    Code:
    <INPUT TYPE="button" VALUE="Open window2"   onClick="msgWindow=window.open('text/oneday.txt','window2','menubar=no,status=no,toolbar=no,width=400,height=600')">
    notice ther is only one set of ''

  10. #10

    Thread Starter
    Fanatic Member chrismitchell's Avatar
    Join Date
    Jan 2001
    Location
    With Hobbes in New Zealand
    Posts
    568
    I will try doing both to this problem today as I now have my computer back from the meeting.

  11. #11

    Thread Starter
    Fanatic Member chrismitchell's Avatar
    Join Date
    Jan 2001
    Location
    With Hobbes in New Zealand
    Posts
    568
    Nope it still doesn't work.... This is bugging me now... Though I have vhanged it slightly... I am now calling an ASP file into the new window which helps slighlty because it auto formats the words... The window is still to big.... This is really strange.

  12. #12
    scoutt
    Guest
    can you post the code Chris? jus thte part that opens the window??

  13. #13
    scoutt
    Guest
    I don't know if this is what you are trying but it works
    Code:
    <form>
    <input type=button value="http://www.vbforums.com" 
    onClick="msgWindow=window.open('http://www.vbforums.com','','menubar=yes,status=yes,toolbar=yes, resizable=yes,scrollbars=yes,width=640,height=480')">
     
    </form>

  14. #14

    Thread Starter
    Fanatic Member chrismitchell's Avatar
    Join Date
    Jan 2001
    Location
    With Hobbes in New Zealand
    Posts
    568
    Cheers scoutt, that last one worked like a treat.. Thanks again!!!!

  15. #15
    scoutt
    Guest
    well it's about time.
    I was playing around with another post and came acrossed it and said to myself, "self, you might have what chris is looking for" and tada,, cool glad it worked.

  16. #16

    Thread Starter
    Fanatic Member chrismitchell's Avatar
    Join Date
    Jan 2001
    Location
    With Hobbes in New Zealand
    Posts
    568
    Cool... Well cheers again Scoutt... It really helped. Its a shame that my HTML problem is still there!

Posting Permissions

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



Click Here to Expand Forum to Full Width