Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 1 of 2 12 LastLast
Results 1 to 15 of 19
  1. #1
    New Coder
    Join Date
    Jul 2014
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    A simple bell button

    I want to make a button that I can put on my web site that when members come in to the lounge (chat room) they can press it and others will hear it as well

  • #2
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,549
    Thanks
    8
    Thanked 1,095 Times in 1,086 Posts
    Do you already have a working chatroom?

    And if so, what is the backend of it? JQuery, PHP, ASP.net?

  • #3
    New Coder
    Join Date
    Jul 2014
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    chat room bell

    Quote Originally Posted by mlseim View Post
    Do you already have a working chatroom?

    And if so, what is the backend of it? JQuery, PHP, ASP.net?
    not sure what you mean but yes I have a working chat room this is the full address

    HOME - noquittershere

    its a members only chat room so you may not be able to enter it

    any help would be great I have also been told that the wav sound need to be in a public place so I have up loaded a wav file to my drop box and the link is


    https://dl.dropboxusercontent.com/u/...doorbell-1.wav

    cheers Gary

  • #4
    New Coder
    Join Date
    Jul 2014
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts
    http: //www.qittersnotwelcome.co.uk/#/ chat-room/4585096132


    Sorry changed the link to home noqittershere so I have put spaces into it to stop it changing

  • #5
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,549
    Thanks
    8
    Thanked 1,095 Times in 1,086 Posts
    What chat script are you using?
    Give web URL to the chat script that you purchased or downloaded.

    I want to see what method the chat script uses for operation.

  • #6
    New Coder
    Join Date
    Jul 2014
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Its in the form of a hmtl snippet its a moonfruit web site

  • #7
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,549
    Thanks
    8
    Thanked 1,095 Times in 1,086 Posts
    Do you have actual control over the scripting? Or is this a website service like Weebly or WIX (where you can't do scripting)?

    I'm sort of thinking that you won't be allowed to do any scripting (server-side).

  • #8
    New Coder
    Join Date
    Jul 2014
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts
    not sure what you mean so I have forwarded your email to them to get a reply and will asnswer you asap in the mean time I was given this html code which placed a button onto the site but for some reason it would not play the sound file connected to it

    <html>
    <head>
    <script type="text/javascript">
    function playSound(file) {
    document.getElementById("dummy").innerHTML="<embed src=\""+file+"\" hidden=\"true\" autostart=\"true\" loop=\"false\" />";}
    </script>
    </head>
    <body>
    <div id="dummy" style="display:none;"></div>
    <p>
    <input type="button" onClick="playSound('https://dl.dropboxusercontent.com/u/37416867/doorbell-1.wav');" value="Play!" />
    </p>
    </body>
    </html>

  • #9
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,549
    Thanks
    8
    Thanked 1,095 Times in 1,086 Posts
    I found a javascript "snippet" of code that works (supposed to work) on all browsers:
    https://code.google.com/p/jbeep/

    I put it on my website for a test.
    jBeep test

    You can try it on your website too.

    So for now ....
    This is just a bell for the user's PC ... nobody else hears it.
    I guess it's important to at least get this to work.
    Note: The first time, it takes a few seconds for the .wav file to download.

  • #10
    New Coder
    Join Date
    Jul 2014
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts
    <html>
    <head>
    <title>jBeep test</title>
    <script src="jBeep.min.js" type="text/javascript"></script>
    </head>
    <body>
    <button onClick="javascript:jBeep();">Play jBeep!</button>
    <!-- Sample: Using your WAV file:
    <button onClick="javascript:jBeep('your.wav');">Play Wav!</button>
    -->
    </body>
    </html>


    where do I put the link in which is https://dl.dropboxusercontent.com/u/...doorbell-1.wav

    sorry to be a pain but no idea with html

  • #11
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,549
    Thanks
    8
    Thanked 1,095 Times in 1,086 Posts
    If you go to a website, such as my test site, you can put your mouse in the middle of the page and right-click, and "View Source", or use the "View" menu button on your browser and "View HTML", "View Source" ... wording depends on browser.

    Doing that, you can see my HTML.

    But here it is anyhow:
    Code:
    <html>
    	<head>
    		<title>jBeep test</title>
    		<script src="jBeep.min.js" type="text/javascript"></script>
    	</head>
    	<body>
    			<button onClick="javascript:jBeep('https://dl.dropboxusercontent.com/u/37416867/doorbell-1.wav');">DOOR BELL</button>
    	</body>
    </html>
    I also uploaded the javascript file to my website (jBeep.min.js). That comes with the author's zipped file, or view it directly:
    http://www.catpin.com/bell/jBeep.min.js

    Just know that you can view anyone's HTML source, including this website (coding forums) by using your browser. That's important to know, especially for learning ... to see how someone else coded their page. You can view HTML, CSS, javascripting. You cannot view server-side scripting (such as PHP, Perl).


    Once the bell works for your PC, you'll start working on getting it to "ding" on everyone else's PC. The only way I can think of is to use JQuery (javascripting) on the page everyone is viewing. The script will need to query a file somewhere on your website every 5 seconds or so, depending on how quickly the bell must be rung. This will also require some PHP scripting. The bad part is that everyone's browser will be checking for the bell "flag" to see if it should ring ... that consumes processing time and requires a ping from your website.

    If that bell is important and needs to ring immediately, the polling must be every second ... a ton of queries! If not important, and the delay can be 10 seconds, then so be it.
    Last edited by mlseim; 07-09-2014 at 10:51 PM.

  • #12
    New Coder
    Join Date
    Jul 2014
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts
    No I get nothing when I try pressing the button I have tried it in internet explorer and goggle chrome and get no sound from either of them so I am guessing that its moonfruit

  • #13
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,549
    Thanks
    8
    Thanked 1,095 Times in 1,086 Posts
    Do you get a sound when using my test page?
    http://www.catpin.com/bell

    Make sure your sound is on.

    Also know that it requires the .wav file to download to the PC. Perhaps your anti-virus software doesn't allow that? Or it might not work behind a firewall?
    Last edited by mlseim; 07-10-2014 at 12:48 AM.

  • #14
    New Coder
    Join Date
    Jul 2014
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I get sound in Google chrome from your site but no sound when I try your site in internet explorer
    Can you leave that sound clip on your web site so I can write to moonfruit about this problem so they know that the code is right and its a problem is on there side not mine

  • #15
    New Coder
    Join Date
    Jul 2014
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts
    ok I have created a test site and given you admin rights just log in with this name thebellman and the password in thebellman to see if you can hear it


  •  
    Page 1 of 2 12 LastLast

    Posting Permissions

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