Loading Files Into Firefox Extension

May 15, 2010

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 :

[Code]....

View 1 Replies


ADVERTISEMENT

Files With The .js Extension

Jul 20, 2005

I have recently bought the book: JavaScript & DHTML Cookbook. As I
opened the .js files with note pad, I asked myself why was the code
formated in such a way. The code looks as if it had been produced by
some kind of programs instead of a person. I also noticed a lot of
little squared zeros; what are those all about?

I have also noticed code formated in a similar way, when viewing some
of the source code of the web pages on the MSN web site. If someone
knows anything about this machine-like formating, I would love to hear
from you.

View 3 Replies View Related

Little JS Help For Firefox Extension

Nov 8, 2007

This might be more of a firefox extension development question but it has to do with JS so i'll ask here in hopes of finding someone with experience in this.

My extension requires the URL of the image that was right clicked. Meaning I have added a new option in the right-click menu when an image is right-clicked that calls a function in my JS file


JavaScript Code:
imgSrc ();

This function requires the URL of the image that was right clicked to be passed into it. Does anyone know how I would do that?

View 2 Replies View Related

Toolbar Extension For FireFox And IE?

Mar 20, 2009

I have a website in development that has some similarities to Kaboodle.com. I need a FF/IE toolbar button build that can extract images from a website and populate them into my db for display in my pages. This fucntion will work identical to how kaboodle.com works. I had the firefox buttons developed by some freelances, however they lacked the expertise in javascript to make them work correctly.

I need advise on where to turn to so that I can get a quality finished product. I wish to have the work done and I plan to post up a job but I need to know how to word it. Does anyone have experience with this? Can someone point me in the right direction?

View 3 Replies View Related

JQuery :: Firefox Extension Is Broken In V1.3.2 ?

Apr 3, 2009

I am developing a Firefox extension and after upgrading from jQuery v1.2.6 to v1.3.2 I found that including jQuery in the XUL-file will break other extensions that displays buttons on the toolbar, among those is Adblock Plus.

I have not tried any versions between those mentioned so I do not know in what version this happened. If i revert to v1.2.6 everything is OK.

View 6 Replies View Related

Firefox Extension Trigger Twice With Load Function

Nov 18, 2010

I have started to work on an extension that triggers when the page has been loaded. The problem I have is that the event is triggered twice. Its almost as if two threads are created when the users navigates or browses web sites. Why does this happen and how could this be changed to only trigger once. I have attached the files. Here is the browser.xul file

[Code]...

View 1 Replies View Related

Writing Firefox Extension - Detecting New Page?

Mar 18, 2010

I am writing a firefox extension and I need to execute a YQL query everytime the user changes webpage on their browser.For now, all i am concerned with is detecting if their is a webpage change.For example. User is on [URL] then switches to [URL] At this point i need to call a function.So far all i can find is an onload=function()Which is only working once when the browser opens up.

View 1 Replies View Related

Conditionally Loading .js Files

Feb 5, 2008

is it possible to load .js files conditionally? suppose i have a.js b.js c.js

and then inside a table y have a drop down box that has A B C

I want to be able to load a.js if I select A, b.js if I select B and c.js if I select C.

View 7 Replies View Related

Loading Backups Of JS Files From CDN

Jan 20, 2011

I'm using the asynchronous example from [URL] to load a backup jQuery CDN if the main Google fails or goes undefined for some reason. The default script loads the backup (ASPNET CDN) but if I want to add a local copy backup to the ASPNET CDN, it will not load if the ASPNET CDN is down. I tried different variations with no success. Here is the code:

Code JavaScript:
// Setup backups
var jqbackup1 = '//ajax.aspnetcdn.com/ajax/jQuery/jquery-1.4.4.min.js';
var jqbackup2 = '/js/jquery-1.4.4.min.js';
// Setup getScript function
function getScript(url, success) {
[Code]...

View 2 Replies View Related

JQuery :: Loading Css Files Synchronously?

May 4, 2011

now im loading css files in that way:

$('head').append('<link rel="stylesheet" type="text/css" href="' + file + '">');

after i need to work with values from this css file.
For example i need to get the width and height of one of element and to put it in another:

$('#myContainer').css({
width: $('#anotherContainer').width(),
height: $('#anotherContainer').height(),
});

so...the problem is that my javascript code is executed before the new css file are successfully loaded...and script goes to get wrong values

is it possible to fix?...or exists another ways to load css filessyncronously???

View 13 Replies View Related

Files Not Loading Correctly For Website

Feb 1, 2011

I'm working at a college in Michigan and we have an issue with the files not loading correctly for our website. The issue appears to be a javascript problem. When I try to access a page, it will load, but the javascript functions for instance will show up on the page as if it is just html text. So I right-clicked the page, clicked "view source" and when the source code for the file opens up it shows the javascript portion in the head section as:
<disabled-script type="disabled-text/javascript">
function somefunction(){}
</disabled-script>

However, the code I have in the file of course is written as:
<script type="text/javascript">
function somefunction() {}
</script>
I do not have javascript disabled on my browser or anything, so that is not the issue. For some reason it appears it is getting disabled though on page load.

View 1 Replies View Related

JQuery :: Loading The Multiple Files?

Nov 17, 2011

The application I'm debugging is throwing a very general jquery error (H is undefined) based on my obfuscated js file. There are jquery methods in this file. The file has been tested and is used successfully in other applications. I noticed the application that throws the error is loading two versions of jquery:

jquery-1.4.2.js and jquery-obf-1.4.2.cache.js

Typically our applications only load the obfuscated version of jquery. if loading 2 versions of JQuery into a page could cause the confliction I'm seeing?

View 1 Replies View Related

Dynamically Loading External Javascript Files.

Apr 14, 2006

I have been struggling with a cross browser solution to loading
external javascript files on the fly.

I have been successful using the following code in IE6:

var newScr = document.createElement("SCRIPT");
newScr.src = "newScr.js";
newScr.type="text/javascript";
document.getElementsByTagName("head")[0].appendChild(newScr);

I believe the reason is that IE is loading the external file
syncronously while Firefox is not. Is there an onload event for
creating an element (if so I do not see it in Venkman). I have seen the
solution of using XMLHTTP to load the script but I am trying to get
around any dependency (atleast at this stage of the library) on
activex.

View 1 Replies View Related

Dynamically Loading Files Containing Bunch Of Data

Apr 28, 2011

Here's what I'd like to do using pure JavaScript and HTML (no Ajax or PHP): My website loads different JavaScript files dynamically which contain a bunch of data, that I will display on the website. The dynamical loading function is placed in the <HEAD> and looks like that:

Code:
function loadJsFile(filename){
console.log("loading js file")
var fileref=document.createElement('script')
fileref.setAttribute("type","text/javascript")
fileref.setAttribute("src", filename)
fileref.onload = dataIsLoaded;
if (typeof fileref!="undefined"){
document.getElementsByTagName("head")[0].appendChild(fileref)
}}

The dataIsLoaded method in there is a callback that is triggered when the JavaScript file has been loaded:
Code:
function dataIsLoaded(){
console.log("loading js file done")
dataLoaded = true;
data = new Data();
}

DataLoaded is simply a global boolean that is per default false and the 'data' variable contains all the data I want to display on my site. While the JavaScript file is being loaded, the browser continues building the site. When it gets to the <body> that wants to access some information from the data variable, I get the unsurprising error that 'data' is undefined. I looked for a way to wait until 'data' is defined and then continue with building the <body> but couldn't find a solution.

Alternatively I wanted to reload the divs in the <body> when the 'data' is available:
Code:
function reloadDivs(){
if(dataLoaded){
console.log("data available, reloading divs");
document.getElementById('someDiv').innerHTML = document.getElementById('someDiv').innerHTML
}else{
console.log("data is not yet available");
setTimeout('loadReportData();', 500);
}}
This does not work, I get a blank div when I do that.

View 10 Replies View Related

JQuery :: .load() Loading Very Small Files Slowly ?

Feb 15, 2010

I'm starting to use JQuery ajax and am seeing a second-2 delay in the loading of a line of text when I click on the link.

Here is the JQuery code

Content should load when the slideUp is done but it normally doesn't change the content till halfway through the slide down because of the delay.

I've tried without the slideup/down but it still has this delay.

The content to load is at most 8 words.

View 1 Replies View Related

Dynamical Loading Of Html Files And Executing Of Its Javascript Content.

May 30, 2007

i'm using a little "ajax" loader script to dynamically load files into
different "div" tags on my main site. the code for this part looks
like:

View 13 Replies View Related

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>

View 4 Replies View Related

JQuery :: Loading Files - Script Element Is Dynamically Added To The Head Section Of Html

Feb 6, 2010

I came up with some code to load javascript files dynamically. But I've got problems..

When the script element is dynamically added to the head section of html, i think that the document.ready event fires once again and therefore the code sort of runs twice.

In the html page I call this method:

In the script test.js I have the function SayHi():

The SayHi method never gets called and alert('begin') & alert('getScript') get called twice in this sequence:begin begin getScript getScript.

View 1 Replies View Related

Loading Firefox With Xml Data

Oct 25, 2005

I've got a script that I'm using to render a list of links. The data comes from an xml file.

If I run the code in IE, I get all the data formatted the way I want it to.
If I run the code in Firefox, I get squat.
I suspect the problem lies in "xmlDoc.getElementsByTagName".
I'm using it to collect elements for rendering.

Any suggestions? Code:

View 4 Replies View Related

Pre-loading Images Properly (IE + FireFox)

Oct 25, 2007

I am seeking a easy to maintain and more importantly *working* way to
pre-fetch images, so the pages I develop load smoothly without seeing
the images kick in flicker as they usually do. Important - I need
this to work on Internet Explorer 6.0+ and FireFox.

I am presently using at the head of the page,

pic100= new Image;
pic100.src="./imageme.gif";

However, it doesn't seem to work on FireFox at all. I've tried
different combinations with the URL path, but I don't know what I am
doing wrong. Can someone please assist me with this boggle?

View 23 Replies View Related

Firefox Never Finishes Loading File / Fix It?

May 1, 2009

I'm building a home page with an update checker. A function, called 500 millisecs after the page loads, appends an external .js file and compares a variable on it to a different internal variable. If the internal variable is lower than the external variable, then the update prompt is displayed.

This all works fine, but the status bar says "Read www.primedesigning.com" (the site with the external js), or sometimes "Transferring from www.primedesigning.com". But, if I hover over any link, the status bar goes back to "Done". Also, if I leave my mouse still, wait for the update prompt to appear, and then move the mouse, the status bar says "Done".

I have the Fasterfox extension installed, and it confirms what the status bar is saying. It never stops loading unless I do 1 of the 2 solutions mentioned above.code...

View 4 Replies View Related

Loading Multiple Functions Across Multiple Files?

Apr 1, 2010

I am familiar with the user built addEvent function used to load multiple functions in the window.onload property. However, I am curious as to the best way to do this across multiple JavaScript files. I thought I had seen somewhere code similar to the addEvent function was native to JavaScript now but I can't seem to find that anywhere.

Just to clarify, suppose I have 3 JavaScript files:

Code:
function foo() {
// do something here
}
fileB

[Code]....

note that it is not feasible to combine those functions into one file as they aren't always loaded together. What's the best way to load them all as a window.load?

View 1 Replies View Related

JQuery :: Cycle Loading Issue In Firefox OSX?

Sep 6, 2010

I'm using pager functionality to navigate a slideshow with thumbnails and next and previous images. In Firefox 3.6.8 on OSX 6.4 the main image displays at 6px wide and 18px high if I clear the cache and load the page fresh. Once the images are cached, subsequent page loads show the images at their correct size. I'm stumped.A secondary issue I'm having is that I'm displaying both vertical and horizontal images and would like to center them within their container, but haven't figured out how to apply the pager functionality once I wrap the images in a div to position them.Here's the site in development, and I've attached a screenshot of the sizing discrepancy (since it seems to be very specific to Firefox on OSX - Safari does not display the same issue)Attachments Screen shot 2010-09-06 at 2.53.10 AM.pngSize : 353.76 Download : 344

View 2 Replies View Related

JQuery :: Cycle : Images Are Not Loading In Firefox?

Jan 4, 2012

My code is very simple: a div conatining 5 images (always the same 5!) to swap using the fade effect. It works fine in IE but in Firefox (I have Firefox 8.0) the images are not being uploaded. I checked previous posts and some point out that instead of doing

[Code]...

I would need to include a 'load' event trigger. However, since I am not that familiar with javascript or jquery programming, I couldn't manage to program this solution and tested.

View 4 Replies View Related

JQuery :: Firefox - 3.5.2 - Site Is Render Twice During The Loading

Aug 18, 2009

I don't know if it's a bug in jquery but some of you can have encounter the same problem with their

With the last version of Firefox ( 3.5.2 ), the site is render twice during the loading. 

We can't isolate which element can produce this problem and it happens only with the firefox 3.5 ( not in 3.7pre or 3.0.12, not in ie, etc...

We load some js from external source ( facebook, googlesyndication, etc...

View 1 Replies View Related

Onmouseover Image Not Loading In IE - Firefox Or Opera

Nov 6, 2009

I am experiencing a problem with some images I am using for navigation. In Safari on my Mac everything displays as it should. The image loads ok, I mouse over the image and it goes black and white, mouse out and it goes back to colour.

When I tested this with Firefox and Opera on my Mac and IE8 and Firefox on my Windows laptop the onmouseover image does not appear and I am left with a text link and a lot of flickering as you move the mouse about.

I have almost zero knowledge when it comes to javascript and I've got the necessary code which according to everyone works from either books or the web.

I am completely stuck as to why this simple operation is not working.

you can see the page at this address: [url]

Only the left hand image has been set to onmouseover as I was testing to see if it worked first.

I have attached the CSS and HTM files in a zip file.

View 6 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved