JQuery :: Link Tracking Plugin + JSONP + Opera?

Oct 1, 2009

I'm tryng to develop a link tracker, something like google analytics. The goal is to get a command like this:

$('html').trackAllLinks(optional options);
$('a').trackAllLinks(optional options);

Now i developed a javascript that could do just what i need but the problem is it doesn't work in every browser as it should be. Because i want to track a link click i need to make a request to my server to say that the link has been clicked. The first problem i had was that i needed to make a cross domain ajax call. But this is fixed by using JSONP. Now my code looks like this:

[Code]...

The first idea was that i wouldn't do anything in the success of the jsonp call and just let the request go, but because this didn't work when i clicked on an external link, i changed it to wait on a response before opening the link. The problem with this code is that it doesn't work in Opera, no request is being send to the server Now i know that JSONP mimics the ajax call by adding a script tag to the page which loads the script of the given url. Now i think when i do this in Opera the dynamically loaded javascript isn't executed. In Firefox, IE, Chrome, Safari it works but not in Opera.

Another idea i had was by dynamicly adding an image to the page. But this has the same problem in Opera and i was unable to track an external link in Safari and Chrome (Webkit.

View 1 Replies


ADVERTISEMENT

Link Tracking - Counter That Will Display Beside A Link With The Number Of Times The Same Link Has Been Clicked

Feb 16, 2009

I need a counter that will display beside a link, with the number of times the same link has been clicked. I do not have FTP access to the site, since it is based on a CMS.

View 1 Replies View Related

Link Click-Through Tracking

Dec 9, 2010

I am wanting to start tracking the clicks for certain links on an ecommerce site i run (its php based). However, i also want to track the conversions associated with these clicks too. And at the same time i do not want to change the links so that i don't have seo issues as well as issues with link sharing.

Because of these requirements i'm thinking ajax may be the best solution. I've setup a tracking ajax script which works well when the link is pointing to '#' but as soon as i change the link to an actual location the script fails to trigger, the link uses an onclick event. Is there a way to make the ajax script trigger before the page changes? Would this cause any delay on the loading of the page the link goes to?

View 1 Replies View Related

JQuery :: Cursor Moves To Start Position In Opera Autocomplete Plugin?

Aug 20, 2009

With the autocomplete plugin and using Opera; When the input value, is not found in the suggestions the cursor moves to the beginning of the text,

View 2 Replies View Related

JQuery :: Regression: Form Plugin AjaxForm Cannot Access XML Return Data In Opera

Jan 26, 2011

I stumbled on this problem while testing StatusNet for our next release; we use jquery.form's .ajaxForm() to do various AJAX form submissions, including the primary message-sending form which includes a file upload control.

We've not seen problems before, but since upgrading from an old Form plugin version 2.17 to 2.49 a couple months ago, I've noticed our development branch no longer works properly in Opera: the actual submission goes fine, but we're unable to access the XML return data (which usually contains HTML fragments to put back into the UI).

I have a test case which demonstrates this at [URL] (source of the main page & submit handler are included there), using current jQuery 1.4.4 and jquery.form 2.52.

Under Firefox 4.0b10 and other browsers, the forms submit correctly, and we can read nodes and text out of the returned XML just fine.

But on Opera 11.00 and 10.63, the submission goes through but we get back an HTML document containing only "<head></head><body></body>". On Opera 9.63, it also includes the text "Blank page."

I tried to trace this down in jquery.form's history, and the trouble seems to have started around 2.39 with a commit ironically titled "iframe load fix (mostly for Opera)", which changes the event handling for forms submitted via iframe: from that version on, a 'load' event handler is added directly as an onload attribute on the iframe's source, whereas previously it was added with attachEvent or addEventListener.

It looks to me like the iframe is throwing a load event for the "about:blank" page, instead of for the submission.

I can revert back to 2.17 or another working version for now, but I'd like to make sure this is fixed upstream;

View 4 Replies View Related

Opera Problem With Making Link Clickable But Not Navigable

Feb 22, 2007

... unless javascript is disabled.

Right now I have a set of links that I want to perform some javaScript when clicked on without actually navigating to the link.

I am using this code in the onClick attribute for the link

onClick="load(this); return false;"

and it works in IE and FF but in Opera it still follows the link.
Is there a better way to do this?

View 5 Replies View Related

Creating Bookmark Link In Opera, Chrome And Safari?

Nov 23, 2011

I've searched high and low for some decent code that will allow a visitor to a website to bookmark the site through a hyperlink. The bookmarking is done through a javascript function that looks like this:

Code:

function OnBookmarkButtonClick (e)
{
if (window.sidebar)

[code]....

I need to add some detection for Opera, Safari, and Chrome. note that it must be feature detection, not browser detection. But as I said, I've searched high and low for this, and couldn't find anything.

View 3 Replies View Related

JQuery :: Jsonp To A Static Remote File?

May 12, 2009

Currently I was able to load remote JSON (php) file using JSONP protocol. However, how to do if my remote file is static? In the doc, it said: you can load JSON data located on another domain if you specify a JSONP callback, which can be done like so: "myurl?callback=?". But since my remote file is a static text file, how can I specify the callback in the output dynamically? In fact, I also wonder if it is possible to control the random callback name by modifying jquery source code...

View 1 Replies View Related

JQuery :: JSONP Ajax Call Never Returns?

Jul 28, 2011

I'm trying to use $.ajax to make a JSONP call, but the callback function is never executed.I have debugging code in my server that acknowledges that a request is received, but that never runs.The same URL works fine if I paste it into the address bar of my browser.

[Code]...

View 7 Replies View Related

JQuery :: Classic ASP And JSONP Output - Return Data

Jun 25, 2011

I found this post: [URL] It explains exactly what I want to do. The person who had the problem seemed to have sorted it out but as my knowledge is not to great I am not to sure what he is getting at. I tried various things but to no avail. All I want to do is return data to a calling javascript using type get and datatype jsonp. If I simply Response.Write "[(""id"": ""123""}]" then nothing happens. So whatever the thread I revered to above is doing it seems to be going in the right direction.

View 6 Replies View Related

JQuery :: Headers And Non JS Code Returned From JSONP Request?

Aug 6, 2010

Im trying to figure out if a public picasaweb userid exists or not. Its a pure client app, so no server-side proxies. The 1st method works only on FF & Chrome.

[Code]...

View 12 Replies View Related

JQuery :: Jsonp (firebug)returns Missing ; Before Statement?

Mar 30, 2011

Here's my code:

$( document ).ready( function(){
$('#get_metars').click( function(){
//var icao = $('#icaos').val();

[code]....

View 1 Replies View Related

JQuery :: JSONP And Asynchronous - Capturing And Returning Response?

Mar 17, 2010

If this is synchronous, normal json request, I can capture the result (data) and return it to a calling function.

However jsonp is not synchronous. Whilst the data IS returned, and I can view it from within the success function, but I cannot access it after that.

$.ajax({
url: remote_url,
async: false,
cache: false,

[Code]....

I am building a library of functions which call this function, so I cannot have the data processing done within the success function, I need to extract the data itself.

View 2 Replies View Related

JQuery :: Jsonp Callbacks Execution Order In Firefox

Apr 6, 2010

I am trying to develop a iGoogle-like dashboard that uses JSONP to get the content of each widget from other (trusted) sites.Each widget is a div that will take care of getting its content using $.ajax() and use the callback to update the div with the html content returned with JSONP.The problem I have happens only in Firefox (I'm using 3.6.3):when a site is unavailable or takes longer to return the JSONP content for a widget, it seems that the callback for the other widget does not get executed. All the widgets stay in the "loading" state although I'm sure they have all received the answer.What's puzzling is that if I hit the "stop" button of Firefox, the content of the other widgets get displayed (ie. their displaying callbacks get executed).

If the calls are asynchronous, what prevents Firefox from executing the callbacks for the other widgets once the response is received?Do you have any idea of what's happening and if there's some way around this?

View 2 Replies View Related

JQuery :: JSONP - Error / Complete Event Not Firing

Jun 27, 2011

I have some jQuery making ajax requests that works just fine if the server returns a 200 but whenever it returns any error HTTP status none of the events fire. It's happening on more than one request to different servers but I'll just include one example for now:

var ajaxResponse = $.ajax({
url: widget.serviceURL + 'customer/createAjax?'+$('#ndBookingFormStep1').serialize(),
dataType: 'jsonp',
success: function(data, textStatus, jqXHR){
console.log(data);
if( data.status != 'OK'){
widget.message(data.status);
} else {
console.log(data);
}}})
.error(function(jqXHR, textStatus, errorThrown){
console.log(jqXHR);
}).complete(function(jqXHR, textStatus){
console.log(jqXHR);
});
console.log(ajaxResponse);
console.log(ajaxResponse.responseText );

The request gets made just fine, I can see the response in the net console in firebug and it returns the data I want with a 500 when I do not complete the form correctly. However, it does not fire either the error or the complete function when I get this status, and the ajaxResponse.responseText is undefined when it is logged to the screen. When the form is completed and the request is successfull the success function fires just fine.

View 8 Replies View Related

JQuery :: Ajax Call Doesn't Get Jsonp It Expects?

Sep 30, 2011

I have jQuery 1.5.1 client-side that is making an .ajax() call to an ASP.Net MVC controller method - expecting a jsonp packaged response. In normal cases, the server packages up a response of typeapplication/json and that works fine. The problem is when the session on the server times out, the server will respond to the ajax call with the server's login page, which obviously isn't valid json and the error handler on the ajax call fires with a parseerror. Similarly, if there's an exception server-side, the site redirects to a custom error page, which again isn't valid json, and: barf. I have no information client-side what went wrong when in the .ajax error handler. The xhr just says parseerror with no further info. Is there any way I can see what the server responded with so I can handle this more intelligently? I've tried change the client-side dataType to "json text" hoping that it would try to interpret the server response as text, if the json fails, but it just goes to the error handler.

View 4 Replies View Related

JQuery :: Make JSON Versus JSONP Request Depending On URL

Apr 21, 2010

So I have a function that is going to get a URL, and have to retrieve json data from that URL. The URL _might_ be same-domain, and might be cross-domain. If it's cross-domain, of course I want to do jsonp complete with the script-tag-to-load and such, but if it's same domain of course I want to do just xhr for efficiency. So I _could_ write all my own logic for this. Write logic to see if the url is cross-domain or not, and then make entirely different $.ajax() calls depending.

(I think I need to use $.ajax() rather than $.getJSON() because I need a callback on failure, not just success). If it is cross-domain, use dataType:jsonp, and make sure to supply a &callback. If it's not cross-domain, dataType:json, and don't even bother supplying a callback. But I'm having trouble figuring out if this is true, or how. What's the easiest way to get $.ajax() to make a dataType:json request if it's same-domain, but a dataType:jsonp request if it's cross-domain?

View 1 Replies View Related

JQuery :: .ajax() With DataType: 'jsonp' Will Not Use Error Callback If Request Fails?

Oct 1, 2009

I'm using an .ajax() call to do a jsonp request to another domain. When the user is not logged in, however, the server will return a 401 error. Unfortunately, this causes my .ajax() call to fail _without_ calling the error callback. Is this a known bug? Here is my code:

[Code]...

View 2 Replies View Related

Jquery :: Cycle Plugin - How To Link Directly To Slide From External Page

Jun 15, 2010

I've set up a portfolio using the Cycle Plugin. It works great, but now I want to link directly to one of the slides from the home page, and I'm not sure how to make this work or where to even begin. Here is a page on my site with a slideshow using Cycle. (I'm actually transitioning divs, not just images) [URL].

View 1 Replies View Related

JQuery :: Cycle Plugin - Code - Get My Slides Links To Link To My Other Slide Page

Oct 18, 2010

Someone kindly produced some code for me so I could get my slides links to link to my other slide page. The thing is I am using the "pagerAnchorBuilder" option on my original slide and I cannot seem to get the new code I was given working with my code on my website. Can someone advise me on how I can get the new code working with thepagerAnchorBuilder.

My Website Code:

New Code:

View 9 Replies View Related

JQuery :: Tracking Down Error In IE8 / 1.3.2

Mar 20, 2009

Message: Invalid argument. Line: 12 Char: 12949 Code: 0 [URI]... I keep getting the above error In IE but Not FF.. Everything works great in FF, and almost in IE.. But I am having a hard time tracking down the cause this issue in IE.

View 16 Replies View Related

JQuery :: URL Tracking With Colorbox?

Nov 4, 2010

Is there an approach that I can take to have the URL change and still open a Colorbox?I need to get some tracking code to display in the URL, but I guess the <a> tag isn't really followed when I open the colorbox, so the URL change is cancelled when I click to open the Colorbox.

View 1 Replies View Related

JQuery :: How To Load A Js Tracking Image

Jun 8, 2010

I'm having difficulty getting a js tracking image to display.In html you would use code like:

<div class="taLogo"><script type="text/javascript" src="http://urltojsimage.js"></script></div>
However if I want to load it using jquery I'm having no luck.

[code]....

View 1 Replies View Related

JQuery :: Click Tracking Works In IE Only

May 29, 2009

Need to know why this code below records the click in IE but does not record the click in FF or Safari. a.adBanner is an internal link within the same domain. [code]

View 7 Replies View Related

Event-binding For Link With A Plugin?

Oct 21, 2010

I need to bind an event to first link here [URL]("share", white cross on orange)problem is whatever I do is overwritten (or just ignored) by the plugin..I just need to pop a div with a little disclaimer..this is the link:

<a href="http://www.addthis.com/bookmark.php?v=250&username=xa-4c9128c52c3f57fa" class="addthis_button_compact shareThis" id="share">Share</a>

I added my own 2nd class ('shareThis'), added my own id, didn't work; finally tried their own class, at300m, also doesn't work...

View 2 Replies View Related

JQuery :: Append A Sequencial Tracking Code To Each URL?

Nov 8, 2011

I need to add sequencial tracking code to each link on a page.The tracking code changes every month, this month it is

?cmpid=FS005a

Before

<a href="http://somesite.com">Blah</a>,<a href="http://somedifferentsite.com">Blah</a>

After (a number starting with 1 is appended)

<a href="http://somesite.com?cmpid=FS005a1">Blah</a>,<a href="http://somedifferentsite.com?cmpid=FS005a2">Blah</a>

View 2 Replies View Related







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