Confirm Box Onload - Music Option For User On Homepage
Jun 30, 2011
I am trying to give the user the option of music on my homepage (b/c we've all found it annoying at times...perhaps most times). I have found an "onload" option for the body tag on dotnetspider.com, but it doesn't seem to be working for me.
<body onload="loadMusic()">
<p>
<script type="text/javascript"><!--
function loadMusic() {
var r=confirm("Would you like a background tune?");
if (r==true) {
<input type="button" onclick="show_confirm()" value="Show a confirm box" />
<object class="plugin_video" classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="[URL]" height="480" width="640">
<param name="autoplay" value="false" /><embed title="QuickTime" hidden="true" src="sounds/siteBG.wav" mce_src="sounds/siteBG.wav" autoplay="true" loop="true" controller="true"></embed>
</object>
} else {
alert("If you change your mind reload the page to choose again.");
// --></script>
I have a confirm message box which asks the user whether they wish to take a survey. At the moment the confirm box appears each time the page is loaded. Would there be a way that when the user selects OK to take the survey this is remembered, so when the users next visit the page the box doesn't appear?
i have one great problem with one form. i must to know, for submmiting the form, if the user, has change the select, has select one or no. in my select i have:
if the selectd value is 0 the user has not select, if isn't 0 the user has selected one option, in this case the form is submmited. how can i controle this problemm using javascript? do you have one sample?
I have a drop down box (select) in my website: [URL] that works fine; but the problems is if the user click on a wrong option, it will show a box and if the user click on another option from the box, the last one will be on display and won't go off..
Like this select something and then at the same box change the selection you will see the code will build up boxes on the screen.. How I do for it not happens if the user change the option in the last box, the one before disappears!
When the user clicks the remove link it properly adds a new option to the dropdown however it adds it 3 times meaning 3 option tags. Why is that?
Code: // Add a click handler to each anchor tag in the characterList <ul> element $('#characterList a').click( function(evt) { evt.preventDefault();[code].....
I want to know how I could direct the user to a html document based upon which option I have chosen in the list (see above). So for example...
If I have chosen '1' in the list (see above), then when I submit the form, I will be directed to a page detailing information related to option '1'. If I have chosen '2' in the list (see above), then when I submit the form, I will be directed to a page detailing information related to option '2' etc.
I am trying to replace the entire page when the user selects adifferent option in a combo box. The code I have works for the firstiteration. However, It fails everytime there after.I went throughfirebug and it appears after the first refresh it never triggers theready() method.My Code is,
I have the checkbox validation. I have it set onClick, this works perfectly with both the mouse click and also if the space bar is used to select the option, which is great. However if a user simply 'tabs' over the option it doesn't validate real time. The solution I came up with was adding a onKeyDown event to trigger the same function.
I am trying to make a form where the user is only able to select an option from one of the drop down menus and if they click both then submit an error should pop up telling them to select just one. Now I have found this code:
<SCRIPT LANGUAGE="JavaScript"'> <!-- function validateForm(){[code]....
the first problem is that my menu must be named "id[2]2" which causes a problem due to the bracketed 2 and the 2 after. Is there any way around that?the second problem I forsee is that this will only work with 1 drop down box being unselected. I need a code that will give the warning if nothing is selected OR if something is selected in both drop downs.
I am searching a solution to change a ComboBox by popup I have found this script on the web. Is it also possible to select the newVendor just after adding? Is this script ok or are there better solutions?
<script type="text/javascript"> <!-- function message(value){ if(value=="newVendor"){// New Vendor is selected var vendor = prompt("Vandor's Name",""); var elementSelect = document.getElementById('vendor'); try{ [Code]....
In the background should play a midi file. That's not the problem but when the midi file is played another one should start automatically. During playing the first midi file the second should be downloaded and so on.
What I don't know is when the midi file is played and when I should start the next midi file.
I would like to have a link that when the client choses it, it automatic makes the current page to be his home page no matter what browser he is using. is there a code for it?
i used this javascript code to set homepage in firefox but dos'nt work of firefox and work on IE6
function setasHome(){ document.body.style.behavior='url(#default#homepage)'; document.body.setHomePage(document.location); } a href="java script:setasHome();">sethome</a>
i want the code to set homepage in firefox and IE6
I'm hoping to find a way to load a music file that will continue to play when moving from page to page without interuption, only ending when the site has been left. I've only seen where the music resets every new page.
I'm the Webmaster/Designer for a Private Sector Company Intranet.
Now without exaggeration we must have the most IT-apathetic staff in the world even though they all work on PCs every day!
Anyways I've been trying to get them to bookmark the Company Intranet Site as their homepage for months to no avail.
I've sent them regular emails on the importance of doing it, run articles in the Company magazine, even put a JavaScript (make this your homepage) button on the site and nothing works. I would guess that even now only maybe 20% have it as their homepage.
Bits and pieces get posted to the Intranet Site all the time and once a month I post a Team Brief which contains a lot of very pertinent and important information for the staff.
I'd like a JavaScript that I can inconspicuously force a homepage. In other words I'll link to the Intranet Site from my email and by simply clicking on this link the user will have unwittingly booked the Intranet as their homepage.
Obviously smething that will not flag up a User "Do you accept?" permission.
I'm having a hard time figuring out why the onload event is not being called for the frameset window in the following simple example. It is being called for each of the component frames. Code:
It certainly doesn't help that IE doesn't seem to pass document.referrer or am I missing something ? Is it set up thru an add-on analysis package? (referrer info from logs? )
However, it is only for IE users. Since Firefox is probably the most common browser nowadays, does anyone have a script that works on both browsers? Or tell me if its possible to modify it for firefox?
I have got a client who wants to have music playing on his site, the music player should be opened in a pop-up window. The website is standard html / css / js website, without any flash or such things.
Problem which I have:
I open the pop up window with music player when visitor visits Home Page, when visitor comes to other page without visiting home page I need to check if pop up window is opened or not and if it is not opened I open a pop up window and start to play music, how to achieve it?