[jQuery] Cross server check if a pdf file exists
I'm trying to see if a pdf file exists in a directory on another server. If it does, do one thing, if not do another. Here's what I tried: $.ajax({ url: url, type: 'GET', dataType: 'jsonp', jsonp:'jsonp_callback', error: function () { $('.Row').eq(i).children('td:eq(2)').append(file_unavail); }, success: function(){ $('.Row').eq(i).children('td:eq(2)').append(file_avail); } }); I can get it to work on the same server by removing the dataType and jsonp but I was search around and read that the jsonp would allow me to get around the Access to restricted URI denied code: 1012 I'm I doing something wrong? Is it possible to do what I'm asking with jQuery?
[jQuery] Re: missing ) after argument list error
Can anyone tell my why this might not work in a separate .js file but it does work from the firebug debugger? On Sep 19, 5:45 pm, switch13 [EMAIL PROTECTED] wrote: FF2 and I also tried IE6. The class is not getting added. That error is appearing in FireBug. Funny thing is, when I test it in the script window under the watch tab in firebug it works fine. On Sep 19, 5:35 pm, Aaron Heimlich [EMAIL PROTECTED] wrote: Works fine for me (Firefox 3 on Mac OS X). What browser gave you that error? On Fri, Sep 19, 2008 at 4:13 PM, switch13 [EMAIL PROTECTED] wrote: I can't see why this wouldn't work: $('h1:contains(test)').parents('body').addClass(test_class); -- Aaron Heimlich Web Developer [EMAIL PROTECTED]
[jQuery] missing ) after argument list error
I can't see why this wouldn't work: $('h1:contains(test)').parents('body').addClass(test_class);
[jQuery] Re: missing ) after argument list error
FF2 and I also tried IE6. The class is not getting added. That error is appearing in FireBug. Funny thing is, when I test it in the script window under the watch tab in firebug it works fine. On Sep 19, 5:35 pm, Aaron Heimlich [EMAIL PROTECTED] wrote: Works fine for me (Firefox 3 on Mac OS X). What browser gave you that error? On Fri, Sep 19, 2008 at 4:13 PM, switch13 [EMAIL PROTECTED] wrote: I can't see why this wouldn't work: $('h1:contains(test)').parents('body').addClass(test_class); -- Aaron Heimlich Web Developer [EMAIL PROTECTED]
[jQuery] Re: XML $.ajax GET IE6 Help!
Has anyone successfully got jQuery to pull in xml in IE6? On Jul 7, 5:17 pm, switch13 [EMAIL PROTECTED] wrote: I have this example working great in FF but I can't get it to work in IE6. I've tried the XML with cdata tags and without. Can anyone see my issue? HTML: *** !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; html xmlns=http://www.w3.org/1999/xhtml; head meta http-equiv=Content-Type content=text/html; charset=utf-8 / titleXML Test/title script src=jquery.js type=text/javascript language=javascript/ script script src=browse.js type=text/javascript language=javascript/ script /head body div id=widget/div /body /html ** JavaScript: * $(function() { $.ajax({ type: GET, url: books.xml, dataType: xml, success: function(xmlData) { xmlDataSet = xmlData; browseXML(); } }); }); function browseXML() { strToAppend = nbsp;; $(title,xmlDataSet).each(function() { strToAppend += pstrong + $(this).text() + /strongbr /; strToAppend += by + $(author,xmlDataSet).text() + /p; strToAppend += pPublisher: + $(publisher,xmlDataSet).text() + br /; strToAppend += ISBN-10: + $(isbn,xmlDataSet).text(); strToAppend += /p; }); strToAppend += p - - - /p; $(#widget).html(strToAppend); } XML ?xml version=1.0 encoding=UTF-8? bestsellers book title ![CDATA[ Plum Lovin' (A Stephanie Plum Novel) ]] /title author ![CDATA[ Janet Evanovich ]] /author publisher ![CDATA[ St. Martin's Press ]] /publisher isbn ![CDATA[ 0312306342 ]] /isbn /book /bestsellers Thanks Very Much!
[jQuery] XML $.ajax GET IE6 Help!
I have this example working great in FF but I can't get it to work in IE6. I've tried the XML with cdata tags and without. Can anyone see my issue? HTML: *** !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http:// www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd html xmlns=http://www.w3.org/1999/xhtml; head meta http-equiv=Content-Type content=text/html; charset=utf-8 / titleXML Test/title script src=jquery.js type=text/javascript language=javascript/ script script src=browse.js type=text/javascript language=javascript/ script /head body div id=widget/div /body /html ** JavaScript: * $(function() { $.ajax({ type: GET, url: books.xml, dataType: xml, success: function(xmlData) { xmlDataSet = xmlData; browseXML(); } }); }); function browseXML() { strToAppend = nbsp;; $(title,xmlDataSet).each(function() { strToAppend += pstrong + $(this).text() + /strongbr /; strToAppend += by + $(author,xmlDataSet).text() + /p; strToAppend += pPublisher: + $(publisher,xmlDataSet).text() + br /; strToAppend += ISBN-10: + $(isbn,xmlDataSet).text(); strToAppend += /p; }); strToAppend += p - - - /p; $(#widget).html(strToAppend); } XML ?xml version=1.0 encoding=UTF-8? bestsellers book title ![CDATA[ Plum Lovin' (A Stephanie Plum Novel) ]] /title author ![CDATA[ Janet Evanovich ]] /author publisher ![CDATA[ St. Martin's Press ]] /publisher isbn ![CDATA[ 0312306342 ]] /isbn /book /bestsellers Thanks Very Much!
[jQuery] Re: Why is nothing working in IE6?
Perfect! Thanks so much for your help! On May 14, 6:25 pm, Karl Swedberg [EMAIL PROTECTED] wrote: Hi there, I believe the problem is here: script type=application/javascript IE6 doesn't like that. Change it to: script type=text/javascript that should do it. --Karl _ Karl Swedbergwww.englishrules.comwww.learningjquery.com On May 14, 2008, at 5:19 PM, switch13 wrote: Even simple .hide(); does not seem to be working! I have the latest version of jQuery and every piece of my code seems to work perfectly in FF. I spent a day of development getting the jQuery below down to about 10 lines only to find the next day that it doesn't work in IE6. Here's a sample: !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http:// www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd html xmlns=http://www.w3.org/1999/xhtml; head meta http-equiv=Content-Type content=text/html; charset=utf-8 / titleAgg Perf Test/title script src=jquery.js type=text/javascript language=javascript/ script script type=application/javascript $(document).ready(function() { $(.dis_hide).hide(); $(.dis).hide(); $(.dis_show).click(function(){ $(this).hide(); $(this).parents(table).next().show('slow'); $(this).next().show(); }); $(.dis_hide).click(function(){ $(this).hide(); $(this).parents(table).next().hide('slow'); $(this).prev().show(); }); }); /script style type=text/css /style /head body table tr td class=hiliteB-1 height=28 colspan=11 b a href=#Small Cap Core/a sup span id=dis_show_ns class=dis_show show disclosure /span span id=dis_hide_ns class=dis_hide hide disclosure /span /sup /b /td /tr tr td class=hiliteB-1 height=28 colspan=11 a href=# b(Click here for Gross Expense Ratio)/b /a /td /tr tr td class=hiliteA-1 align=right Class A /td td class=hiliteA-1 width=1/ td class=hiliteA-1 nowrap=yes align=center 10.34 /td td class=hiliteA-1 nowrap=yes align=center /td td class=hiliteA-1 nowrap=yes align=center -9.85% /td td width=1/ td class=hiliteA-1 nowrap=yes align=center -16.83% /td td class=hiliteA-1 nowrap=yes align=center 11.73% /td td class=hiliteA-1 nowrap=yes align=center 10.72% /td td width=1/ td class=hiliteA-1 nowrap=yes align=center -21.62% /td td class=hiliteA-1 nowrap=yes align=center 10.41% /td td class=hiliteA-1 nowrap=yes align=center 10.02% /td /tr tr td class=hiliteA-1 align=right Class A /td td class=hiliteA-1 width=1/ td class=hiliteA-1 nowrap=yes align=center 10.34 /td td class=hiliteA-1 nowrap=yes align=center /td td class=hiliteA-1 nowrap=yes align=center -9.85% /td td width=1/ td class=hiliteA-1 nowrap=yes align=center -16.83% /td td class=hiliteA-1 nowrap=yes align=center 11.73% /td td class=hiliteA-1 nowrap=yes align=center 10.72% /td td width=1/ td class=hiliteA-1 nowrap=yes align=center -21.62% /td td class=hiliteA-1 nowrap=yes align=center 10.41% /td td class=hiliteA-1 nowrap=yes align=center 10.02% /td /tr tr td class=hiliteA-1 align=right Class A /td td class=hiliteA-1 width=1/ td class=hiliteA-1 nowrap=yes align=center 10.34 /td td class=hiliteA-1 nowrap=yes align=center /td td class=hiliteA-1 nowrap=yes align=center -9.85% /td td width=1/ td class=hiliteA-1 nowrap=yes align=center -16.83% /td td class=hiliteA-1 nowrap=yes align=center 11.73% /td td class=hiliteA-1 nowrap=yes align=center 10.72% /td td width=1/ td class=hiliteA-1 nowrap=yes align=center -21.62% /td td class=hiliteA-1 nowrap=yes align=center 10.41% /td td class=hiliteA-1 nowrap=yes align=center 10.02% /td /tr tr td class=hiliteA-1 align=right Class A /td td class=hiliteA-1 width=1/ td class=hiliteA-1 nowrap=yes align=center 10.34 /td td class=hiliteA-1 nowrap=yes align=center /td td class=hiliteA-1 nowrap=yes align=center -9.85% /td td width=1/ td class=hiliteA-1 nowrap=yes align=center -16.83% /td td class=hiliteA-1 nowrap=yes align=center 11.73% /td td class=hiliteA-1 nowrap=yes align=center 10.72% /td td width=1/ td class=hiliteA-1 nowrap=yes align=center -21.62% /td td class=hiliteA-1 nowrap=yes align=center 10.41% /td td class=hiliteA-1 nowrap=yes align=center 10.02% /td /tr /table div id=dis_ns class=disTest disclosure. Test disclosure. Test disclosure. Test disclosure. Test disclosure. Test disclosure. Test disclosure. Test disclosure. Test disclosure. Test disclosure. Test disclosure. Test disclosure. Test disclosure. Test disclosure
[jQuery] Why is nothing working in IE6?
Even simple .hide(); does not seem to be working! I have the latest version of jQuery and every piece of my code seems to work perfectly in FF. I spent a day of development getting the jQuery below down to about 10 lines only to find the next day that it doesn't work in IE6. Here's a sample: !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http:// www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd html xmlns=http://www.w3.org/1999/xhtml; head meta http-equiv=Content-Type content=text/html; charset=utf-8 / titleAgg Perf Test/title script src=jquery.js type=text/javascript language=javascript/ script script type=application/javascript $(document).ready(function() { $(.dis_hide).hide(); $(.dis).hide(); $(.dis_show).click(function(){ $(this).hide(); $(this).parents(table).next().show('slow'); $(this).next().show(); }); $(.dis_hide).click(function(){ $(this).hide(); $(this).parents(table).next().hide('slow'); $(this).prev().show(); }); }); /script style type=text/css /style /head body table tr td class=hiliteB-1 height=28 colspan=11 b a href=#Small Cap Core/a sup span id=dis_show_ns class=dis_show show disclosure /span span id=dis_hide_ns class=dis_hide hide disclosure /span /sup /b /td /tr tr td class=hiliteB-1 height=28 colspan=11 a href=# b(Click here for Gross Expense Ratio)/b /a /td /tr tr td class=hiliteA-1 align=right Class A /td td class=hiliteA-1 width=1/ td class=hiliteA-1 nowrap=yes align=center 10.34 /td td class=hiliteA-1 nowrap=yes align=center /td td class=hiliteA-1 nowrap=yes align=center -9.85% /td td width=1/ td class=hiliteA-1 nowrap=yes align=center -16.83% /td td class=hiliteA-1 nowrap=yes align=center 11.73% /td td class=hiliteA-1 nowrap=yes align=center 10.72% /td td width=1/ td class=hiliteA-1 nowrap=yes align=center -21.62% /td td class=hiliteA-1 nowrap=yes align=center 10.41% /td td class=hiliteA-1 nowrap=yes align=center 10.02% /td /tr tr td class=hiliteA-1 align=right Class A /td td class=hiliteA-1 width=1/ td class=hiliteA-1 nowrap=yes align=center 10.34 /td td class=hiliteA-1 nowrap=yes align=center /td td class=hiliteA-1 nowrap=yes align=center -9.85% /td td width=1/ td class=hiliteA-1 nowrap=yes align=center -16.83% /td td class=hiliteA-1 nowrap=yes align=center 11.73% /td td class=hiliteA-1 nowrap=yes align=center 10.72% /td td width=1/ td class=hiliteA-1 nowrap=yes align=center -21.62% /td td class=hiliteA-1 nowrap=yes align=center 10.41% /td td class=hiliteA-1 nowrap=yes align=center 10.02% /td /tr tr td class=hiliteA-1 align=right Class A /td td class=hiliteA-1 width=1/ td class=hiliteA-1 nowrap=yes align=center 10.34 /td td class=hiliteA-1 nowrap=yes align=center /td td class=hiliteA-1 nowrap=yes align=center -9.85% /td td width=1/ td class=hiliteA-1 nowrap=yes align=center -16.83% /td td class=hiliteA-1 nowrap=yes align=center 11.73% /td td class=hiliteA-1 nowrap=yes align=center 10.72% /td td width=1/ td class=hiliteA-1 nowrap=yes align=center -21.62% /td td class=hiliteA-1 nowrap=yes align=center 10.41% /td td class=hiliteA-1 nowrap=yes align=center 10.02% /td /tr tr td class=hiliteA-1 align=right Class A /td td class=hiliteA-1 width=1/ td class=hiliteA-1 nowrap=yes align=center 10.34 /td td class=hiliteA-1 nowrap=yes align=center /td td class=hiliteA-1 nowrap=yes align=center -9.85% /td td width=1/ td class=hiliteA-1 nowrap=yes align=center -16.83% /td td class=hiliteA-1 nowrap=yes align=center 11.73% /td td class=hiliteA-1 nowrap=yes align=center 10.72% /td td width=1/ td class=hiliteA-1 nowrap=yes align=center -21.62% /td td class=hiliteA-1 nowrap=yes align=center 10.41% /td td class=hiliteA-1 nowrap=yes align=center 10.02% /td /tr /table div id=dis_ns class=disTest disclosure. Test disclosure. Test disclosure. Test disclosure. Test disclosure. Test disclosure. Test disclosure. Test disclosure. Test disclosure. Test disclosure. Test disclosure. Test disclosure. Test disclosure. Test disclosure. Test disclosure. Test disclosure. Test disclosure. Test disclosure. Test disclosure. Test disclosure. Test disclosure. Test disclosure. Test disclosure. Test disclosure. Test disclosure. Test disclosure. Test disclosure. Test disclosure. Test disclosure. Test disclosure. Test disclosure. Test disclosure. Test disclosure. Test disclosure. Test disclosure. Test disclosure. Test disclosure. Test disclosure. Test disclosure. Test disclosure. /div table tr td class=hiliteB-1 height=28 colspan=11 b a href=#Foundation Moderate Allocation/a sup span id=dis_show_ng