Script For Swapping SWF Files Not Working In Firefox
Jan 13, 2009
I'm in charge of a project for a medical website and it is set up so that each 'page' of a questionnaire that users need to fill out has a corresponding Flash file to illustrate the parts of the body the page is referencing. The developer (who did the dynamic parts in ASP, I believe) set it up so the site pulls all of the questions from the database when the page loads and then uses Javascript show and hide sections to show the appropriate 'page'. He uses the same Javascript to figure out which Flash file is needed (based on the name of the page) and swap out the .swf's accordingly.
The only problem is that the Flash-switching part only works in Internet Explorer. The pages switch just fine, but the place where the Flash should be is blank. The developer told me he has never used Firefox and has no idea how to change his script to make it work for FF, so it's now up to me to figure it out. I'm a PHP developer with limited Javascript knowledge, so my only recourse is to ask for assistance from the experts here at Sitepoint. I've posted the Javascript and the HTML for the Flash file below.
Javascript:
Code:
function DisplayPage(PageNo){
if(ThisPage==PageNo){return};
var eles=document.getElementsByName("xdmenu");
var pic=document.getElementById("bodypic");
var bodyfile="";
switch(PageNo) { .....
HTML (this is where the Flash is embeded):
HTML Code:
<object name="bodypic" id="bodypic" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="[URL]" width="220" height="475">
<param name="movie" id="movie" value="../Html/Wrapper/man_xxxx.swf" />
<param name="quality" value="high" />
<embed src="../Html/Wrapper/man_xxxx.swf" quality="high" pluginspage="[URL]" type="application/x-shockwave-flash" width="220" height="475"></embed>
</object>
I'm actually doing a firefox extension in which i would like to implement the jWebsocket API in order to build a small chat. I got my main script file, named test.js, and the jWebsocket lib into a js folder. Just for you to know, this is my first firefox extension ever. So in my XUL file I got this :
I have the following code inside an include file which is included in my index.php page. All of my include files are placed in a folder called includes alongside my index file and the file ajax_getusers.php. When I have tested out this code all in one page it works fine but if I put the first section of code below in an include and include it in my index page it does not work at all. Is therer any reason for this?
Code:
<script type="text/javascript"> function showUser(str) { if (str=="")
I am working on a Javascript application and i am facing a strange behavior of the application in IE. I am creating a table at runtime using DHTML and registering event for the table row click. When i deploy this application on web server and browse the application, the events fires in firefox and chrome but in IE the events are not fired. If i browse the application from the server with localhost, the application triggers the events and fails when i use machine name.
The following is the source code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title>
I have designed a mail service in java.In my compose page,i want to attach some excel files of text files and to send it.After sending i want to store it my database.Then how can i download or open that file after opening that recipient mail inbox.
I have the following JavaScript (see below). The script requests an XML file from the server and displays it on the page.The script works fine when the requested XML file is stored on the same server as the script.The problem is when I try requesting an XML file from an external server such as the National Weather Service. I get an error. If I take the XML file from the National Weather Service and save it to my server it works. Why can't I use my script to request XML files stored on external servers?
Javascript Code
Code:
window.onload = initAll; var xhr = false; function initAll() { document.getElementById("makeTextRequest").onclick = getNewFile;
I have are created dynamically buttonset toggle radio button with following code. All is working okay but just I have added onclick function which is doing window.location which is working with FireFox but not working with IE and google chrome.
<script type="text/javascript"> var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'; $(function () { $('#btnSet').buttonstrip();
I have a jQuery code to allow users to login using a lightbox [URL] and immediately start downloading files, without being redirected or having the page reloaded. It's perfectly working in Firefox but Internet Explorer keeps showing the login box until I reload the page
In my quest to implement ajax for the first time i've hit a brick wall. i've been searching for hours for a solution but with no success. Here is the problem.
[Code]...
why is it not working? my PHP code is outputting the contents of the xml document.
I want to write a javascript to list of all files in a folder including files in the subfolders. This is for the scorm purpose to list all the files. some examples are listing files but not listing the files inside the subdirectories. I want the file's full path like C:Documentsjavascriptwilson.js like this.
I have four folders and each folder has one images, let say ( images-one.jpg, images-two.jpg, images-three.jpg, images-four.jpg). now,in index.php page there are four buttons, each buttons for each images. if i clicked button numer two for images-two.jpg, and then it will show that images name from that folder in index.php page. and then if i reload same index.php page or refreshed same page, i want to show SAME images that I clicked before which is images-two.jpg. how can i write that code to show images from four files, each files are in each folder.
When the JS file is not working at the time of Ajax files is called. on first time the onmouseover JS is working but , if you call the ajax JS is not working.
Suppose,closing the browser through Browser Close Button(Top Right Corner cross(x) button), i have to execute some ASP script , for that, in body onUnLoad Event calling a fucntion called CloseWin(e,frm), it is working in Internet Explorer successfully , But in FireFox not working. how to solve this problem. or any other way to get the co-ordinates of browser close button( code for both IE and Firefox).
code follows
function CloseWin(e,frm) { //frm required for my program var bButtonClicked = false;
We are using balupton's history.js to process normal (without files) forms and jquery.form.js for these with files.
So our code looks like that:
$this.find('form.formularz').submit(function(event){ var $this = $(this), url = $this.attr('action');
[Code]....
I thought maybe it's something wrong with iframe, but there are requests made to server. On server side, there is 499 error code for IE (it's internal nginx error code, it says that browser closed connection before nginx even sent anything) and 408 for Firefox.
When the select menu is changed, the text in the textarea tag is changed. But after something is typed in the textarea tag, the select change functionallity no longer works under Firefox 3.6.13. Firebug shows it as being changed, and it still works with IE8.Am I doing something wrong? Is there a workaround?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml">
I'm trying to do up a contact form that after a user submits the information, the drop down contact box will slide back up instead of redirecting to another page. The script works fine in Chrome and Safari, but Firefox and IE keeps redirecting to the php page.
Inside of $(document).ready(function () I have: var refre****= setInterval(function(){ $('#mydiv').load("mypage.htm"); }, 9000); This is working great in IE, it loads mypage.htm into mydiv every 9 seconds. If I change the contents of mypage.htm I can see it in mydiv after 9 seconds with IE, but not with Firefox. With Firefox I can see the reloading symbol on top of the tab every 9 seconds, but I don't see the page changed.
I have a numbered image gallery which has a next and previous link which is another way of navigating through the gallery the problem i have that in IE all is fine but doesnt seem to be working in firefox, i would appreciate afew pointers,here is the code
<script type="text/javascript"> var currentImage = 1; function LoadGallery(picNum, captionText)
I have a function that checks to see the number entered in a textfield and then, if greater than 1, will change a radio button from Single to Multiple and visa versa. The function is called from the textfield with an onkeyup="function()". The problem I am having is that it works in IE just fine, but in Firefox it doesn't seem to be doing anything. I'm not getting any errors and can't seem to see what is the problem.