INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Launch sound file with 'log on' button

Launch sound file with 'log on' button

(OP)
Hello

I have a default ASP page which is where users type in a username to login to a chat. But at the moment, the Webmaster is unaware that a site visitor wishes to chat, so I was hoping to create a sound alert to notify the Webmaster (the sound should not be heard by the site visitor).

I imagine that the sound would need to load when the user presses the log-in button, and that I would need to use <embed>sound.mp3</embed>, but I am unsure where to put it in my stripped down code below:

CODE -->

Dim mode, errorMessage mode = Request("mode") If (mode = "userLogin") Then Dim userName userName = Server.HTMLEncode(Request("username")) If (countUsers() >= USERS) Then errorMessage = getMsg("error.maximum_users_reached") ElseIf (Len(userName) = 0) Then errorMessage = getMsg("error.missing_username") ElseIf (Len(userName) > MAX_USERNAME_LENGTH) Then errorMessage = getMsg("error.username_length_exceeded", MAX_USERNAME_LENGTH) ElseIf (userExists(userName)) Then errorMessage = getMsg("error.username_in_use") ElseIf (NOT isValidUsername(userName)) Then errorMessage = getMsg("error.invalid_username") ElseIf (isUserNameBlocked(userName)) Then errorMessage = getMsg("error.username_blocked") Else Dim p Set p = New Person p.id = -1 p.name = userName p.roomId = 0 p.ipAddress = Request.ServerVariables("REMOTE_ADDR") ' new chat user so create new id Set p = addUser(p) ' tell all other users about this new user Call addMessage( _ p.id, _ "-1", _ "<span class=LoggedIn><img src='images/new.gif' height=9 width=9> " & getMsg("user.logged_on", p.name, Now()) & "</span><br>" _ ) Session("user") = p.data ' redirect to new frame and create new user login Response.Redirect("frames.asp") Response.End End If ...... <%= getMsg("login.join_chat", getMsg("application.name") & " " & getMsg("application.version")) %></td> ....... <input type=text name=username value="<%= Server.HTMLEncode(userName) %>" ....... <input type=submit class=btn name=login value="<%= getMsg("button.login") %>" border=0 tabindex=2 title="<%= getMsg("button.login.title") %>"></td>

Thanks for any advice/help.

Blueie

RE: Launch sound file with 'log on' button

Does the "webmaster" sit in the same room as the webserver?

Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Webmaster Forum

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close