Extension Stops Executing After Reaching Some Page?
Sep 21, 2011
I have written a chrome extension which will redirect to all hrefs for a given source urls in current tab.. But i don't know why all of a sudden it stops executing after reaching some page. I am attaching my code as attachment.
I have a function to populate three listboxes. The items in the listboxes are from a MYSQL database and are related. The items are requested by a php page.
Most of the time everything works fine, but sometimes I end u with only one or two listboxes.
I can't figure out what's going wrong here. I've tested in Firefox and Internet Explorer, both the same problem.
Does anyone know why my code sometimes stops executing? Could it be that i made too many requests in a short time so the next request can't execute because the current has't finished?
I've been working on a Google Chrome extension that reads the feed from URL... and it works perfectly. I published it already, but now I'm trying to create an options page to change the feed between TheOatmeal and TheOatmeal's Twitter feed. Eventually I'll add badges so people know when a new update occurs, but that's beside the point.The current problem I'm having now is an if this, do this statement, I believe. I really don't know all that much about Javascript, but once I get both feeds working correctly, I won't have to.My option.html and option.js files are both attached in the .zip.
Inside my manifest.json file has "popup": 'popup.html' which is TheOatmeal site's RSS feed. 'popup2.html' is only in the folder of the extension, but it contains the JS script for the Twitter RSS feed.As for research, yes, I have. I've been looking through w3school tutorials and searching around for example options pages. The current option page I have came from a tutorial that I chopped up and added my own stuff to.
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.
The site I'm working on lists holiday accommodation (from a searchable database). The user can then 'short-list' several properties for further action (as yet unspecified). This is similar to having a list of products and adding them to a cart. Ajax is working fine to the point of adding the items to the Short-list, but because the page is no longer refreshing certain PHP variables aren't getting changed, so: (a) The 'Add to Shortlist' button isn't changing to 'Remove' and (b) The 'div' showing the Short-list controls isn't appearing
A non-Ajax version can be seen at: [URL]
This will show what should happen when an item is added to the Short-list, but the page refreshes and returns to the top. With Ajax nothing moves (which is the intention), although the addition to the Short-list does happen in the background, and everything displays as it should when the screen is (manually) refreshed.
I'm not sure how best to get the changes (a) & (b) above to happen with Ajax without losing the non-Ajax capability provided by the PHP. I have wondered about setting the button image with CSS and then changing the class using Ajax, but haven't tried it yet. It must happen only on the clicked button, of course.
I have several ajax calls that originates from the same page its updating. It works perfectly in firefox but in IE it works for about 18 requests and then just stops until the page is refreshed. I thought it was a cashe issue but I have added a variable for that. I think it may have something to do with binding but I am not sure how to sort that. This is one of my functions.
For 2 day ago, i have re-read and re-write my code in first i have very very broken code execution in web in second :, i re write the code and in previewer browser ( i use mozilla 3.6.8) its work off line, but when i have implanting in web page, its not work, in 3rd, with mr.airshow support i have rewrite and it work on web page (thanks mr. airshow) but still in my mind, again :
Question :
1. Why the 2nd code can not execution in web page ?
2. How the code must be to load in web page ? Any rules ?
Is there a piece of code I could put in my website that will allow the same effect as the user disabling javascript in browser options? That would mean that it would stop any javascript from even executing? I would put it on an event.
Is it possible to execute a JS function in a website, by using the JS console? Facebook has a function Facebook.streamPublish() for instance, which displays a dialog box to send a story to your Wall.Is it possible to call this from the JS console manually?I'm developing a Facebook application. I tried to call the above function from the Firebug console to test but with no success.
I have an html page with a lot of JavaScript functions that all work fine. Then I decided to add a jQuery function, but the document ready is not executing when the page loads. As you can see below I've added the document.ready function at the top of the page, below the links. And below that are the JavaScript functions that were there all along. Why the document ready function doesn't execute? (I don't see the "ready" alert, and the jQuery isn't working.)
I have a simple button in my HTML. I also have a function in my external JavaScript file. This function calls an alert box with some text. Now, I also have a global variable in my JavaScript that gets the button by id, then assigns the onclick event handler to it which in turn is assigned the call to my alert box function. Simple right?
Problem: The alert box shows up when the page loads as well as when the button is clicked. This is not desirable. code...
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.
I've been doing some research on url names. The problem is, I need this code to return like say "index.php", it would return "index". But idk where I went wrong..
The code: <script> var sPage; var sPath = window.location.pathname; //var sPage = sPath.substring(sPath.lastIndexOf('\') + 1);
I allow people to upload images onto my web server. I want to verify each image is less than 50Kb and is an image type, this is what I came up with Verifying the files extension Code:
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?
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?
I have seen many Javascripts on Internet that checks the extension of the file before uploading. But all these scripts checks the extension when the Submit button is pressed. I want to check the file extension as soon as the file is selected. The script should delete the selected file from the type=file box and display an error message (when a file with the wrong extension is selected).
I would need javascript code to check extension of uploaded file. File upload in not mandatory, but I need script to check extension and allow only JPG, BMP, PGN and other Image files.
I am trying to extract the domain name from a url using javascript but having some problems.
This is what I have:
Code: var publisherName = document.domain; if(publisherName.indexOf('www')){ publisherName = document.domain.substr(3,document.domain.length); }
But it is not working and I am not sure how to rid of the extension Basically, this is what I want: Whether the location being sub domain or not it need to get from somthing similar to[URL]...
I want to implement the jQuery GUID Helper plugin into my web app but I don't know what's the "best practice" method of incorporating it into my code.I'm basically creating a cart system from scratch (figured it was asufficientlycomplicated system to use when learning jQuery). When the visitor first adds an item to their cart is when I wanted to create the GUID for the visitor. I have a cart-handler.js script that I link to from the item view page:
That script's first line is my$(document).ready(function(){ and the script handles AJAX calls to loading the data into cart record in my MySQL database, updates the cart total on the items page, and changes the button from "Add Item" to "Update Quantity".So would I need to link to the jquery.Guid.js script right from the view items file for my item view page? Or can I reference the plugin from the cart-handler.js file?
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.
I'm creating an extension on Firefox that wishes to parse the source of a page that the user is currently viewing for specific information. I've got as far as creating a simple extension with a button and when I click on it, it will show the url of the page I am currently viewing through: content.location.href. All the examples I've seen so far concerning viewing the source forces you to either use the 'view-source:' convention or the 'xmlhttprequest' method.
But these examples seems to be meant to be called within a web page and not an extension. When I cut and paste with these examples, I only get the source for the actual chrome portion of Firefox. I've tried modifying some of the examples to include 'content.document....etc' to reference what's being displayed in the browser, but it doesn't seem to work. Any sample or reference code so I can extract the page source of my current window from an extension?