Skip to main content

Bug Tracker

Side navigation

#7418 closed bug (fixed)

Opened November 05, 2010 05:21PM UTC

Closed December 27, 2010 08:23PM UTC

Last modified March 13, 2012 05:43PM UTC

JsonP not removing script tag when call completed

Reported by: Owned by: rwaldron
Priority: blocker Milestone: 1.5
Component: ajax Version: 1.4.4rc
Keywords: Cc: john, snover
Blocked by: Blocking:

Seem to be still experiencing the bug for Ticket #7196, in jQuery 1.4.4 RC2. For a detailed explanation of the problem please see this

Attachments (0)
Change History (13)

Changed November 05, 2010 05:55PM UTC by addyosmani comment:1

Please provide us a reduced test case that ideally connects to the same server that you are performing testing with in your StackOverflow response. Without a complete test case we are unable to accurately reproduce what you are trying to do.

Changed November 05, 2010 05:56PM UTC by rwaldron comment:2

component: unfiledajax
owner: →
status: newpending

Changed November 05, 2010 06:30PM UTC by anonymous comment:3

Here is a sample. Clicking the first link in this page will fetch an ID from the service and the <script> tag in the head will be removed. However clicking any of the other two links will get the correct ID but cause an error and the <script> tag is never removed.

Changed November 05, 2010 06:55PM UTC by rwaldron comment:4

status: pendingopen


Changed November 05, 2010 07:07PM UTC by rwaldron comment:5

keywords: → needsreview
priority: undecidedblocker

Changed November 09, 2010 03:37PM UTC by rwaldron comment:6

resolution: → worksforme
status: openclosed

I've re-assessed this issue and I'm confident the issue is in fact non-existent.

Reduced case:

Recreation of original case:

Changed November 10, 2010 01:09AM UTC by jitter comment:7

Replying to [comment:6 rwaldron]:

I've re-assessed this issue and I'm confident the issue is in fact non-existent.

Please reopen the ticket. Due to a simple oversight both of your test cases are missing an important piece which prevent the exceptions experienced in the original test case. The callback functions you use (handleJsonp / fetchLocationCallback) aren't globally defined in neither test case.

But that is crucial to reproduce the original issue. your reduced test case this time with callback function globally defined (2nd click triggers exception) more verbose test case which uses "no wrap (head)" to make sure the function is globally available and not hidden in the jquery-ready-handler-scope. Here you can check conveniently check that <script> tags really aren't removed from <head>

Changed November 10, 2010 01:13AM UTC by rwaldron comment:8

resolution: worksforme
status: closedreopened

Jitter - thank you. That seemed ever so bizarre that the issue just, "went away". Thanks for the heads up.

Changed November 10, 2010 01:13AM UTC by rwaldron comment:9

owner: jeremyk@phase2online.comrwaldron
status: reopenedassigned

Changed November 10, 2010 02:22AM UTC by rwaldron comment:10

Changed November 10, 2010 04:14PM UTC by rwaldron comment:11

Updated pull with modified unit tests:

Additional passing test case

Changed November 10, 2010 05:46PM UTC by rwaldron comment:12

keywords: needsreview

Changed December 27, 2010 08:23PM UTC by rwaldron comment:13

resolution: → fixed
status: assignedclosed