Results 1 to 3 of 3

Thread: Getting a form to pop up when a web page loads

  1. #1

    Thread Starter
    Lively Member brjames's Avatar
    Join Date
    Jan 2000
    Tenby, Wales, UK


    I need to get a small VB form to load up when a web page loads. The form explains the viewer that any content on the page cannot be used unless permission is gained. The form has got a warning message and an ok button. If you press ok the form disappears and the user views the page.

    Can anyone tell me how to get this form to load when the page loads. I am using Frontpage 2000.

    Thankx in advance!


  2. #2
    Frenzied Member monte96's Avatar
    Join Date
    Sep 2000
    Somewhere in AZ
    You could do this using window.alert:

    <script language=javascript>
    <body onload="javascript: ShowMessage()">
    Senior Programmer/Analyst

    Your results may vary.. some restrictions may apply.. pricing and participation may vary.. not available in all states.. professional driver closed course..quantities limited..

  3. #3
    New Member
    Join Date
    Nov 2000
    Seattle, WA USA
    Here is the code to put the "Close Window" button to close the pop up window...
    <form><input type=button value="Close Window" onClick="javascript:window.close();"></form>

    To create the pop up window, you can do it this way to just create another window...the size of the window will be determined by the users last additional window in IE, or will open a full screen new window in NN, totally covering the previous window (this confuses a lot of users, they do not realize what's happened)...
    <a href="mypopupform.asp" target="_blank">

    To make the window an absolute size that YOU control, that also requires a javascript...try this...
    <SCRIPT LANGUAGE="JavaScript">
    function c(){var winX=0;var winY=0;
    popupWin ='http://mywebsite/mypopupform.asp','1','scrollbars,resizable,width=500,height=400,left='+X+',top='+Y);}
    <A HREF="javascript:c();"<NOSCRIPT></A><A HREF="http://mywebsite/mypopupform.asp" TARGET="_blank"></NOSCRIPT>

    You can mess with the X and Y values in the javascript to change the windows size and pop up location. The <NOSCRIPT></NOSCRIPT> tags handles any lame-o browsers left on the planet that might run across your Netscape 6 or something. he he he

    Be sure not to have the form too tight in the window, leave some room...I have seen a lot of large monitor users with high screen resolutions that will set the Windows font size larger to compensate for the higher resolution...thus fouling up what may have neatly fit in the window at 800 x 600.

    I downloaded Netscape 6 and in my humble opinion it is a bigger piece of crap than any of the previous Netscape browsers. So...don't waste your time. My only fear is that the general public will love it ha!!! But I guess that is job security.

    Good Luck,
    Jim Summer

    Ten Ton Jim
    Seattle, WA USA

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