Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #13471 > unrolled thread
| Started by | JRough <janis.rough@gmail.com> |
|---|---|
| First post | 2012-04-20 11:39 -0700 |
| Last post | 2012-04-21 20:46 +0200 |
| Articles | 20 on this page of 55 — 15 participants |
Back to article view | Back to comp.lang.javascript
jquery ,get the id of the input in order to delete input row? JRough <janis.rough@gmail.com> - 2012-04-20 11:39 -0700
Re: jquery ,get the id of the input in order to delete input row? Denis McMahon <denismfmcmahon@gmail.com> - 2012-04-21 01:23 +0000
Re: jquery ,get the id of the input in order to delete input row? Denis McMahon <denismfmcmahon@gmail.com> - 2012-04-21 02:18 +0000
Re: jquery ,get the id of the input in order to delete input row? Hans-Georg Michna <hans-georgNoEmailPlease@michna.com> - 2012-04-21 07:31 +0200
Re: jquery ,get the id of the input in order to delete input row? "Evertjan." <exjxw.hannivoort@interxnl.net> - 2012-04-21 06:09 +0000
Re: jquery ,get the id of the input in order to delete input row? JRough <janis.rough@gmail.com> - 2012-04-22 09:52 -0700
Re: jquery ,get the id of the input in order to delete input row? "Evertjan." <exjxw.hannivoort@interxnl.net> - 2012-04-23 10:32 +0000
Re: jquery ,get the id of the input in order to delete input row? JRough <janis.rough@gmail.com> - 2012-04-22 12:53 -0700
Re: jquery ,get the id of the input in order to delete input row? JRough <janis.rough@gmail.com> - 2012-04-22 13:03 -0700
Re: jquery ,get the id of the input in order to delete input row? JRough <janis.rough@gmail.com> - 2012-05-04 13:16 -0700
Re: jquery ,get the id of the input in order to delete input row? JRough <janis.rough@gmail.com> - 2012-04-22 09:50 -0700
Re: jquery ,get the id of the input in order to delete input row? Denis McMahon <denismfmcmahon@gmail.com> - 2012-04-23 02:10 +0000
Re: jquery ,get the id of the input in order to delete input row? John G Harris <john@nospam.demon.co.uk> - 2012-04-23 15:10 +0100
Re: jquery ,get the id of the input in order to delete input row? Barry Margolin <barmar@alum.mit.edu> - 2012-04-25 21:39 -0400
Re: jquery ,get the id of the input in order to delete input row? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-04-26 04:35 +0200
Re: jquery ,get the id of the input in order to delete input row? Andrew Poulos <ap_prog@hotmail.com> - 2012-04-26 15:49 +1000
ECMAScript Support Matrix (was: jquery ,get the id of the input in order to delete input row?) Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-04-26 10:01 +0200
Re: ECMAScript Support Matrix Andrew Poulos <ap_prog@hotmail.com> - 2012-04-26 18:41 +1000
Re: ECMAScript Support Matrix Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-04-26 11:06 +0200
Re: ECMAScript Support Matrix Andrew Poulos <ap_prog@hotmail.com> - 2012-04-26 20:41 +1000
Re: jquery ,get the id of the input in order to delete input row? Andrew Poulos <ap_prog@hotmail.com> - 2012-04-26 12:38 +1000
Re: jquery ,get the id of the input in order to delete input row? Jukka Lahtinen <jtfjdehf@hotmail.com.invalid> - 2012-04-26 09:01 +0300
Re: jquery ,get the id of the input in order to delete input row? Andrew Poulos <ap_prog@hotmail.com> - 2012-04-26 16:16 +1000
Re: jquery ,get the id of the input in order to delete input row? Barry Margolin <barmar@alum.mit.edu> - 2012-04-26 06:52 -0400
Re: jquery ,get the id of the input in order to delete input row? John G Harris <john@nospam.demon.co.uk> - 2012-04-26 16:30 +0100
Re: jquery ,get the id of the input in order to delete input row? Barry Margolin <barmar@alum.mit.edu> - 2012-04-26 06:30 -0400
Re: jquery ,get the id of the input in order to delete input row? Andrew Poulos <ap_prog@hotmail.com> - 2012-04-26 20:44 +1000
Re: jquery ,get the id of the input in order to delete input row? Barry Margolin <barmar@alum.mit.edu> - 2012-04-26 08:34 -0400
Re: jquery ,get the id of the input in order to delete input row? John G Harris <john@nospam.demon.co.uk> - 2012-04-26 16:49 +0100
Re: jquery ,get the id of the input in order to delete input row? Gregor Kofler <usenet@gregorkofler.com> - 2012-04-26 18:08 +0200
Re: jquery ,get the id of the input in order to delete input row? Scott Sauyet <scott.sauyet@gmail.com> - 2012-04-27 13:29 -0700
Re: jquery ,get the id of the input in order to delete input row? Gregor Kofler <usenet@gregorkofler.com> - 2012-04-28 00:15 +0200
Re: jquery ,get the id of the input in order to delete input row? Dr J R Stockton <reply1217@merlyn.demon.co.uk.not.invalid> - 2012-04-27 21:41 +0100
Re: jquery ,get the id of the input in order to delete input row? Andrew Poulos <ap_prog@hotmail.com> - 2012-04-27 07:55 +1000
Re: jquery ,get the id of the input in order to delete input row? Matt McDonald <matt@fortybelow.ca> - 2012-04-26 22:23 -0600
Re: jquery ,get the id of the input in order to delete input row? Gregor Kofler <usenet@gregorkofler.com> - 2012-04-27 11:40 +0200
Re: jquery ,get the id of the input in order to delete input row? Andrew Poulos <ap_prog@hotmail.com> - 2012-04-27 20:05 +1000
Re: jquery ,get the id of the input in order to delete input row? "S.T." <anon@anon.com> - 2012-04-27 14:32 -0700
Re: jquery ,get the id of the input in order to delete input row? Andrew Poulos <ap_prog@hotmail.com> - 2012-04-28 16:03 +1000
Re: jquery ,get the id of the input in order to delete input row? David Mark <dmark.cinsoft@gmail.com> - 2012-07-05 19:52 -0700
Re: jquery ,get the id of the input in order to delete input row? David Mark <dmark.cinsoft@gmail.com> - 2012-07-06 00:53 -0700
Re: jquery ,get the id of the input in order to delete input row? "S.T." <anon@anon.com> - 2012-07-10 13:53 -0700
Re: jquery ,get the id of the input in order to delete input row? Matt McDonald <matt@fortybelow.ca> - 2012-07-10 18:32 -0600
Re: jquery ,get the id of the input in order to delete input row? "S.T." <anon@anon.com> - 2012-07-11 10:51 -0700
Re: jquery ,get the id of the input in order to delete input row? Gregor Kofler <usenet@gregorkofler.com> - 2012-04-28 17:41 +0200
Re: jquery ,get the id of the input in order to delete input row? "S.T." <anon@anon.com> - 2012-04-28 13:15 -0700
Re: jquery ,get the id of the input in order to delete input row? Gregor Kofler <usenet@gregorkofler.com> - 2012-04-28 22:45 +0200
Re: jquery ,get the id of the input in order to delete input row? Denis McMahon <denismfmcmahon@gmail.com> - 2012-04-21 14:28 +0000
Re: jquery ,get the id of the input in order to delete input row? JRough <janis.rough@gmail.com> - 2012-04-29 15:02 -0700
Re: jquery ,get the id of the input in order to delete input row? JRough <janis.rough@gmail.com> - 2012-04-22 12:34 -0700
Re: jquery ,get the id of the input in order to delete input row? Matt McDonald <matt@fortybelow.ca> - 2012-04-21 11:02 -0600
Re: jquery ,get the id of the input in order to delete input row? Denis McMahon <denismfmcmahon@gmail.com> - 2012-04-21 17:12 +0000
Re: jquery ,get the id of the input in order to delete input row? Matt McDonald <matt@fortybelow.ca> - 2012-04-21 11:37 -0600
Re: jquery ,get the id of the input in order to delete input row? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-04-21 20:59 +0200
Re: jquery ,get the id of the input in order to delete input row? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-04-21 20:46 +0200
Page 1 of 3 [1] 2 3 Next page →
| From | JRough <janis.rough@gmail.com> |
|---|---|
| Date | 2012-04-20 11:39 -0700 |
| Subject | jquery ,get the id of the input in order to delete input row? |
| Message-ID | <94ebf0a1-856f-4357-b689-2622f641bb10@h10g2000pbi.googlegroups.com> |
Below is the delete function, but I don't know how to capture the
input id. I am not using an html table for the data. The todo items
are added dynamically through AJAX. How to select which id has the
button delete clicked and remove that row ? The html is in a section
and is an unordered list with a checkbox on left side, the user input,
and the delete button on the right. I want to delete the row when
delete button is clicked. See the HTML below. I also have a demo on
my test site. ANy help would be appreciated. I could add a table and
rows as that could help identify the row but it seems unnecessary. Is
there a way to add an id to the row that was clicked with the click
event dynamically and then use the POST to remove that id? Or do I
need a counter function to add an id to each row. How would I do that
between sesions?
DEMO: http://janisrough.dyndns.biz/todo4.html
ALso, I don't have the data stored in a database, so you only get the
current row but I want it to work for when I get the database working.
$(function() {
$(".btnDelete").click(function() {
// get the id here
var $id =this.id;
// POST...
return false;
});
});
<section class="main"> 
<input id="toggle-all" type="checkbox">
<label for="toggle-all">Mark all as complete</label>
<input type="checkbox" id="task" /> User Input to do item <input
type="button" value="Delete" id="btnDelete />
</section>
[toc] | [next] | [standalone]
| From | Denis McMahon <denismfmcmahon@gmail.com> |
|---|---|
| Date | 2012-04-21 01:23 +0000 |
| Message-ID | <4f920bff$0$3000$a8266bb1@newsreader.readnews.com> |
| In reply to | #13471 |
On Fri, 20 Apr 2012 11:39:19 -0700, JRough wrote:
> ... How to select which id has the button
> delete clicked and remove that row ?
Assuming you add a delete button on each row, you could assign the
button's onclick to be something like "deleteRow(this)", and then in
deleteRow(button) find the row that contains the specified button and
delete that row.
Presumably your "rows" are defined by a collection of "row" elements
inside some "container" element? Either as table rows within a table, or
paragraphs within a div, or elements within a list etc. Presumably you
can give the container an id, and each row is encapsulated in an element
of the same type, so you can do something like:
function deleteRow(button){
var row,rows,rownum,elems,elnum,loop;
rows=document.getElementById(containerId).getElementsByTagName(rowTag);
rownum=rows.length;
loop=true;
while(rownum--){
row=rows.item(rownum);
elems=row.getElementsByTagName("*");
elnum=elems.length;
while(elnum--){
if(elems.item(elnum)==button){
loop=false;
break;
}
}
if(!loop)break;
}
// "row" is the dom element of the row you wish to delete
// "elems" is elements within row
}
Note - untested code intended to demonstrate the concept, not intended
for deployment. Use at your own risk. User accepts all responsibility for
debugging any typos, logic errors, or just plain dumb mistakes.
Rgds
Denis McMahon
[toc] | [prev] | [next] | [standalone]
| From | Denis McMahon <denismfmcmahon@gmail.com> |
|---|---|
| Date | 2012-04-21 02:18 +0000 |
| Message-ID | <4f9218ff$0$2941$a8266bb1@newsreader.readnews.com> |
| In reply to | #13473 |
On Sat, 21 Apr 2012 01:23:12 +0000, Denis McMahon wrote: > On Fri, 20 Apr 2012 11:39:19 -0700, JRough wrote: >> ... How to select which id has the button delete clicked and remove >> that row ? > Assuming you add a delete button on each row ... I just noticed, you said jquery. I have no idea whatsoever how to do this in jquery, this isn't a jquery forum, I think most people here avoid jquery like the plague. You probably need to find a jquery forum to ask in. Rgds Denis McMahon
[toc] | [prev] | [next] | [standalone]
| From | Hans-Georg Michna <hans-georgNoEmailPlease@michna.com> |
|---|---|
| Date | 2012-04-21 07:31 +0200 |
| Message-ID | <a6h4p71la4q8ga05u93lg9brnavpavbum7@4ax.com> |
| In reply to | #13474 |
On 21 Apr 2012 02:18:39 GMT, Denis McMahon wrote: >On Sat, 21 Apr 2012 01:23:12 +0000, Denis McMahon wrote: >> On Fri, 20 Apr 2012 11:39:19 -0700, JRough wrote: >>> ... How to select which id has the button delete clicked and remove >>> that row ? >> Assuming you add a delete button on each row ... >I just noticed, you said jquery. > >I have no idea whatsoever how to do this in jquery, this isn't a jquery >forum, I think most people here avoid jquery like the plague. > >You probably need to find a jquery forum to ask in. Fortunately the code works whether jQuery is used in other functions on the page or not. You just don't need jQuery for this. (Some people would say you don't need jQuery for anything. :-) Hans-Georg
[toc] | [prev] | [next] | [standalone]
| From | "Evertjan." <exjxw.hannivoort@interxnl.net> |
|---|---|
| Date | 2012-04-21 06:09 +0000 |
| Message-ID | <XnsA03C5304F104Aeejj99@194.109.133.133> |
| In reply to | #13475 |
Denis McMahon wrote on 21 apr 2012 in comp.lang.javascript:
> I just noticed, you said jquery.
>
> I have no idea whatsoever how to do this in jquery, this isn't a jquery
> forum, I think most people here avoid jquery like the plague.
Hans-Georg Michna wrote on 21 apr 2012 in comp.lang.javascript:
> Fortunately the code works whether jQuery is used in other
> functions on the page or not. You just don't need jQuery for
> this. (Some people would say you don't need jQuery for
> anything. :-)
Parsing error, unmatched "(".
jquery has, like the plague had, some merit,
it keeps the idiots of the back of serious javascript programmers,
who see the importance of writing understandable script,
by such being debuggable,
less susceptable to external "update"-errors
and a thing of beauty.
On the other hand, the plague didn't select on preference, only decimated,
and who are we to judge over others like the nazis did about racial purity?
;-(
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
[toc] | [prev] | [next] | [standalone]
| From | JRough <janis.rough@gmail.com> |
|---|---|
| Date | 2012-04-22 09:52 -0700 |
| Message-ID | <ad41a69d-1cf0-4835-ad9f-05a157f349be@z17g2000yqf.googlegroups.com> |
| In reply to | #13476 |
On Apr 20, 11:09 pm, "Evertjan." <exjxw.hannivo...@interxnl.net>
wrote:
> Denis McMahon wrote on 21 apr 2012 in comp.lang.javascript:
>
> > I just noticed, you said jquery.
>
> > I have no idea whatsoever how to do this in jquery, this isn't a jquery
> > forum, I think most people here avoid jquery like the plague.
>
> Hans-Georg Michna wrote on 21 apr 2012 in comp.lang.javascript:
>
> > Fortunately the code works whether jQuery is used in other
> > functions on the page or not. You just don't need jQuery for
> > this. (Some people would say you don't need jQuery for
> > anything. :-)
>
> Parsing error, unmatched "(".
>
> jquery has, like the plague had, some merit,
> it keeps the idiots of the back of serious javascript programmers,
> who see the importance of writing understandable script,
> by such being debuggable,
> less susceptable to external "update"-errors
> and a thing of beauty.
>
> On the other hand, the plague didn't select on preference, only decimated,
> and who are we to judge over others like the nazis did about racial purity?
>
> ;-(
>
> --
> Evertjan.
> The Netherlands.
> (Please change the x'es to dots in my emailaddress)
Evertjan, I'm not sure I understand where you are going but I guess
you don't like Jquery either :-) I'm hoping to get the reasons why?
[toc] | [prev] | [next] | [standalone]
| From | "Evertjan." <exjxw.hannivoort@interxnl.net> |
|---|---|
| Date | 2012-04-23 10:32 +0000 |
| Message-ID | <XnsA03E7F83C77FCeejj99@194.109.133.133> |
| In reply to | #13529 |
JRough wrote on 22 apr 2012 in comp.lang.javascript:
> On Apr 20, 11:09 pm, "Evertjan." <exjxw.hannivo...@interxnl.net>
> wrote:
>> Denis McMahon wrote on 21 apr 2012 in comp.lang.javascript:
>>
>> > I just noticed, you said jquery.
>>
>> > I have no idea whatsoever how to do this in jquery, this isn't a
>> > jquery forum, I think most people here avoid jquery like the
>> > plague.
>>
>> Hans-Georg Michna wrote on 21 apr 2012 in comp.lang.javascript:
>>
>> > Fortunately the code works whether jQuery is used in other
>> > functions on the page or not. You just don't need jQuery for
>> > this. (Some people would say you don't need jQuery for
>> > anything. :-)
>>
>> Parsing error, unmatched "(".
>>
>> jquery has, like the plague had, some merit,
>> it keeps the idiots of the back of serious javascript programmers,
>> who see the importance of writing understandable script,
>> by such being debuggable,
>> less susceptable to external "update"-errors
>> and a thing of beauty.
>>
>> On the other hand, the plague didn't select on preference, only
>> decimated
> ,
>> and who are we to judge over others like the nazis did about racial
>> purit
> y?
>>
>> ;-(
[please do not quote signatures on usenet]
>
> Evertjan, I'm not sure I understand where you are going but I guess
> you don't like Jquery either :-)
It is not about liking for me, but about writing clean, beautifull,
working, crossbrowser safe, not updated by external forces, easily
debuggable code.
> I'm hoping to get the reasons why?
Get as in understand or get as in receive?
Can't give you those latter ones, because it is not about not liking, but
about advizing you not to use it.
As for the former ones, read this NG's faq and archive.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
[toc] | [prev] | [next] | [standalone]
| From | JRough <janis.rough@gmail.com> |
|---|---|
| Date | 2012-04-22 12:53 -0700 |
| Message-ID | <255a3b45-348d-42eb-8e3c-f8b96a5d0f42@h9g2000yqe.googlegroups.com> |
| In reply to | #13476 |
On Apr 20, 11:09 pm, "Evertjan." <exjxw.hannivo...@interxnl.net>
wrote:
> Denis McMahon wrote on 21 apr 2012 in comp.lang.javascript:
>
> > I just noticed, you said jquery.
>
> > I have no idea whatsoever how to do this in jquery, this isn't a jquery
> > forum, I think most people here avoid jquery like the plague.
>
> Hans-Georg Michna wrote on 21 apr 2012 in comp.lang.javascript:
>
> > Fortunately the code works whether jQuery is used in other
> > functions on the page or not. You just don't need jQuery for
> > this. (Some people would say you don't need jQuery for
> > anything. :-)
>
> Parsing error, unmatched "(".
>
> jquery has, like the plague had, some merit,
> it keeps the idiots of the back of serious javascript programmers,
> who see the importance of writing understandable script,
> by such being debuggable,
> less susceptable to external "update"-errors
> and a thing of beauty.
>
> On the other hand, the plague didn't select on preference, only decimated,
> and who are we to judge over others like the nazis did about racial purity?
>
> ;-(
>
> --
> Evertjan.
> The Netherlands.
> (Please change the x'es to dots in my emailaddress)
So I guess your main complaint is it is difficult to understand with
all the closing ))}'s
I agree with that but the principle is to have anonymous functions
inside functions so that the outer function has access to the returned
value of the inner function so as to not polute the global scope and
as a way to build objects so that you can use protypical inheritance.
Now if you can do that without JQuery and you do not need Jquery for
cross browser compatibility then I guess you do not need Jquery.
[toc] | [prev] | [next] | [standalone]
| From | JRough <janis.rough@gmail.com> |
|---|---|
| Date | 2012-04-22 13:03 -0700 |
| Message-ID | <7ecf3609-5a0c-444d-aca0-51574b10b80c@r9g2000yqd.googlegroups.com> |
| In reply to | #13476 |
On Apr 20, 11:09 pm, "Evertjan." <exjxw.hannivo...@interxnl.net>
wrote:
> Denis McMahon wrote on 21 apr 2012 in comp.lang.javascript:
>
> > I just noticed, you said jquery.
>
> > I have no idea whatsoever how to do this in jquery, this isn't a jquery
> > forum, I think most people here avoid jquery like the plague.
>
> Hans-Georg Michna wrote on 21 apr 2012 in comp.lang.javascript:
>
> > Fortunately the code works whether jQuery is used in other
> > functions on the page or not. You just don't need jQuery for
> > this. (Some people would say you don't need jQuery for
> > anything. :-)
>
> Parsing error, unmatched "(".
>
> jquery has, like the plague had, some merit,
> it keeps the idiots of the back of serious javascript programmers,
> who see the importance of writing understandable script,
> by such being debuggable,
> less susceptable to external "update"-errors
> and a thing of beauty.
>
> On the other hand, the plague didn't select on preference, only decimated,
> and who are we to judge over others like the nazis did about racial purity?
>
> ;-(
>
> --
> Evertjan.
> The Netherlands.
> (Please change the x'es to dots in my emailaddress)
Are you saying that Jquery is difficult to debug? Firebug does not
work for Jquery?
[toc] | [prev] | [next] | [standalone]
| From | JRough <janis.rough@gmail.com> |
|---|---|
| Date | 2012-05-04 13:16 -0700 |
| Message-ID | <63f49c82-9edb-4169-a7ba-c378cfcbfab6@qg3g2000pbc.googlegroups.com> |
| In reply to | #13476 |
On Apr 20, 11:09 pm, "Evertjan." <exjxw.hannivo...@interxnl.net>
wrote:
> Denis McMahon wrote on 21 apr 2012 in comp.lang.javascript:
>
> > I just noticed, you said jquery.
>
> > I have no idea whatsoever how to do this in jquery, this isn't a jquery
> > forum, I think most people here avoid jquery like the plague.
>
> Hans-Georg Michna wrote on 21 apr 2012 in comp.lang.javascript:
>
> > Fortunately the code works whether jQuery is used in other
> > functions on the page or not. You just don't need jQuery for
> > this. (Some people would say you don't need jQuery for
> > anything. :-)
>
> Parsing error, unmatched "(".
>
> jquery has, like the plague had, some merit,
> it keeps the idiots of the back of serious javascript programmers,
> who see the importance of writing understandable script,
> by such being debuggable,
> less susceptable to external "update"-errors
> and a thing of beauty.
>
> On the other hand, the plague didn't select on preference, only decimated,
> and who are we to judge over others like the nazis did about racial purity?
>
> ;-(
>
> --
> Evertjan.
> The Netherlands.
> (Please change the x'es to dots in my emailaddress)
E...
I was reading on this link of design models why having a rich set of
controls is important.
Maybe the answer to this questions depends on who you are talking to.
http://msdn.microsoft.com/en-us/magazine/cc507641.aspx
J....
[toc] | [prev] | [next] | [standalone]
| From | JRough <janis.rough@gmail.com> |
|---|---|
| Date | 2012-04-22 09:50 -0700 |
| Message-ID | <77566623-f748-454a-860f-190b37123467@m13g2000yqc.googlegroups.com> |
| In reply to | #13474 |
On Apr 20, 7:18 pm, Denis McMahon <denismfmcma...@gmail.com> wrote: > On Sat, 21 Apr 2012 01:23:12 +0000, Denis McMahon wrote: > > On Fri, 20 Apr 2012 11:39:19 -0700, JRough wrote: > >> ... How to select which id has the button delete clicked and remove > >> that row ? > > Assuming you add a delete button on each row ... > > I just noticed, you said jquery. > > I have no idea whatsoever how to do this in jquery, this isn't a jquery > forum, I think most people here avoid jquery like the plague. > > You probably need to find a jquery forum to ask in. > > Rgds > > Denis McMahon Hello Denis, I appreciate your feedback. Could you tell me why they avoid it? I thought it was great at solving cross browser issues. I personally like the controls. For example, the calendar plug-in you can't do that in Javascript as easily. How about Jquery AJAX? How does the Javascript AJAX object compare to the JQuery AJAX? thanks,
[toc] | [prev] | [next] | [standalone]
| From | Denis McMahon <denismfmcmahon@gmail.com> |
|---|---|
| Date | 2012-04-23 02:10 +0000 |
| Message-ID | <4f94ba22$0$2969$a8266bb1@newsreader.readnews.com> |
| In reply to | #13528 |
On Sun, 22 Apr 2012 09:50:11 -0700, JRough wrote: > Hello Denis, I appreciate your feedback. Could you tell me why they > avoid it? Nope, I have no idea why they avoid it. I know why I avoid it. I can usually code the js I need to do what want on a web page in much less space then the jquery code uses, and if I were to use jquery, I would still have to write my own code on top of it. In addition, when my code doesn't work, it's pretty easy for me to fix. If I was using jquery and something didn't work, I'd have to trawl through all the jquery code as well as my own code to find the problem. As for cross-browser compatibility, I've never found it hard to make my code work across a wide selection of browsers and platforms, so that I don't need to use jquery for cross browser compatibility. Rgds Denis McMahon
[toc] | [prev] | [next] | [standalone]
| From | John G Harris <john@nospam.demon.co.uk> |
|---|---|
| Date | 2012-04-23 15:10 +0100 |
| Message-ID | <ToCpCjFuLWlPFwus@J.A830F0FF37FB96852AD08924D9443D28E23ED5CD> |
| In reply to | #13528 |
On Sun, 22 Apr 2012 at 09:50:11, in comp.lang.javascript, JRough wrote: >On Apr 20, 7:18 pm, Denis McMahon <denismfmcma...@gmail.com> wrote: <snip> >> I have no idea whatsoever how to do this in jquery, this isn't a jquery >> forum, I think most people here avoid jquery like the plague. >> >> You probably need to find a jquery forum to ask in. >> >> Rgds >> >> Denis McMahon > >Hello Denis, I appreciate your feedback. Could you tell me why they >avoid it? >I thought it was great at solving cross browser issues. I personally >like the controls. >For example, the calendar plug-in you can't do that in Javascript as >easily. How about Jquery AJAX? How does the Javascript AJAX object >compare to the JQuery AJAX? Try asking the customers, e.g me : a) The web page takes far too long to arrive and display fully. b) If the web page hasn't been updated to the latest JQuery and so it doesn't support your browser yet then some things don't work. E.g Adding an item to the shopping basket. Customers then zoom off to a web site that does work. Remember to update JQuery every 6 months or so, on *every* page, and re-test the entire, possibly enormous, web site. Yikes! John -- John Harris
[toc] | [prev] | [next] | [standalone]
| From | Barry Margolin <barmar@alum.mit.edu> |
|---|---|
| Date | 2012-04-25 21:39 -0400 |
| Message-ID | <barmar-998202.21390625042012@news.eternal-september.org> |
| In reply to | #13548 |
In article <ToCpCjFuLWlPFwus@J.A830F0FF37FB96852AD08924D9443D28E23ED5CD>, John G Harris <john@nospam.demon.co.uk> wrote: > On Sun, 22 Apr 2012 at 09:50:11, in comp.lang.javascript, JRough wrote: > >On Apr 20, 7:18 pm, Denis McMahon <denismfmcma...@gmail.com> wrote: > > <snip> > >> I have no idea whatsoever how to do this in jquery, this isn't a jquery > >> forum, I think most people here avoid jquery like the plague. > >> > >> You probably need to find a jquery forum to ask in. > >> > >> Rgds > >> > >> Denis McMahon > > > >Hello Denis, I appreciate your feedback. Could you tell me why they > >avoid it? > >I thought it was great at solving cross browser issues. I personally > >like the controls. > >For example, the calendar plug-in you can't do that in Javascript as > >easily. How about Jquery AJAX? How does the Javascript AJAX object > >compare to the JQuery AJAX? > > Try asking the customers, e.g me : > a) The web page takes far too long to arrive and display fully. Isn't it likely that the browser will have the JQuery file cached? There might be an extra delay for the first request (although if you point to the CDN, they might already have it cached from some other site that also uses the CDN), but from then on it should be reasonably fast. > b) If the web page hasn't been updated to the latest JQuery and so it > doesn't support your browser yet then some things don't work. E.g Adding > an item to the shopping basket. And if you write your own Javascript, it won't ever have compatibility problems with a new browser? And in the case of old browsers, don't you have to duplicate all the checks that JQuery hides from you? Or are they overstating the severity of the problem, to sell people on their code? Since they're not making anything off it, why would they need to hype it with overblown claims? > > Customers then zoom off to a web site that does work. > > Remember to update JQuery every 6 months or so, on *every* page, and > re-test the entire, possibly enormous, web site. Yikes! Some of the arguments I've seen remind me of the arguments that were made many decades ago against high level languages in general: they were slower, they couldn't do as much as assembler. Someone else mentioned that it makes debugging harder, since there's all that code that you didn't write yourself -- isn't that an argument against third-party libraries in general? Is it really best to reinvent the wheel all the time? -- Barry Margolin, barmar@alum.mit.edu Arlington, MA *** PLEASE post questions in newsgroups, not directly to me ***
[toc] | [prev] | [next] | [standalone]
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Date | 2012-04-26 04:35 +0200 |
| Message-ID | <1548827.sJ1GNWL1GP@PointedEars.de> |
| In reply to | #13590 |
Barry Margolin wrote: > In article > <ToCpCjFuLWlPFwus@J.A830F0FF37FB96852AD08924D9443D28E23ED5CD>, > John G Harris <john@nospam.demon.co.uk> wrote: It is called attribution _line_, not attribution novel. And please trim your quotes to the relevant minimum. <http://www.netmeister.org/news/learn2quote.html> <http://jibbering.com/faq/notes/posting/#ps1Post> >> Try asking the customers, e.g me : >> a) The web page takes far too long to arrive and display fully. > > Isn't it likely that the browser will have the JQuery file cached? Yes, it isn't, for there is not "*the* JQuery file". > There might be an extra delay for the first request (although if you point > to the CDN, they might already have it cached from some other site that > also uses the CDN), but from then on it should be reasonably fast. Usually jQuery is used in a custom minimized package along with so-called jQuery "plugins" (e. g. [1]). Not only do the jQuery versions in such a package differ from another, the sets of minimized "plugins" and versions thereof differ as well. This is not a jQuery-only issue. Script authors need to be aware that fewer HTTP requests for faster loading come at the price of reduced cacheability. >> b) If the web page hasn't been updated to the latest JQuery and so it >> doesn't support your browser yet then some things don't work. E.g Adding >> an item to the shopping basket. > > And if you write your own Javascript, it won't ever have compatibility > problems with a new browser? There is no "Javascript" [2], and if you write your scripts with compatibility in mind (i. e., you consider the APIs available at the time and use runtime feature tests to detect them before you use them), you will probably not have any compatibility problems with a new browser as vendors are very intent on keeping their new browser versions backwards-compatible. However, you may want to augment your tree of feature tests with another branch for a new API that the new browser version has to offer (giving it precedence if it offers a significant advantage over the other branches, such as standards compliance), and you may want to cut old branches. BTDT. > And in the case of old browsers, don't you have to duplicate all the > checks that JQuery hides from you? The few checks for "old browsers" that jQuery hides, if any (see Resig's ridiculous compatibility matrix that he calls "cross-browser"), have to be implemented as much as backwards-compatibility is required for one's use- case (and not as John Resig claims to know it is), and can be implemented in a more efficient way then. > Or are they overstating the severity of the problem, to sell people on > their code? Yes. > Since they're not making anything off it, "They" do. A few more bad books are on the market already, and "they" do not hide that fact (see jquery.com at the bottom). It is "docware" (an interesting term I have read on Usenet recently). > why would they need to hype it with overblown claims? It is a cult of ignorance. Cult leaders want attention and dependence from their followers; the illusion of power and control to the disadvantage of many. As with most successful cults, it is so clever a scheme that most people are not able or willing to recognize it – until it is too late. Insofar the concept does work for some time. > […] Someone else mentioned that it makes debugging harder, since there's > all that code that you didn't write yourself -- isn't that an argument > against third-party libraries in general? No, but judging from the overall code quality and reasoning for it coming from their authors, the majority of third-party libraries published on the Web was written by wannabes, jQuery included. > Is it really best to reinvent the wheel all the time? If it *rolls*, by comparison, and if you can know *why* that is, then you better do that. Once. We have been over this here ad nauseam. Please research before you post. PointedEars ___________ [1] <http://jqueryui.com/download> [2] <http://PointedEars.de/es-matrix> -- Sometimes, what you learn is wrong. If those wrong ideas are close to the root of the knowledge tree you build on a particular subject, pruning the bad branches can sometimes cause the whole tree to collapse. -- Mike Duffy in cljs, <news:Xns9FB6521286DB8invalidcom@94.75.214.39>
[toc] | [prev] | [next] | [standalone]
| From | Andrew Poulos <ap_prog@hotmail.com> |
|---|---|
| Date | 2012-04-26 15:49 +1000 |
| Message-ID | <yoednZwOU9BsfAXSnZ2dnUVZ_u6dnZ2d@westnet.com.au> |
| In reply to | #13591 |
On 26/04/2012 12:35 PM, Thomas 'PointedEars' Lahn wrote: > [2]<http://PointedEars.de/es-matrix> In IE 9 on Vista 32bit I get Line 451 Error: 'test' is undefined es-matrix, line 451 character 3 then again at lines 506, 526, 546, 567, 587, 619, 639, 659... Andrew Poulos
[toc] | [prev] | [next] | [standalone]
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Date | 2012-04-26 10:01 +0200 |
| Subject | ECMAScript Support Matrix (was: jquery ,get the id of the input in order to delete input row?) |
| Message-ID | <1400410.AFRqVoOGUt@PointedEars.de> |
| In reply to | #13593 |
Andrew Poulos wrote:
> On 26/04/2012 12:35 PM, Thomas 'PointedEars' Lahn wrote:
>> [2]<http://PointedEars.de/es-matrix>
>
> In IE 9 on Vista 32bit I get
>
> Line 451
> Error: 'test' is undefined
> es-matrix, line 451 character 3
>
> then again at lines 506, 526, 546, 567, 587, 619, 639, 659...
Thank you.
Sorry to all who tried using the Matrix during the past months. That bug
was a side-effect of the upcoming major update (which is being developed in
a different location) that affected all UAs. In debug.js I had moved the
global test() into the new jsx.debug namespace, and in object.js I removed
_global in favor of jsx.global (which I am considering to revert since I
have found ActionScript 3.0 to have _global), but I forgot to update the
imports in the current (old) index file.
FIXED. Please notify me of any further issues. TIA.
Regards,
PointedEars
--
var bugRiddenCrashPronePieceOfJunk = (
navigator.userAgent.indexOf('MSIE 5') != -1
&& navigator.userAgent.indexOf('Mac') != -1
) // Plone, register_function.js:16
[toc] | [prev] | [next] | [standalone]
| From | Andrew Poulos <ap_prog@hotmail.com> |
|---|---|
| Date | 2012-04-26 18:41 +1000 |
| Subject | Re: ECMAScript Support Matrix |
| Message-ID | <7MidnZJDa5bflwTSnZ2dnUVZ_vudnZ2d@westnet.com.au> |
| In reply to | #13597 |
On 26/04/2012 6:01 PM, Thomas 'PointedEars' Lahn wrote: > Andrew Poulos wrote: > >> On 26/04/2012 12:35 PM, Thomas 'PointedEars' Lahn wrote: >>> [2]<http://PointedEars.de/es-matrix> >> >> In IE 9 on Vista 32bit I get >> >> Line 451 >> Error: 'test' is undefined >> es-matrix, line 451 character 3 >> >> then again at lines 506, 526, 546, 567, 587, 619, 639, 659... > > Thank you. > > Sorry to all who tried using the Matrix during the past months. That bug > was a side-effect of the upcoming major update (which is being developed in > a different location) that affected all UAs. In debug.js I had moved the > global test() into the new jsx.debug namespace, and in object.js I removed > _global in favor of jsx.global (which I am considering to revert since I > have found ActionScript 3.0 to have _global), but I forgot to update the > imports in the current (old) index file. > > FIXED. Please notify me of any further issues. TIA. My HTML validator in Firefox 12 says: line 449 column 61 - Warning: <a> cannot copy name attribute to id line 759 column 48 - Warning: <a> escaping malformed URI reference line 4604 column 47 - Warning: <a> attribute "href" lacks value Andrew Poulos
[toc] | [prev] | [next] | [standalone]
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Date | 2012-04-26 11:06 +0200 |
| Subject | Re: ECMAScript Support Matrix |
| Message-ID | <6187530.WV9SEqChMi@PointedEars.de> |
| In reply to | #13598 |
Andrew Poulos wrote:
> On 26/04/2012 6:01 PM, Thomas 'PointedEars' Lahn wrote:
>> Andrew Poulos wrote:
>>> On 26/04/2012 12:35 PM, Thomas 'PointedEars' Lahn wrote:
>>>> [2]<http://PointedEars.de/es-matrix>
>>>
>>> In IE 9 on Vista 32bit I get
>>>
>>> Line 451
>>> Error: 'test' is undefined
>>> es-matrix, line 451 character 3
>>>
>>> then again at lines 506, 526, 546, 567, 587, 619, 639, 659...
>>
>> Thank you.
>>
>> Sorry to all who tried using the Matrix during the past months. That bug
>> was a side-effect of the upcoming major update (which is being developed
>> in
>> a different location) that affected all UAs. In debug.js I had moved the
>> global test() into the new jsx.debug namespace, and in object.js I
>> removed _global in favor of jsx.global (which I am considering to revert
>> since I have found ActionScript 3.0 to have _global), but I forgot to
>> update the imports in the current (old) index file.
>>
>> FIXED. Please notify me of any further issues. TIA.
^^^^^^
(Sigh. [psf 10.1] I really should have written _bugs_ instead.)
> My HTML validator in Firefox 12 says:
>
> line 449 column 61 - Warning: <a> cannot copy name attribute to id
> line 759 column 48 - Warning: <a> escaping malformed URI reference
> line 4604 column 47 - Warning: <a> attribute "href" lacks value
ISTM your validator has bugs, too :) Please double-check those warnings
against the pertinent Specification.
The W3C Markup Validator only finds the following to be wrong:
| Line 5613, Column 34: "NOWRAP" is not a member of a group specified for
| any attribute <td class="blue" nowrap>4.0 – 4.05</td>
|
| Line 5627, Column 34: "NOWRAP" is not a member of a group specified for
| any attribute <td class="blue" nowrap>4.0 – 4.1</td>
Which is a correct assessment; the `nowrap' attribute is not allowed in HTML
4.01 _Strict_ as it is deprecated in favor of style sheets. [1] That will
be fixed in the next revision of the Matrix.
PointedEars
___________
[1] <http://www.w3.org/TR/html4/struct/tables.html#h-11.2.6>
--
realism: HTML 4.01 Strict
evangelism: XHTML 1.0 Strict
madness: XHTML 1.1 as application/xhtml+xml
-- Bjoern Hoehrmann
[toc] | [prev] | [next] | [standalone]
| From | Andrew Poulos <ap_prog@hotmail.com> |
|---|---|
| Date | 2012-04-26 20:41 +1000 |
| Subject | Re: ECMAScript Support Matrix |
| Message-ID | <gL2dnbG0FN3QuwTSnZ2dnUVZ_gqdnZ2d@westnet.com.au> |
| In reply to | #13599 |
On 26/04/2012 7:06 PM, Thomas 'PointedEars' Lahn wrote: > Andrew Poulos wrote: > >> On 26/04/2012 6:01 PM, Thomas 'PointedEars' Lahn wrote: >>> Andrew Poulos wrote: >>>> On 26/04/2012 12:35 PM, Thomas 'PointedEars' Lahn wrote: >>>>> [2]<http://PointedEars.de/es-matrix> >>>> >>>> In IE 9 on Vista 32bit I get >>>> >>>> Line 451 >>>> Error: 'test' is undefined >>>> es-matrix, line 451 character 3 >>>> >>>> then again at lines 506, 526, 546, 567, 587, 619, 639, 659... >>> >>> Thank you. >>> >>> Sorry to all who tried using the Matrix during the past months. That bug >>> was a side-effect of the upcoming major update (which is being developed >>> in >>> a different location) that affected all UAs. In debug.js I had moved the >>> global test() into the new jsx.debug namespace, and in object.js I >>> removed _global in favor of jsx.global (which I am considering to revert >>> since I have found ActionScript 3.0 to have _global), but I forgot to >>> update the imports in the current (old) index file. >>> >>> FIXED. Please notify me of any further issues. TIA. > ^^^^^^ > (Sigh. [psf 10.1] I really should have written _bugs_ instead.) > >> My HTML validator in Firefox 12 says: >> >> line 449 column 61 - Warning:<a> cannot copy name attribute to id >> line 759 column 48 - Warning:<a> escaping malformed URI reference >> line 4604 column 47 - Warning:<a> attribute "href" lacks value > > ISTM your validator has bugs, too :) Please double-check those warnings > against the pertinent Specification. > > The W3C Markup Validator only finds the following to be wrong: > > | Line 5613, Column 34: "NOWRAP" is not a member of a group specified for > | any attribute<td class="blue" nowrap>4.0– 4.05</td> > | > | Line 5627, Column 34: "NOWRAP" is not a member of a group specified for > | any attribute<td class="blue" nowrap>4.0– 4.1</td> > > Which is a correct assessment; the `nowrap' attribute is not allowed in HTML > 4.01 _Strict_ as it is deprecated in favor of style sheets. [1] That will > be fixed in the next revision of the Matrix. Yep, you're right. I'm using HTML Tidy 0.9.5.1 when I went to the SGML Parser it only found the two you found. Andrew Poulos
[toc] | [prev] | [next] | [standalone]
Page 1 of 3 [1] 2 3 Next page →
Back to top | Article view | comp.lang.javascript
csiph-web