473,385 Members | 2,014 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

bgsound Elment

Hi
I've an strange behavior, when I put the bgsound element in a page and
access to that page the session is loosed.
Does anybody knows happend that? And if are a reason for that behavior, how
can I play sound ? I need touch a button and play a sound. My code is this
( the code works ok, but the session is loosed):
Html:
....
<bgsound id="SoundContainer" src="" />
....
javascript:...
function PlaySound()
{
document.all.SoundContainer.src = "Sounds/sound.wav";
}
....

Thanks
Mar 2 '06 #1
1 1921
Kevin wrote:
Hi
I've an strange behavior, when I put the bgsound element in a page and
access to that page the session is loosed.
Does anybody knows happend that? And if are a reason for that behavior, how
can I play sound ? I need touch a button and play a sound. My code is this
( the code works ok, but the session is loosed):
Html:
...
<bgsound id="SoundContainer" src="" />
...
javascript:...
function PlaySound()
{
document.all.SoundContainer.src = "Sounds/sound.wav";
}
...

Thanks

My first comment is not to use document.all. Use
document.getElementById("SoundContainer") to manipulate the element in
the DOM correctly.

document.all is the devil! :)

--
Ray Booysen
rj********@rjb.za.net
Mar 2 '06 #2

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

Similar topics

5
by: khaled Hajjar | last post by:
Hello, I have this template : <root> <categorie> <poste att = 'true'> ..... </poste> <poste att = 'false'> .....
6
by: mike | last post by:
Hello, After trying to validate this page for a couple of days now I was wondering if someone might be able to help me out. Below is a list of snippets where I am having the errors. 1. Line 334,...
4
by: Eric | last post by:
Say I have vector<int> tmp. I then call a function that needs a pointer to an int in tmp. Is it wise to pass the function &(tmp)? If the vector increases in size could it invalidate that pointer?
6
by: Jimnbigd | last post by:
I want to write a game, and sounds will really add to it. Note that I would always make the sounds optional. I hate it when I go to a URL and unexpectedly get sounds or music. I have played...
2
by: snape | last post by:
Is it possible to have an event trigger when the sound file for BGSOUND is finished downloading? Or just to know when the file is loaded and playing? Thank you.
11
by: chrisdude911 | last post by:
i have a video in a html document. i have typed <img dynsrc="My Immortal.mpg"/> in to create a video box. on http://www.acejs.com/scriptsfolder/110003/110003.html it tell me about adding controls...
16
by: Dobedani | last post by:
Dear All, I found the code added below at: http://simplythebest.net/sounds/sound_guide.html Unfortunately, the code doesn't seem to work in Firefox. These are the error messages I can see in...
9
by: outstretchedarm | last post by:
How exactly does HTML/Javascript handle playing midi files? Does it have a player imbedded in it? Or does it borrow from the computer's midi player? How could you make a webpage play certain...
4
by: tundra999 | last post by:
Is there any multimedia support in ASP.NET 2005? None of my books even mention sound or video, MSDN only mentions some complicated API, and searching these newsgroups only mentions bgsound for...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...

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.