Hello, I am using Prototype.js to implement Ajax. My JS code is --> function getHTML(num) { var saf = 0 ; var num; if(!num) { num = document.getElementById(''refid'').value; } else { num = num; } var url = ''/cgi-bin/tps/search.cgi''; var pars = ''num=''+num+''&showallfiles=''+saf +''&act=showattachedfilesection''; var myAjax = new Ajax.Updater( {success: ''placeholder''}, url, {method: ''get'', parameters: pars, onFailure: reportError }); } The above code works fine in Firefox but not in IE. Please tell me what to do ? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Hey Pankaj, Pankaj a écrit :> function getHTML(num) { > var num; > if(!num) { > num = document.getElementById(''refid'').value; > } else { > num = num; > }OK, so you hide your argument with a local variable... Nice. I bet this whole beginning of code would better of like this: num = num || $F(''refid''); ''Looks more Prototypish, too.> var pars = ''num=''+num+''&showallfiles=''+saf > +''&act=showattachedfilesection'';This sounds okay, although as a matter of taste I prefer to let Prototype encode this thing and describe parameters as an object-as-hash: var pars = { num: num, showallfiles: saf, act: ''showattachedfilesection'' };> var myAjax = new Ajax.Updater( {success: ''placeholder''}, url, > {method: ''get'', parameters: pars, onFailure: reportError }); > }''Look okay to me (although why you store the result in a variable I can''t fathom).> The above code works fine in Firefox but not in IE.I think it''s this argument hiding I mentioned. If my replacement doesn''t work still, please describe the issue better (what happens in IE?), or better yet: put a reproducible case online. ''HTH -- Christophe Porteneuve aka TDD tdd-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
num = num || $F(''refid''); I didn''t get that . Is it like this --> num = $F(''refid''); On Feb 16, 5:03 pm, Christophe Porteneuve <t...-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org> wrote:> Hey Pankaj, > > Pankaj a écrit : > > > function getHTML(num) { > > var num; > > if(!num) { > > num = document.getElementById(''refid'').value; > > } else { > > num = num; > > } > > OK, so you hide your argument with a local variable... Nice. > I bet this whole beginning of code would better of like this: > > num = num || $F(''refid''); > > ''Looks more Prototypish, too. > > > var pars = ''num=''+num+''&showallfiles=''+saf > > +''&act=showattachedfilesection''; > > This sounds okay, although as a matter of taste I prefer to let > Prototype encode this thing and describe parameters as an object-as-hash: > > var pars = { num: num, showallfiles: saf, > act: ''showattachedfilesection'' }; > > > var myAjax = new Ajax.Updater( {success: ''placeholder''}, url, > > {method: ''get'', parameters: pars, onFailure: reportError }); > > } > > ''Look okay to me (although why you store the result in a variable I > can''t fathom). > > > The above code works fine in Firefox but not in IE. > > I think it''s this argument hiding I mentioned. If my replacement > doesn''t work still, please describe the issue better (what happens in > IE?), or better yet: put a reproducible case online. > > ''HTH > > -- > Christophe Porteneuve aka TDD > t...-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
It doesn''t work when I substitute with your code even in Mozilla. On Feb 16, 5:03 pm, Christophe Porteneuve <t...-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org> wrote:> Hey Pankaj, > > Pankaj a écrit : > > > function getHTML(num) { > > var num; > > if(!num) { > > num = document.getElementById(''refid'').value; > > } else { > > num = num; > > } > > OK, so you hide your argument with a local variable... Nice. > I bet this whole beginning of code would better of like this: > > num = num || $F(''refid''); > > ''Looks more Prototypish, too. > > > var pars = ''num=''+num+''&showallfiles=''+saf > > +''&act=showattachedfilesection''; > > This sounds okay, although as a matter of taste I prefer to let > Prototype encode this thing and describe parameters as an object-as-hash: > > var pars = { num: num, showallfiles: saf, > act: ''showattachedfilesection'' }; > > > var myAjax = new Ajax.Updater( {success: ''placeholder''}, url, > > {method: ''get'', parameters: pars, onFailure: reportError }); > > } > > ''Look okay to me (although why you store the result in a variable I > can''t fathom). > > > The above code works fine in Firefox but not in IE. > > I think it''s this argument hiding I mentioned. If my replacement > doesn''t work still, please describe the issue better (what happens in > IE?), or better yet: put a reproducible case online. > > ''HTH > > -- > Christophe Porteneuve aka TDD > t...-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
What happens in IE ? The getHTML function is invoked when I click on a link. When I click on a link the function is called and processing happens but never stops. How I know that processing happens ? By the following code --> var myGlobalHandlers = { onCreate: function(){ Element.show(''systemWorking''); }, onComplete: function() { if(Ajax.activeRequestCount == 0){ Element.hide(''systemWorking''); } } }; Ajax.Responders.register(myGlobalHandlers); On Feb 16, 5:03 pm, Christophe Porteneuve <t...-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org> wrote:> Hey Pankaj, > > Pankaj a écrit : > > > function getHTML(num) { > > var num; > > if(!num) { > > num = document.getElementById(''refid'').value; > > } else { > > num = num; > > } > > OK, so you hide your argument with a local variable... Nice. > I bet this whole beginning of code would better of like this: > > num = num || $F(''refid''); > > ''Looks more Prototypish, too. > > > var pars = ''num=''+num+''&showallfiles=''+saf > > +''&act=showattachedfilesection''; > > This sounds okay, although as a matter of taste I prefer to let > Prototype encode this thing and describe parameters as an object-as-hash: > > var pars = { num: num, showallfiles: saf, > act: ''showattachedfilesection'' }; > > > var myAjax = new Ajax.Updater( {success: ''placeholder''}, url, > > {method: ''get'', parameters: pars, onFailure: reportError }); > > } > > ''Look okay to me (although why you store the result in a variable I > can''t fathom). > > > The above code works fine in Firefox but not in IE. > > I think it''s this argument hiding I mentioned. If my replacement > doesn''t work still, please describe the issue better (what happens in > IE?), or better yet: put a reproducible case online. > > ''HTH > > -- > Christophe Porteneuve aka TDD > t...-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Hey Pankaj, Pankaj a écrit :> Is it like this --> num = $F(''refid'');No, it''s like this: if (!num) num = $F(''refid''); So it leaves your num untouched if it was passed. If it wasn''t, the num === undefined, hence !num, hence you''ll use $F(''refid''). Better? -- Christophe Porteneuve aka TDD tdd-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
OK, so can you at least provide a full code for us to get the whole picture? Online demo would be best; -- Christophe Porteneuve aka TDD tdd-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Here is the Perl code which creates the variable $str and returns to another Ajax(not above) and a placeholder is replaced by the data below. Notice the getHTML function below.--> my $i; foreach $i (0 ..$#selectlist) { $str .= "<tr>"; $str .= "<td class=\"plogitemselectable\"><a href\"#placeanchor\" onClick=\"getHTML($selectlist[$i]{''conid''});\"> $selectlist[$i]{''conid''}</a></td>"; $str .= "<td class=\"plogitemselectable\">$selectlist[$i] {''arriveDate''}</td>"; $str .= "<td class=\"plogitemselectable\">$selectlist[$i] {''dbname''}</td>"; $str .= "<td class=\"plogitemselectable\">$selectlist[$i] {''startDate''}</td>"; $str .= "<td class=\"plogitemselectable\">$selectlist[$i] {''expiryDate''}</td>"; $str .= "<td class=\"plogitemselectable\">$selectlist[$i] {''status''}</td>"; $str .= "</tr>"; } $str .= "</tbody>"; $str .= "</table>"; print $str; On Feb 16, 5:03 pm, Christophe Porteneuve <t...-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org> wrote:> Hey Pankaj, > > Pankaj a écrit : > > > function getHTML(num) { > > var num; > > if(!num) { > > num = document.getElementById(''refid'').value; > > } else { > > num = num; > > } > > OK, so you hide your argument with a local variable... Nice. > I bet this whole beginning of code would better of like this: > > num = num || $F(''refid''); > > ''Looks more Prototypish, too. > > > var pars = ''num=''+num+''&showallfiles=''+saf > > +''&act=showattachedfilesection''; > > This sounds okay, although as a matter of taste I prefer to let > Prototype encode this thing and describe parameters as an object-as-hash: > > var pars = { num: num, showallfiles: saf, > act: ''showattachedfilesection'' }; > > > var myAjax = new Ajax.Updater( {success: ''placeholder''}, url, > > {method: ''get'', parameters: pars, onFailure: reportError }); > > } > > ''Look okay to me (although why you store the result in a variable I > can''t fathom). > > > The above code works fine in Firefox but not in IE. > > I think it''s this argument hiding I mentioned. If my replacement > doesn''t work still, please describe the issue better (what happens in > IE?), or better yet: put a reproducible case online. > > ''HTH > > -- > Christophe Porteneuve aka TDD > t...-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
You want more code ? On Feb 16, 6:02 pm, Christophe Porteneuve <t...-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org> wrote:> OK, so can you at least provide a full code for us to get the whole > picture? Online demo would be best; > > -- > Christophe Porteneuve aka TDD > t...-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Anyone here ? On Feb 16, 6:18 pm, "Pankaj" <pankaj.i...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> You want more code ? > > On Feb 16, 6:02 pm, Christophe Porteneuve <t...-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org> wrote: > > > OK, so can you at least provide a full code for us to get the whole > > picture? Online demo would be best; > > > -- > > Christophe Porteneuve aka TDD > > t...-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type"> </head> <body bgcolor="#ffffff" text="#000000"> Christophe''s suggestions were correct but perhaps you didn''t implement them in your code correctly. Please post a live demo or at least your getHTML function again as it is after you changed it.<br> <br> Colin<br> <br> Pankaj wrote: <blockquote cite="mid:1171635296.116220.137530-xi0qYfEWaTou97dJrRhxJGB/v6IoIuQBVpNB7YpNyf8@public.gmane.org" type="cite"> <pre wrap="">Anyone here ? On Feb 16, 6:18 pm, "Pankaj" <a class="moz-txt-link-rfc2396E" href="mailto:pankaj.i...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org"><pankaj.i...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org></a> wrote: </pre> <blockquote type="cite"> <pre wrap="">You want more code ? On Feb 16, 6:02 pm, Christophe Porteneuve <a class="moz-txt-link-rfc2396E" href="mailto:t...-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org"><t...-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org></a> wrote: </pre> <blockquote type="cite"> <pre wrap="">OK, so can you at least provide a full code for us to get the whole picture? Online demo would be best; </pre> </blockquote> <blockquote type="cite"> <pre wrap="">-- Christophe Porteneuve aka TDD <a class="moz-txt-link-abbreviated" href="mailto:t...-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org">t...-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org</a> </pre> </blockquote> </blockquote> <pre wrap=""><!----> </pre> </blockquote> <br> --~--~---------~--~----~------------~-------~--~----~<br> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. <br> To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <br> To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <br> For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en <br> -~----------~----~----~----~------~----~------~--~---<br> </body> </html> <br>
This is changed the getHTML function--> function getHTML(num) { var saf = 0 ; var num; if(!num) { num = $F(''refid''); } else { num = num; } var url = ''/cgi-bin/tps/search.cgi''; //var pars = {num: num,showallfiles: saf,act: ''showattachedfilesection''}; new Ajax.Updater( {success: ''placeholder''}, url, {method: ''get'', parameters: pars,evalScripts: true ,onFailure: reportError }); } Its not working . On Feb 16, 7:26 pm, Colin Mollenhour <eliteii...-NPSFNn/7+NYVo650/ln6uw@public.gmane.org> wrote:> Christophe''s suggestions were correct but perhaps you didn''t implement them in your code correctly. Please post a live demo or at least your getHTML function again as it is after you changed it. > Colin > Pankaj wrote:Anyone here ? On Feb 16, 6:18 pm, "Pankaj"<pankaj.i...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote:You want more code ? On Feb 16, 6:02 pm, Christophe Porteneuve<t...-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org>wrote:OK, so can you at least provide a full code for us to get the whole picture? Online demo would be best;-- Christophe Porteneuve aka TDDt...-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Anyone here. On Feb 17, 9:29 am, "Pankaj" <pankaj.i...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> This is changed the getHTML function--> > function getHTML(num) { > var saf = 0 ; > var num; > if(!num) { > num = $F(''refid''); > } else { > num = num; > } > var url = ''/cgi-bin/tps/search.cgi''; > //var pars = {num: num,showallfiles: saf,act: > ''showattachedfilesection''}; > new Ajax.Updater( {success: ''placeholder''}, url, {method: > ''get'', parameters: pars,evalScripts: true ,onFailure: reportError }); > } > > Its not working . > > On Feb 16, 7:26 pm, Colin Mollenhour <eliteii...-NPSFNn/7+NYVo650/ln6uw@public.gmane.org> > wrote: > > > Christophe''s suggestions were correct but perhaps you didn''t implement them in your code correctly. Please post a live demo or at least your getHTML function again as it is after you changed it. > > Colin > > Pankaj wrote:Anyone here ? On Feb 16, 6:18 pm, "Pankaj"<pankaj.i...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote:You want more code ? On Feb 16, 6:02 pm, Christophe Porteneuve<t...-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org>wrote:OK, so can you at least provide a full code for us to get the whole picture? Online demo would be best;-- Christophe Porteneuve aka TDDt...-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Why noone is replaying ? PLease reply . On Feb 17, 10:17 am, "Pankaj" <pankaj.i...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Anyone here. > > On Feb 17, 9:29 am, "Pankaj" <pankaj.i...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > This is changed the getHTML function--> > > function getHTML(num) { > > var saf = 0 ; > > var num; > > if(!num) { > > num = $F(''refid''); > > } else { > > num = num; > > } > > var url = ''/cgi-bin/tps/search.cgi''; > > //var pars = {num: num,showallfiles: saf,act: > > ''showattachedfilesection''}; > > new Ajax.Updater( {success: ''placeholder''}, url, {method: > > ''get'', parameters: pars,evalScripts: true ,onFailure: reportError }); > > } > > > Its not working . > > > On Feb 16, 7:26 pm, Colin Mollenhour <eliteii...-NPSFNn/7+NYVo650/ln6uw@public.gmane.org> > > wrote: > > > > Christophe''s suggestions were correct but perhaps you didn''t implement them in your code correctly. Please post a live demo or at least your getHTML function again as it is after you changed it. > > > Colin > > > Pankaj wrote:Anyone here ? On Feb 16, 6:18 pm, "Pankaj"<pankaj.i...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote:You want more code ? On Feb 16, 6:02 pm, Christophe Porteneuve<t...-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org>wrote:OK, so can you at least provide a full code for us to get the whole picture? Online demo would be best;-- Christophe Porteneuve aka TDDt...-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type"> </head> <body bgcolor="#ffffff" text="#000000"> You didn''t make the first change that Christophe told you to.. Also, it looks like you commented out the "pars" argument?<br> <br> The "var" keyword declares a variable. Doing so may overwrite any other variables in your scope with the same name as Christophe explained, please re-read his very first response. Your function should look like this:<br> <br> <pre wrap="">function getHTML(num) { var saf = 0 ; num = num || $F(''refid''); var url = ''/cgi-bin/tps/search.cgi''; var pars = { num: num, showallfiles: saf, act: ''showattachedfilesection'' }; new Ajax.Updater( {success: ''placeholder''}, url, {method: ''get'', parameters: pars, evalScripts: true ,onFailure: reportError }); }</pre> <br> Pankaj wrote: <blockquote cite="mid:1171686541.840016.62710-6XXtWbjNmFZjzpG5Ic7DJ1YGCWtFR9XvQQ4Iyu8u01E@public.gmane.org" type="cite"> <pre wrap="">This is changed the getHTML function--> function getHTML(num) { var saf = 0 ; var num; if(!num) { num = $F(''refid''); } else { num = num; } var url = ''/cgi-bin/tps/search.cgi''; //var pars = {num: num,showallfiles: saf,act: ''showattachedfilesection''}; new Ajax.Updater( {success: ''placeholder''}, url, {method: ''get'', parameters: pars,evalScripts: true ,onFailure: reportError }); } Its not working . On Feb 16, 7:26 pm, Colin Mollenhour <a class="moz-txt-link-rfc2396E" href="mailto:eliteii...-NPSFNn/7+NYVo650/ln6uw@public.gmane.org"><eliteii...-NPSFNn/7+NYVo650/ln6uw@public.gmane.org></a> wrote: </pre> <blockquote type="cite"> <pre wrap="">Christophe''s suggestions were correct but perhaps you didn''t implement them in your code correctly. Please post a live demo or at least your getHTML function again as it is after you changed it. Colin Pankaj wrote:Anyone here ? On Feb 16, 6:18 pm, "Pankaj"<a class="moz-txt-link-rfc2396E" href="mailto:pankaj.i...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org"><pankaj.i...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org></a>wrote:You want more code ? On Feb 16, 6:02 pm, Christophe Porteneuve<a class="moz-txt-link-rfc2396E" href="mailto:t...-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org"><t...-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org></a>wrote:OK, so can you at least provide a full code for us to get the whole picture? Online demo would be best;-- Christophe Porteneuve aka <a class="moz-txt-link-abbreviated" href="mailto:TDDt...-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org">TDDt...-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org</a> </pre> </blockquote> <pre wrap=""><!----> </pre> </blockquote> <br> --~--~---------~--~----~------------~-------~--~----~<br> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. <br> To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <br> To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <br> For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en <br> -~----------~----~----~----~------~----~------~--~---<br> </body> </html> <br>
Now this is my latest code. Is it correct --> function getHTML(num) { var saf = 0 ; var num; if(!num) { num = num || $F(''refid''); } else { num = num; } var url = ''/cgi-bin/tps/search.cgi''; var pars = {num: num,showallfiles: saf,act: ''showattachedfilesection''}; new Ajax.Updater( {success: ''placeholder''}, url, {method: ''get'', parameters: pars,evalScripts: true ,onFailure: reportError }); } Its not working. On Feb 17, 2:04 pm, Colin Mollenhour <eliteii...-NPSFNn/7+NYVo650/ln6uw@public.gmane.org> wrote:> You didn''t make the first change that Christophe told you to.. Also, it looks like you commented out the "pars" argument? > The "var" keyword declares a variable. Doing so may overwrite any other variables in your scope with the same name as Christophe explained, please re-read his very first response. Your function should look like this:function getHTML(num) { var saf = 0 ; num = num || $F(''refid''); var url = ''/cgi-bin/tps/search.cgi''; var pars = { num: num, showallfiles: saf, act: ''showattachedfilesection'' }; new Ajax.Updater( {success: ''placeholder''}, url, {method: ''get'', parameters: pars, evalScripts: true ,onFailure: reportError }); } > Pankaj wrote:This is changed the getHTML function--> function getHTML(num) { var saf = 0 ; var num; if(!num) { num = $F(''refid''); } else { num = num; } var url = ''/cgi-bin/tps/search.cgi''; //var pars = {num: num,showallfiles: saf,act: ''showattachedfilesection''}; new Ajax.Updater( {success: ''placeholder''}, url, {method: ''get'', parameters: pars,evalScripts: true ,onFailure: reportError }); } Its not working . On Feb 16, 7:26 pm, Colin Mollenhour<eliteii...-NPSFNn/7+NYVo650/ln6uw@public.gmane.org>wrote:Christophe''s suggestions were correct but perhaps you didn''t implement them in your code correctly. Please post a live demo or at least your getHTML function again as it is after you changed it. Colin Pankaj wrote:Anyone here ? On Feb 16, 6:18 pm, "Pankaj"<pankaj.i...@gmail.com>wrote:You want more code ? On Feb 16, 6:02 pm, Christophe Porteneuve<t...-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org>wrote:OK, so can you at least provide a full code for us to get the whole picture? Online demo would be best;-- Christophe Porteneuve akaTDDt...-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Please reply. On Feb 17, 2:28 pm, "Pankaj" <pankaj.i...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Now this is my latest code. Is it correct --> > > function getHTML(num) { > var saf = 0 ; > var num; > if(!num) { > num = num || $F(''refid''); > } else { > num = num; > } > var url = ''/cgi-bin/tps/search.cgi''; > var pars = {num: num,showallfiles: saf,act: > ''showattachedfilesection''}; > new Ajax.Updater( {success: ''placeholder''}, url, {method: > ''get'', parameters: pars,evalScripts: true ,onFailure: reportError }); > } > > Its not working. > > On Feb 17, 2:04 pm, Colin Mollenhour <eliteii...-NPSFNn/7+NYVo650/ln6uw@public.gmane.org> > wrote: > > > You didn''t make the first change that Christophe told you to.. Also, it looks like you commented out the "pars" argument? > > The "var" keyword declares a variable. Doing so may overwrite any other variables in your scope with the same name as Christophe explained, please re-read his very first response. Your function should look like this:function getHTML(num) { var saf = 0 ; num = num || $F(''refid''); var url = ''/cgi-bin/tps/search.cgi''; var pars = { num: num, showallfiles: saf, act: ''showattachedfilesection'' }; new Ajax.Updater( {success: ''placeholder''}, url, {method: ''get'', parameters: pars, evalScripts: true ,onFailure: reportError }); } > > Pankaj wrote:This is changed the getHTML function--> function getHTML(num) { var saf = 0 ; var num; if(!num) { num = $F(''refid''); } else { num = num; } var url = ''/cgi-bin/tps/search.cgi''; //var pars = {num: num,showallfiles: saf,act: ''showattachedfilesection''}; new Ajax.Updater( {success: ''placeholder''}, url, {method: ''get'', parameters: pars,evalScripts: true ,onFailure: reportError }); } Its not working . On Feb 16, 7:26 pm, Colin Mollenhour<eliteii...-NPSFNn/7+NYVo650/ln6uw@public.gmane.org>wrote:Christophe''s suggestions were correct but perhaps you didn''t implement them in your code correctly. Please post a live demo or at least your getHTML function again as it is after you changed it. Colin Pankaj wrote:Anyone here ? On Feb 16, 6:18 pm, "Pankaj"<pankaj.i...@gmail.com>wrote:You want more code ? On Feb 16, 6:02 pm, Christophe Porteneuve<t...-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org>wrote:OK, so can you at least provide a full code for us to get the whole picture? Online demo would be best;-- Christophe Porteneuve akaTDDt...-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Anyone please help me . On Feb 17, 3:13 pm, "Pankaj" <pankaj.i...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Please reply. > > On Feb 17, 2:28 pm, "Pankaj" <pankaj.i...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Now this is my latest code. Is it correct --> > > > function getHTML(num) { > > var saf = 0 ; > > var num; > > if(!num) { > > num = num || $F(''refid''); > > } else { > > num = num; > > } > > var url = ''/cgi-bin/tps/search.cgi''; > > var pars = {num: num,showallfiles: saf,act: > > ''showattachedfilesection''}; > > new Ajax.Updater( {success: ''placeholder''}, url, {method: > > ''get'', parameters: pars,evalScripts: true ,onFailure: reportError }); > > } > > > Its not working. > > > On Feb 17, 2:04 pm, Colin Mollenhour <eliteii...-NPSFNn/7+NYVo650/ln6uw@public.gmane.org> > > wrote: > > > > You didn''t make the first change that Christophe told you to.. Also, it looks like you commented out the "pars" argument? > > > The "var" keyword declares a variable. Doing so may overwrite any other variables in your scope with the same name as Christophe explained, please re-read his very first response. Your function should look like this:function getHTML(num) { var saf = 0 ; num = num || $F(''refid''); var url = ''/cgi-bin/tps/search.cgi''; var pars = { num: num, showallfiles: saf, act: ''showattachedfilesection'' }; new Ajax.Updater( {success: ''placeholder''}, url, {method: ''get'', parameters: pars, evalScripts: true ,onFailure: reportError }); } > > > Pankaj wrote:This is changed the getHTML function--> function getHTML(num) { var saf = 0 ; var num; if(!num) { num = $F(''refid''); } else { num = num; } var url = ''/cgi-bin/tps/search.cgi''; //var pars = {num: num,showallfiles: saf,act: ''showattachedfilesection''}; new Ajax.Updater( {success: ''placeholder''}, url, {method: ''get'', parameters: pars,evalScripts: true ,onFailure: reportError }); } Its not working . On Feb 16, 7:26 pm, Colin Mollenhour<eliteii...-NPSFNn/7+NYVo650/ln6uw@public.gmane.org>wrote:Christophe''s suggestions were correct but perhaps you didn''t implement them in your code correctly. Please post a live demo or at least your getHTML function again as it is after you changed it. Colin Pankaj wrote:Anyone here ? On Feb 16, 6:18 pm, "Pankaj"<pankaj.i...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote:You want more code ? On Feb 16, 6:02 pm, Christophe Porteneuve<t...-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org>wrote:OK, so can you at least provide a full code for us to get the whole picture? Online demo would be best;-- Christophe Porteneuve akaTDDt...-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Hey Pankaj, First, please stop pinging people for reply. It''s annoying, and it certainly won''t make people who didn''t reply yet want to reply more. Second, please READ what we say. The trouble in your function is the re-declaration of num as a local variable, which obscures your parameter. Here''s how it should read: function getHTML(num) { num = num [[ $F(''refid''); var saf = 0; var url = ''/cgi-bin/tps/search.cgi''; var pars = { num: num, showallfiles: saf, act: ''showattachedfilesection'' }; new Ajax.Updater({ success: ''placeholder'' }, url, { method: ''get'', parameters: pars, evalScripts: true, onFailure: reportError }); } Finally, don''t say "it''s not working." There is no report less useful than that. We have no idea what your function should do; we have no idea where and how your function is CALLED, and what''s passed as the num argument; we have no idea what the server-side script does, whether it does return something, and then what. We have no idea what your placeholder element is, and what your reportError function does. You''re asking us to help diagnose a problem while exposing 5% of it. Can''t you PLEASE put up an online reproducible case, and clearly state what''s supposed to happen? Sincerely, -- Christophe Porteneuve a.k.a. TDD "[They] did not know it was impossible, so they did it." --Mark Twain Email: tdd-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
num = num [[ $F(''refid''); What is that actually ? Is it a bracket or the OR ? [[ or || ? If this [[ then its wrong ? On Feb 17, 4:57 pm, Christophe Porteneuve <t...-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org> wrote:> Hey Pankaj, > > First, please stop pinging people for reply. It''s annoying, and it > certainly won''t make people who didn''t reply yet want to reply more. > > Second, please READ what we say. The trouble in your function is the > re-declaration of num as a local variable, which obscures your > parameter. Here''s how it should read: > > function getHTML(num) { > num = num [[ $F(''refid''); > var saf = 0; > var url = ''/cgi-bin/tps/search.cgi''; > var pars = { num: num, showallfiles: saf, > act: ''showattachedfilesection'' }; > new Ajax.Updater({ success: ''placeholder'' }, url, { > method: ''get'', parameters: pars, evalScripts: true, > onFailure: reportError }); > > } > > Finally, don''t say "it''s not working." There is no report less useful > than that. We have no idea what your function should do; we have no > idea where and how your function is CALLED, and what''s passed as the num > argument; we have no idea what the server-side script does, whether it > does return something, and then what. We have no idea what your > placeholder element is, and what your reportError function does. > > You''re asking us to help diagnose a problem while exposing 5% of it. > > Can''t you PLEASE put up an online reproducible case, and clearly state > what''s supposed to happen? > > Sincerely, > > -- > Christophe Porteneuve a.k.a. TDD > "[They] did not know it was impossible, so they did it." --Mark Twain > Email: t...-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Please see this function for the last time. If its correct then I will give you a online reproducible case. I have created a new variable $num1 --> function getHTML(num) { var saf = 0 ; var num1; if(!num) { num1 = $F(''refid''); } else { num1 = num; } var url = ''/cgi-bin/tps/search.cgi''; var pars = {num: num1,showallfiles: saf,act: ''showattachedfilesection''}; new Ajax.Updater( {success: ''placeholder''}, url, {method: ''get'',parameters: pars,evalScripts: true ,onFailure: reportError }); } On Feb 17, 4:57 pm, Christophe Porteneuve <t...-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org> wrote:> Hey Pankaj, > > First, please stop pinging people for reply. It''s annoying, and it > certainly won''t make people who didn''t reply yet want to reply more. > > Second, please READ what we say. The trouble in your function is the > re-declaration of num as a local variable, which obscures your > parameter. Here''s how it should read: > > function getHTML(num) { > num = num [[ $F(''refid''); > var saf = 0; > var url = ''/cgi-bin/tps/search.cgi''; > var pars = { num: num, showallfiles: saf, > act: ''showattachedfilesection'' }; > new Ajax.Updater({ success: ''placeholder'' }, url, { > method: ''get'', parameters: pars, evalScripts: true, > onFailure: reportError }); > > } > > Finally, don''t say "it''s not working." There is no report less useful > than that. We have no idea what your function should do; we have no > idea where and how your function is CALLED, and what''s passed as the num > argument; we have no idea what the server-side script does, whether it > does return something, and then what. We have no idea what your > placeholder element is, and what your reportError function does. > > You''re asking us to help diagnose a problem while exposing 5% of it. > > Can''t you PLEASE put up an online reproducible case, and clearly state > what''s supposed to happen? > > Sincerely, > > -- > Christophe Porteneuve a.k.a. TDD > "[They] did not know it was impossible, so they did it." --Mark Twain > Email: t...-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Jeez, please *READ* the replies posted to you!! Obide by the etiquette which the list expects and *STOP* repeatedly mailing "anyone there", "please respond" etc it''s just damn annoying and rude (the CAPITALS I am using here are case in point and if deliberate" If you had actually *READ* the previous reply you will notice that you were provided an *ANSWER* with code. *RESPECT* the work people who post to this list and realise this is not a JS/Scriptaculous Support helpline but a community of it''s users. Pankaj wrote:> Please see this function for the last time. If its correct then I will> give you a online reproducible case. > > I have created a new variable $num1 --> > > function getHTML(num) { > var saf = 0 ; > var num1; > if(!num) { > num1 = $F(''refid''); > } else { > num1 = num; > } > var url = ''/cgi-bin/tps/search.cgi''; > var pars = {num: num1,showallfiles: saf,act: > ''showattachedfilesection''}; > new Ajax.Updater( {success: ''placeholder''}, url, {method: > ''get'',parameters: pars,evalScripts: true ,onFailure: reportError }); > } > > > On Feb 17, 4:57 pm, Christophe Porteneuve <t...-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org> wrote: > > Hey Pankaj, > > > > First, please stop pinging people for reply. It''s annoying, and it > > certainly won''t make people who didn''t reply yet want to reply more. > > > > Second, please READ what we say. The trouble in your function is the > > re-declaration of num as a local variable, which obscures your > > parameter. Here''s how it should read: > > > > function getHTML(num) { > > num = num [[ $F(''refid''); > > var saf = 0; > > var url = ''/cgi-bin/tps/search.cgi''; > > var pars = { num: num, showallfiles: saf, > > act: ''showattachedfilesection'' }; > > new Ajax.Updater({ success: ''placeholder'' }, url, { > > method: ''get'', parameters: pars, evalScripts: true, > > onFailure: reportError }); > > > > } > > > > Finally, don''t say "it''s not working." There is no report less useful > > than that. We have no idea what your function should do; we have no > > idea where and how your function is CALLED, and what''s passed as the num > > argument; we have no idea what the server-side script does, whether it > > does return something, and then what. We have no idea what your > > placeholder element is, and what your reportError function does. > > > > You''re asking us to help diagnose a problem while exposing 5% of it. > > > > Can''t you PLEASE put up an online reproducible case, and clearly state > > what''s supposed to happen? > > > > Sincerely, > > > > -- > > Christophe Porteneuve a.k.a. TDD > > "[They] did not know it was impossible, so they did it." --Mark Twain > > Email: t...-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Hey Pankaj, Pankaj a écrit :> num = num [[ $F(''refid''); > > What is that actually ? > Is it a bracket or the OR ?OMG, don''t you even have a font that lets you distinguish between [[ and ||? How can you possibly work? Aside from this, I don''t know of a single language that features a [[ operator... If you find [[, it''s usually because you''re opening two levels of array literals... which you''d obviously close later on. You seem to be reading your email through Firefox on Debian (1.0.4, too. Upgrade, man!). Hitting Ctrl+Plus a few times should resolve the ambiguity when you''re in doubt on characters. It''s a double pipe (||), not a double opening bracket. It''s a logical OR operator. It''s a common Prototype idiom: a = a || defaultValue; If a is undefined then (as would a parameter that got no argument when the function was called), in the context of "a || defaultValue", a will be boolean-equivalent to false, thus triggering evaluation of the right-hand operand: defaultValue. And a will use that default value. But if a is not undefined, unless its current value is boolean-equivalent to false (as would be zero, for instance), its current value will remain used, and the right-hand operand will be ignored. I hope you get it now... -- Christophe Porteneuve a.k.a. TDD "[They] did not know it was impossible, so they did it." --Mark Twain Email: tdd-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Sigh... Pankaj a écrit :> Please see this function for the last time. If its correct then I will > give you a online reproducible case.Your function is equivalent to the one I posted earlier, except for the fact that it uselessly creates an extra variable. It''s more verbose than mine, but it appears functionally equivalent. -- Christophe Porteneuve a.k.a. TDD "[They] did not know it was impossible, so they did it." --Mark Twain Email: tdd-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
What about the function which I posted ? Is that correct ? I will give you a reproducible case very soon but please tell me if the function is correct? On Feb 17, 5:42 pm, Christophe Porteneuve <t...-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org> wrote:> Hey Pankaj, > > Pankaj a écrit : > > > num = num [[ $F(''refid''); > > > What is that actually ? > > Is it a bracket or the OR ? > > OMG, don''t you even have a font that lets you distinguish between [[ and > ||? How can you possibly work? > > Aside from this, I don''t know of a single language that features a [[ > operator... If you find [[, it''s usually because you''re opening two > levels of array literals... which you''d obviously close later on. > > You seem to be reading your email through Firefox on Debian (1.0.4, too. > Upgrade, man!). Hitting Ctrl+Plus a few times should resolve the > ambiguity when you''re in doubt on characters. > > It''s a double pipe (||), not a double opening bracket. It''s a logical > OR operator. It''s a common Prototype idiom: > > a = a || defaultValue; > > If a is undefined then (as would a parameter that got no argument when > the function was called), in the context of "a || defaultValue", a will > be boolean-equivalent to false, thus triggering evaluation of the > right-hand operand: defaultValue. And a will use that default value. > > But if a is not undefined, unless its current value is > boolean-equivalent to false (as would be zero, for instance), its > current value will remain used, and the right-hand operand will be ignored. > > I hope you get it now... > > -- > Christophe Porteneuve a.k.a. TDD > "[They] did not know it was impossible, so they did it." --Mark Twain > Email: t...-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Alright , I will give you a reproducible case on Monday. Thanks for helping me . On Feb 17, 5:44 pm, Christophe Porteneuve <t...-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org> wrote:> Sigh... > > Pankaj a écrit : > > > Please see this function for the last time. If its correct then I will > > give you a online reproducible case. > > Your function is equivalent to the one I posted earlier, except for the > fact that it uselessly creates an extra variable. It''s more verbose > than mine, but it appears functionally equivalent. > > -- > Christophe Porteneuve a.k.a. TDD > "[They] did not know it was impossible, so they did it." --Mark Twain > Email: t...-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Yeah you are right I am working on Firefox Debian . You seem to be genious. On Feb 17, 5:42 pm, Christophe Porteneuve <t...-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org> wrote:> Hey Pankaj, > > Pankaj a écrit : > > > num = num [[ $F(''refid''); > > > What is that actually ? > > Is it a bracket or the OR ? > > OMG, don''t you even have a font that lets you distinguish between [[ and > ||? How can you possibly work? > > Aside from this, I don''t know of a single language that features a [[ > operator... If you find [[, it''s usually because you''re opening two > levels of array literals... which you''d obviously close later on. > > You seem to be reading your email through Firefox on Debian (1.0.4, too. > Upgrade, man!). Hitting Ctrl+Plus a few times should resolve the > ambiguity when you''re in doubt on characters. > > It''s a double pipe (||), not a double opening bracket. It''s a logical > OR operator. It''s a common Prototype idiom: > > a = a || defaultValue; > > If a is undefined then (as would a parameter that got no argument when > the function was called), in the context of "a || defaultValue", a will > be boolean-equivalent to false, thus triggering evaluation of the > right-hand operand: defaultValue. And a will use that default value. > > But if a is not undefined, unless its current value is > boolean-equivalent to false (as would be zero, for instance), its > current value will remain used, and the right-hand operand will be ignored. > > I hope you get it now... > > -- > Christophe Porteneuve a.k.a. TDD > "[They] did not know it was impossible, so they did it." --Mark Twain > Email: t...-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Please click on the link to get the reproducible case --> http://netfares.skybirdfares.com/cgi-bin/tps/index.cgi Please login and then click on Search in the TopMenu . After that enter "yy test"(don''t include double quotes) as the search text. The Search results will come and after that click anyone of the links on the left. You will see that the results don''t come after you click the link. This happens only in IE. That is the problem . Please solve it. On Feb 17, 4:57 pm, Christophe Porteneuve <t...-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org> wrote:> Hey Pankaj, > > First, please stop pinging people for reply. It''s annoying, and it > certainly won''t make people who didn''t reply yet want to reply more. > > Second, please READ what we say. The trouble in your function is the > re-declaration of num as a local variable, which obscures your > parameter. Here''s how it should read: > > function getHTML(num) { > num = num [[ $F(''refid''); > var saf = 0; > var url = ''/cgi-bin/tps/search.cgi''; > var pars = { num: num, showallfiles: saf, > act: ''showattachedfilesection'' }; > new Ajax.Updater({ success: ''placeholder'' }, url, { > method: ''get'', parameters: pars, evalScripts: true, > onFailure: reportError }); > > } > > Finally, don''t say "it''s not working." There is no report less useful > than that. We have no idea what your function should do; we have no > idea where and how your function is CALLED, and what''s passed as the num > argument; we have no idea what the server-side script does, whether it > does return something, and then what. We have no idea what your > placeholder element is, and what your reportError function does. > > You''re asking us to help diagnose a problem while exposing 5% of it. > > Can''t you PLEASE put up an online reproducible case, and clearly state > what''s supposed to happen? > > Sincerely, > > -- > Christophe Porteneuve a.k.a. TDD > "[They] did not know it was impossible, so they did it." --Mark Twain > Email: t...-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
I am sorry I didn''t give the username and password . They are --> Username: guest Password: tmp123 On Mar 5, 9:56 am, "Pankaj" <pankaj.i...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Please click on the link to get the reproducible case --> > > http://netfares.skybirdfares.com/cgi-bin/tps/index.cgi > > Please login and then click on Search in the TopMenu . > After that enter "yy test"(don''t include double quotes) as the search > text. > The Search results will come and after that click anyone of the links > on the left. > > You will see that the results don''t come after you click the link. > This happens only in IE. > That is the problem . > Please solve it. > > On Feb 17, 4:57 pm, Christophe Porteneuve <t...-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org> wrote: > > > Hey Pankaj, > > > First, please stop pinging people for reply. It''s annoying, and it > > certainly won''t make people who didn''t reply yet want to reply more. > > > Second, please READ what we say. The trouble in your function is the > > re-declaration of num as a local variable, which obscures your > > parameter. Here''s how it should read: > > > function getHTML(num) { > > num = num [[ $F(''refid''); > > var saf = 0; > > var url = ''/cgi-bin/tps/search.cgi''; > > var pars = { num: num, showallfiles: saf, > > act: ''showattachedfilesection'' }; > > new Ajax.Updater({ success: ''placeholder'' }, url, { > > method: ''get'', parameters: pars, evalScripts: true, > > onFailure: reportError }); > > > } > > > Finally, don''t say "it''s not working." There is no report less useful > > than that. We have no idea what your function should do; we have no > > idea where and how your function is CALLED, and what''s passed as the num > > argument; we have no idea what the server-side script does, whether it > > does return something, and then what. We have no idea what your > > placeholder element is, and what your reportError function does. > > > You''re asking us to help diagnose a problem while exposing 5% of it. > > > Can''t you PLEASE put up an online reproducible case, and clearly state > > what''s supposed to happen? > > > Sincerely, > > > -- > > Christophe Porteneuve a.k.a. TDD > > "[They] did not know it was impossible, so they did it." --Mark Twain > > Email: t...-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Pankaj a écrit :> You will see that the results don''t come after you click the link. > This happens only in IE.Do you know whether your getHTML function does get called in IE, and with the proper num argument value? I have no IE at hand to test, but looking at your code, that''s the first thing I''d check. -- Christophe Porteneuve a.k.a. TDD "[They] did not know it was impossible, so they did it." --Mark Twain Email: tdd-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
yeah it works in IE. I just put an alert . It shows the num value. On Mar 5, 1:12 pm, Christophe Porteneuve <t...-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org> wrote:> Pankaj a écrit : > > > You will see that the results don''t come after you click the link. > > This happens only in IE. > > Do you know whether your getHTML function does get called in IE, and > with the proper num argument value? I have no IE at hand to test, but > looking at your code, that''s the first thing I''d check. > > -- > Christophe Porteneuve a.k.a. TDD > "[They] did not know it was impossible, so they did it." --Mark Twain > Email: t...-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Are you working on it ? On Mar 5, 1:12 pm, Christophe Porteneuve <t...-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org> wrote:> Pankaj a écrit : > > > You will see that the results don''t come after you click the link. > > This happens only in IE. > > Do you know whether your getHTML function does get called in IE, and > with the proper num argument value? I have no IE at hand to test, but > looking at your code, that''s the first thing I''d check. > > -- > Christophe Porteneuve a.k.a. TDD > "[They] did not know it was impossible, so they did it." --Mark Twain > Email: t...-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Hey Pankaj, Pankaj a écrit :> Are you working on it ?No I''m not. I have a life, a dayjob, and many hobbies and personal projects on the side. As I also said earlier, I have no IE at hand to test your issue these days. As you were also repeatedly told in prior responses to this thread, do not keep pinging people to demand they solve your issues. This is a free, benevolent support group, not a paying service or hotline. Either people have time, skills and resources to try and help you, or they don''t. If this is such a blocking issue, you should seek to temporarily *hire* a skilled consultant so that they do dedicate all their professional time to studying and fixing your issue. I mean, if you accepted a development mission that you and your staff cannot complete in the current state of your skills, your responsibility as a company is to acquire the necessary skills, one way or another. Sincerely. -- Christophe Porteneuve aka TDD tdd-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
ok kool down. I thank you for the time you gave me . I wish you all the best in your job. I will try to fix it through some other means . Thanks a lot !! On Mar 5, 5:02 pm, Christophe Porteneuve <t...-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org> wrote:> Hey Pankaj, > > Pankaj a écrit : > > > Are you working on it ? > > No I''m not. I have a life, a dayjob, and many hobbies and personal > projects on the side. As I also said earlier, I have no IE at hand to > test your issue these days. > > As you were also repeatedly told in prior responses to this thread, do > not keep pinging people to demand they solve your issues. This is a > free, benevolent support group, not a paying service or hotline. Either > people have time, skills and resources to try and help you, or they don''t. > > If this is such a blocking issue, you should seek to temporarily *hire* > a skilled consultant so that they do dedicate all their professional > time to studying and fixing your issue. I mean, if you accepted a > development mission that you and your staff cannot complete in the > current state of your skills, your responsibility as a company is to > acquire the necessary skills, one way or another. > > Sincerely. > > -- > Christophe Porteneuve aka TDD > t...-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Hey I made it work. It was a <div> tag because of which the page was not getting displayed in IE. Bye !! On Mar 5, 1:12 pm, Christophe Porteneuve <t...-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org> wrote:> Pankaj a écrit : > > > You will see that the results don''t come after you click the link. > > This happens only in IE. > > Do you know whether your getHTML function does get called in IE, and > with the proper num argument value? I have no IE at hand to test, but > looking at your code, that''s the first thing I''d check. > > -- > Christophe Porteneuve a.k.a. TDD > "[They] did not know it was impossible, so they did it." --Mark Twain > Email: t...-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---