|
-
Jul 23rd, 2003, 06:47 PM
#1
javascript/asp, cant close the page properly
I want to close a page if the user doesnt include the query string. this code kinda works, the problem is that when the javascrpit code runs, IE shows me a dialogbox telling me that the page is trying to close itself. and then it asks me if I want to close it or not. But I want the code to close the window automatically, what's wrong with this:
VB Code:
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim entryID As String = Request.QueryString.Item("entryID")
If entryID Is Nothing Then
Response.Write("<script>setTimeout(""self.close()"",1);</script>")
End If
End Sub
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
-
Jul 24th, 2003, 02:17 AM
#2
Hyperactive Member
if the Page that is open has been opened with javascript (window.open) then you will not get prompted, otherwise, you do
-
Jul 24th, 2003, 02:41 AM
#3
-
Jul 24th, 2003, 02:45 AM
#4
Hyperactive Member
If I need a quick answer to something I tend to just search forums or google but when I'm learning something new I always buy a book (normally a dummies book!).
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|