javascript

chrome extension to pass current tab url to remote json search then parse results into an html table.

I am trying to make a chrome extension that allows to me to take the url of the current tab and pass that to a 3rd party website search. This php returns JSON formatted text. I would then like to format this JSON as a simple html table. pseudo code: function getUrl(){ currentUrl = the current tab url } function search(currentUrl...

having a problem with jquery votes just like stackoverflow votes?

i have this jquery code with an ajax request that works fine, but the jquery is not displaying the results(vote_count) and changing the upvote image, just like stackoverflow: jquery code: $(function(){ $("a.vote_up").click(function(){ //get the id the_id = $(this).attr('id'); //the main ajax request $.ajax({ ...

Is it normal for pages to be unprintable??

Im not sure what could use this, but a client of mine told me that some of the pages of the site I just developed are printed half-and-half. website: here What could cause something like this and how do I fix it? Thanks for any advice on the issue. ...

JS function call won't work in Chrome and Opera (JS + jQuery)

Hi guys, I can't seem to get the following functionality to work under Chrome and Opera (latest versions on Windows XP). The code is: $.getScript('/js/modules/'+module+'.js', function() { setTimeout('window.'+module+'_init()', 800); }); Everything seems to work fine, the script loads, init function exists (a few debug alerts with...

changing the image in jquery?

i have this jquery code which works fine, but the image at the end is not changing to the src i specified here: jquery: $(document).ready( function() { $("a.vote_up").click(function(){ //get the id var the_id = $(this).attr('id'); //the main ajax request $.ajax( { type: "POST", ...

How to make a jquery datePicker button image unclickable

I have a jquery UI datePicker in my page. I have a text box on which the date is displayed. The code is: $("#cal").datepicker({ minDate: new Date(), defaultDate: new Date(), buttonImage: '/images/calendar.gif', constrainInput: false, closeText: 'Close', showButtonPanel: true, showButtonText: 'Choose a...

How to handle Confirm() of Javascript as per my following requirements?

My Requirement is this. Steps:- On Client Click (button) Disabled the Button. Then it should prompt for OK or CANCEL. If OK then fire the OnClick event (Code Behind). If CANCEL then don't make a server-side trip and enable the button. Following is the code I am using for the button. <asp:Button ID="btn1" OnClientClick="this.disabl...

Data compression to reduce network bandwidth usage

Hello, suppose that I've a huge amount of data (>KB/MB) to transfer from an ajax request (JS) to a webpage (PHP), is it usefull to deflate data (by JS scripting) before send it to server and inflate it in my Webpage or the Apache module (Content-Encoding:gzip) do it by itself? Thanks. ...

What is the proper place to put AJAX-related content in a link

When you need a link to contain info for an AJAX call what is the proper place to put the info? I've always put it in the rel attribute, but reading the documentation for rel it seems this isn't the proper place: This attribute describes the relationship from the current document to the anchor specified by the href attribute. ...

Looking for open source javascript implementations of the pubhubsubbub protocol

What are the javascript open source implementations of the pubsubhubbub protocol publishing side first ...

jQuery IE8 Object required

I have a button, that when clicked is supposed to open a jQuery UI Dialog. It works in FF3, FF4, Chrome, and IE8 with ChromeFrame. It does not work in normal IE8. I get an error that simply says "Object required". Below is the function the click calls. function punchNonProd() { var HTML = ""; HTML += "<tr id='burdenLine'><td><st...

Howto find the first common XPath ancestor in Javascript?

Hi, I have two XPaths, for example: /html/body/div[3]/div[4]/table/tbody/tr[2]/td[4] and /html/body/div[3]/div[4]/table/tbody/tr[2]/td[3]/a[2] How can I find the first common ancestor now? In this case it would be /html/body/div[3]/div[4]/table/tbody/tr[2]/. I found this question but the solution is in ruby and doesn't really give ...

JavaScript regex to find word in middle of string

I'm trying to pull the name "Dave" (but it will be different depending on who is logged in) out of the following string: Logged In: Dave - example.com Any thoughts on the best way to do this with regex in JS? ...

"remind me later" popup won't come back using setTimeout across navigations

Hi, there, here's the requirement: Upon page loading, if certain condition is true, pop up a window with details, provide a link on the popup window that says "remind me in 5 minutes", when clicking on the link, the popup window should disappear and pop back up in 5 mintues. I am using setTimeout for the delay, however it only works whe...

Microsoft JScript runtime error: Object expected when asp.net text_TextChanged?

I have textbox for Date in update panel and this text box has TextChanged method. I am getting JS error when field is empty <asp:TextBox ID="txt22_2" runat="server" CssClass="TextBox SmallText" AutoPostBack="true" ></asp:TextBox> <asp:ImageButton ID="img22_2" runat="server" ImageAlign="Middle" style="margin-left:-5px" ImageUrl="...

WYSIWYG web scraping/crawling setup using Javascript/html5?

Hi folks, My goal is to allow less experienced people to setup the required parameters needed to scrape some information from a website. The idea is that a user enters an URL, after which this URL is loaded in a frame. The user should then be able to select text within this frame, which should give me enough information to scrape this ...

window.open fails with relative URLs in IE (When using the base tag)

Problem I'm using the base tag to resolve relative URLs to a specific point in some dynamically generated .html pages. This works great until I try to use Window.open in javascript. Firefox resolves everything fine, but IE resolves the URL to the displayed URL. Is there an IE work around for this? I'd like to avoid Combining the U...

Javascript: fake a touchdown event?

If I have a x,y coordinate onscreen is there a way to 'fake' a touchdown event? ...

Javascript: Get typed CSS values NOT computed values

Obviously it can be done since Firebug does, but I wasn't sure if they were doing a lot of processing on the CSSDeclarations or if there was something in the DOM that I am missing, but I would like to grab the the TYPED style of an element or stylesheet and not the cssText that the DOM seems to be giving back. An example would be the bo...

how to autoresize iframe contents on extjs webdesktop

hi all , i'm creating my personal extjs webdesktop , i have a tab panel with a tab where i wrote html code for iframe that load a aspx page. When i resize window tabpanel iframe contents doesn't resize like a browser does and i see just scroll bars,is it possible autoresize iframe contents also? here there is my code: items: [{ ...