473,657 Members | 2,428 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

turn off embedded object form script

hi. I have this in the header section of my web page.
<EMBED SRC="g7wap cq.mp3" WIDTH=0 HEIGHT=0 hidden="true" AUTOSTART=true
LOOP=TRUE ALIGN="CENTER" id="morsemp3" name="morsemp3" ></EMBED>

As desired it plays in a loop as soon as the web page is opened but i want a
button ont there that can turn it off. Is there a javascript option to turn
of the playing mp3?

Thanks.
Dec 22 '06 #1
4 1883
Malkavian wrote:
hi. I have this in the header section of my web page.
<EMBED SRC="g7wap cq.mp3" WIDTH=0 HEIGHT=0 hidden="true" AUTOSTART=true
LOOP=TRUE ALIGN="CENTER" id="morsemp3" name="morsemp3" ></EMBED>

As desired it plays in a loop as soon as the web page is opened but i want
a button ont there that can turn it off. Is there a javascript option to
turn of the playing mp3?

Thanks.
Did you try removing the hidden="true" first?

Erwin Moller
Dec 22 '06 #2
Malkavian wrote:
hi. I have this in the header section of my web page.
<EMBED SRC="g7wap cq.mp3" WIDTH=0 HEIGHT=0 hidden="true" AUTOSTART=true
LOOP=TRUE ALIGN="CENTER" id="morsemp3" name="morsemp3" ></EMBED>

As desired it plays in a loop as soon as the web page is opened but i want a
button ont there that can turn it off. Is there a javascript option to turn
of the playing mp3?

Thanks.

<div id='annoyingMus ic'>
<EMBED SRC="g7wap cq.mp3" WIDTH=0 HEIGHT=0 hidden="true" AUTOSTART=true
LOOP=TRUE ALIGN="CENTER" id="morsemp3" name="morsemp3" ></EMBED>
</div>

<A
HREF="javascrip t:document.getE lementById('ann oyingMusic').in nerHTML='';">Cl ick
to destroy the jukebox</A>

--
http://www.hunlock.com -- Musings in Javascript, CSS.
$FA
Dec 22 '06 #3

"pcx99" <x@x.comwrote in message
news:9b******** ***********@new ssvr13.news.pro digy.net...
Malkavian wrote:
>hi. I have this in the header section of my web page.
<EMBED SRC="g7wap cq.mp3" WIDTH=0 HEIGHT=0 hidden="true" AUTOSTART=true
LOOP=TRUE ALIGN="CENTER" id="morsemp3" name="morsemp3" ></EMBED>

As desired it plays in a loop as soon as the web page is opened but i
want a button ont there that can turn it off. Is there a javascript
option to turn of the playing mp3?

Thanks.


<div id='annoyingMus ic'>
<EMBED SRC="g7wap cq.mp3" WIDTH=0 HEIGHT=0 hidden="true" AUTOSTART=true
LOOP=TRUE ALIGN="CENTER" id="morsemp3" name="morsemp3" ></EMBED>
</div>

<A
HREF="javascrip t:document.getE lementById('ann oyingMusic').in nerHTML='';">Cl ick
to destroy the jukebox</A>
Clever. It worked. it needed a little tuning but it worked brilliantly.
>
--
http://www.hunlock.com -- Musings in Javascript, CSS.
$FA

Dec 23 '06 #4
Malkavian wrote on 23 dec 2006 in comp.lang.javas cript:
><div id='annoyingMus ic'>
<EMBED SRC="g7wap cq.mp3" WIDTH=0 HEIGHT=0 hidden="true"
AUTOSTART=tr ue LOOP=TRUE ALIGN="CENTER" id="morsemp3"
name="morsemp3 "></EMBED</div>

<A
HREF="javascri pt:document.get ElementById('an noyingMusic').i nnerHTML=''
;">Click to destroy the jukebox</A>

Clever. It worked. it needed a little tuning but it worked
brilliantly.
With toggling:

<script type='text/javascript'>

var temp = '';

function onoff(but) {
var z = document.getEle mentById('theMo rse');
var ntemp = temp
temp = z.innerHTML;
z.innerHTML = ntemp;
but.innerHTML = (ntemp=='') ?'On' :'Off';
};

</script>

<div id='theMorse' style='display: none;'>
<embed src='g7wap cq.mp3'
autostart='true ' loop='true' id='morsemp3'></embed>
</div>

<button onclick='onoff( this);'>Off</button>

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Dec 23 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

43
16040
by: dan baker | last post by:
I have a page that gets loaded with a meta-refresh hardcoded so that a few things on the page get updated. its kind of a fake chat board. anyway, what I need to do is turn off the meta-refresh once someone clicks in a <textarea> to enter their input; otherwise the refresh catches them in the middle and messes up the focus. I need a way to turn off the meta-refresh, or to force the cursor/focus to stay in the message input box once they...
8
1506
by: Michael Hill | last post by:
I have this input element: <input type='text' name='street' maxlength='20' size='20'> that I only want the user to be able to input to based on a item from a select list: <select name='street_sel' size='1' onchange='ck_street();'> <option value='abc'>abc</option> <option value='def'>abc</option> <option value='unk'>street not in list</option> </select>
8
8083
by: Colleyville Alan | last post by:
I have been working on an Access app that takes info from a file and writes it to a spreadsheet on a form, simultaneously saving the spreadsheet to Excel. I got the idea that the same concept could work in reverse, i.e. we have a cost model written in Excel that calculates the profitability of customer accounts based on several inputs and they need to be updated at least once per year. These cost models sit on lots of people's hard...
0
1629
by: ATS | last post by:
HOWTO Make a UserControl deploy an embedded resource. Please help, I need to embed an EXE into a C# UserControl that is run from script in an HTML web page as such: <html> <object id=objTest
1
1871
by: Jim Hammond | last post by:
The embedded object gets instantiated once when the page is first loaded and then again every time the button is pressed. The user stays on this page after pressing the button because it is not a navigation button, so I need to reuse the same instance, but how can this be done? <body MS_POSITIONING="GridLayout"> <OBJECT id="VideoControl" classid="ClientSideAssembly_Video.dll#ClientSideAssembly_Video.VideoDisplay"
0
1561
by: Rick Wez | last post by:
I feel like I'm going to pull out my hair (there's not much left); I've read almost every online post trying to figure this out. So I started over with something VERY simple and it still doesn't work ... here we go. I have a datalist with an embedded user control. My user control outputs a single string. The first time thru, everything works perfectly ... on a postback, the datalist gets it's values correctly, but the user control does...
2
8160
by: Owen.Leibman | last post by:
Here is a complete web page: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> <html> <head> <title>Javascript Embed and onunload</title> <script type="text/javascript"> function useplayer() { var a = document.getElementById("obj1"); var obj = document.createElement("object"); obj.data = "dayenu.mid";
4
3352
by: no8do | last post by:
Hi there, I am brand new in access and VBA programming and I am asking for your help. One of the fields in my db is of the OLE object data-type. I' ve written a vb script that is executed on a button's click on my form for openning an embedded word document, on which I can write text. The text is saved on the field as soon as I close the word document. For the record, the code that I use is the following: A.Class = "Word.Document" ' Set...
1
4532
by: DILA | last post by:
Hi, I have included an embedded Real Player and an embedded Quick Time Player for streaming videos, in my web pages. I'm interested in searching for a method or a script to disable the right-click option in the embedded Real & Quick Time players, because I don't want the viewers to download the video but to view it while streaming.
0
8420
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8842
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8740
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8617
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6176
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5642
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4173
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2743
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1970
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.