July 23rd, 2005, 05:26 AM
Pop-up message/alert in page load event...
Ok guys, i need to pick your brains again...
Here's what i'm trying to do:
I'm creating a feature on my website(www.grimmusic.com) to allow users to request that other members meet them at specified locations, eg: the forums, the chat room, their profile, etc. I'm making it to where when they request this, it will put a value in a feild in the DB reflecting which user is being requested, and where they're requested to go, then by which member the request was made. When the REQUESTED member visits their next page, in the page load event it will check the DB to see if those feilds have a value, and if so, send a pop-up window giving the user options, eg; 1: "i'll be there in a minuite", 2: "i'm busy at the moment, maybe later", 3: "no thanks". Then, it will gather the value, and send the person making the request it's result in their next page load. Peice of cake...
Here's what i need to know:
I want to know if there's a way, with vb syntax(hopeully), to have a message box, or preferably a browser window, pop-up when the user triggers the page load event. I know that in the old VB for applications it was simple, but i only worked with VB for apps for 2 weeks when i went straight to asp.net, and i've only been doing that for about 4 months. Is it possable to have a browser pop-up window, or even a vb style pop-up, which can return a result to the server, WITHOUT using java? I only know VB.net, but if it's simple enough, i can figure out the syntax needed for C#, but i'm not ready for java yet.
As always, thanks very much for your time.
July 23rd, 2005, 10:18 AM
Public strMessage As String
Protected Sub Page_Load(blah, blah)
If blnPersonHasAMessage = True Then
strMessage = "<script>alert('You have a message.');</script>"
Comments on this post
Last edited by Memnoch; July 23rd, 2005 at 10:21 AM.
July 25th, 2005, 03:10 PM
OK, what does this line actually DO: Page.RegisterStartupScript("ClientScript", strMessage)
because i tried that small "alert" script, and it gave a sufficient little pop-up without the "RegisterStartupScript" part, so i think i messed what you were telling me that was for, but i did catch the rest, ad it was pretty much exactly what i was needing the syntax for, so thanks for that.
i'm going to google the Page.RegisterStartupScript function, but judging by the way you used it, i'm guessing it's to tell the server that it is to be run on the browser, and not the server?
oh yeah, i almost forgot the second part of it. is there a way to gather a returned value from this? even if it's something as simple as acknowleging that the user has clicked "OK" instead of closing out the box? or to have a decicion, eg, "yes/no", sort of like the old VB "vbyesno, vbok, vbretry" etc.
July 25th, 2005, 04:04 PM
July 25th, 2005, 11:34 PM
Thanks a lot for your help, now that i know what to look for, i will find some place to learn that stuff.