Pop up windows

Results 1 to 5 of 5

Thread: Pop up windows

  1. #1
    Join Date
    Dec 1969
    Posts
    148

    Default Pop up windows

    My boss wants to (believe it or not) place a popup window that loads automatically when the .asp home page is requested. Can this be done in vbscript and asp or do I have to suffer through javascript?<BR><BR>mbowles@mgfs.com

  2. #2
    -Wes Guest

    Default RE: Pop up windows

    &#060;HTML&#062;<BR>&#060;HEAD&#062;<BR>&#060;/HEAD&#062;<BR>&#060;BODY&#062;<BR>&#060;Script Language=VBScript&#062;<BR>sub window_onload()<BR> alert("Heres the box. Boss")<BR>end sub<BR><BR>Web Page<BR>&#060;/BODY&#062;<BR>&#060;/HTML&#062;<BR>&#060;/Script&#062;

  3. #3
    Join Date
    Dec 1969
    Posts
    148

    Default RE: Pop up windows

    tried this, and I get Done, but with errors on the page.<BR><BR>I assume this can be coded into asp?<BR>

  4. #4
    Join Date
    Dec 1969
    Posts
    148

    Default RE: Pop up windows

    I found this snippet and it works great on an htm page, but when place on an asp, as the first code, i get the following error. Cannot run a script tag within a script.<BR><BR>&#060;!-- Begin Pop Up Window --&#062;<BR><BR>&#060;script language="JavaScript"&#062;<BR><BR>config=&#039too lbar=no,location=no,directories=no,status=no,menub ar=no,width=250,height=350&#039<BR><BR>config += &#039scrollbars=no,resizable=no&#039<BR>pop = window.open ("","pop",config)<BR><BR>pop.document.write(&#039& #060;script language="javascript"&#062;&#039);<BR>pop.document .write(&#039setTimeout(&#039);<BR>pop.document.wri te(&#039"self.close()&#039);<BR>pop.document.write (&#039;",15000)&#039);<BR>pop.document.write(&#039 &#060;/&#039);<BR>pop.document.write(&#039script&#062;&#0 39);<BR>pop.document.write(&#039&#060;body bgcolor=#f5f5dc&#062;&#039);<BR>pop.document.write (&#039&#060;center&#062;<BR>&#060;/center&#062;&#039);<BR>pop.document.write(&#039&#0 60;center&#062;<BR>&#060;/center&#062;&#039);<BR>pop.document.write(&#039&#0 60;center&#062;&#060;b&#062;&#060;h2&#062;Welcome to&#060;/h2&#062;&#060;/b&#062;&#060;/center&#062;&#039);<BR>pop.document.write(&#039&#0 60;center&#062;&#060;b&#062;&#060;h2&#062;W3 eZine publications&#060;/h2&#062;&#060;/b&#062;&#060;/center&#062;&#039);<BR>pop.document.write(&#039&#0 60;center&#062;&#060;b&#062;&#060;h3&#062;Writers wanted!&#060;/h3&#062;&#060;/b&#062;&#060;/center&#062;&#039);<BR>pop.document.write(&#039&#0 60;/body&#062;&#039);<BR><BR>&#060;/script&#062;<BR><BR><BR>&#060;!-- End Up Window --&#062;<BR><BR>


  5. #5
    steve marlowe Guest

    Default RE: Pop up windows

    this is the same method i used for a pop up box. i let the javascript window.open method just pop up the box. but instead of writing the stuff to the window manually i just created an html page how i wanted it to look and loaded that into the window. i guess it will work either way though... i have had no trouble with it. glad you got it figured out.<BR><BR>steve

Posting Permissions

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