When using .strip() in firefox I get the following error: Unable to convert JavaScript value /^\s+/ to Java value of type char file://///Sv010082/cpse2webagent/scripts/javascript/prototype.js Line 375 It works fine in Internet explorer. Does .strip() not work with Firefox? If not is there a cross browser way to trim? Thanks. --~--~---------~--~----~------------~-------~--~----~ 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 think we all want to see what you are stripping All things prototype are usually cross-browser, if anything, they would fail in IE.. :D On Dec 4, 4:13 pm, Shaitan <atothek...-AilVLgyPuuJBDgjK7y7TUQ@public.gmane.org> wrote:> When using .strip() in firefox I get the following error: > > Unable to convert JavaScript value /^\s+/ to Java value of type char > file://///Sv010082/cpse2webagent/scripts/javascript/prototype.js > Line 375 > > It works fine in Internet explorer. Does .strip() not work with > Firefox? If not is there a cross browser way to trim? > > Thanks.--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Thanks for the interest in my problem. I think I figured it out. It wasn''t a prototype or a firefox issue. The development I do is creating on-screen scripting for a callcenter using a vendor supplied plugin for macromedia dreamweaver called visual scriptor for designing scripts for their SER E2 dialer. It looks like firefox isn''t too keen on the way the function that grabs the contents of fields from the call record returns the data. I found that when using waGetField(''FIELDNAME'') by itself then .strip(), .capitalize() etc (as well as other trim functions found via google, toProperCase() etc) error out, but only in Firefox. This morning I stumbled across one that was working in firefox: $(''question'').update(''Hello, is '' + toProperCase(waGetField(''FIRST'') + '' '' + waGetField(''LAST'')) + ''there?'') The only difference I could see between this and other non-working bits was that I was adding a space. So I wrote a function that returns waGetField(field)+''''.strip() and used it in place of waGetField and lo and behold, .strip(), .capitalize() and all the other regex based string functions all work in both IE and firefox for me now. I realize this is probably more detail than anyone needs since it''s for such a specialized scenario, but I thought I''d toss it in there for someone else who uses this software to maybe stumble across in a google search at some point. On Dec 6, 9:29 am, LexNonScripta <lex.non.scri...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I think we all want to see what you are stripping > > All things prototype are usually cross-browser, if anything, they > would fail in IE.. :D > > On Dec 4, 4:13 pm, Shaitan <atothek...-AilVLgyPuuJBDgjK7y7TUQ@public.gmane.org> wrote: > > > > > When using .strip() in firefox I get the following error: > > > Unable to convert JavaScript value /^\s+/ to Java value of type char > > file://///Sv010082/cpse2webagent/scripts/javascript/prototype.js > > Line 375 > > > It works fine in Internet explorer. Does .strip() not work with > > Firefox? If not is there a cross browser way to trim? > > > Thanks.- Hide quoted text - > > - Show quoted text ---~--~---------~--~----~------------~-------~--~----~ 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 had problems with unicode string conversions in JS, especially when stuff like đšžćč are being used.. Just a tip: Use FireFox -> firebug for debugging such stuff at development time. ex.: console.log(toProperCase(waGetField(''FIRST'')); this would write the return value to the firebug console. Sounds like an improper return value to me (/^\s+/ in your error report???) You also have a cross-browser firebug at http://www.getfirebug.com/lite.html, if you need support for IE and others (they would throw an error if you use console.log()) Sounds like an interesting project... On Dec 6, 6:26 pm, Shaitan <atothek...-AilVLgyPuuJBDgjK7y7TUQ@public.gmane.org> wrote:> Thanks for the interest in my problem. I think I figured it out. It > wasn''t a prototype or a firefox issue. The development I do is > creating on-screen scripting for a callcenter using a vendor supplied > plugin for macromedia dreamweaver called visual scriptor for designing > scripts for their SER E2 dialer. It looks like firefox isn''t too keen > on the way the function that grabs the contents of fields from the > call record returns the data. I found that when using > waGetField(''FIELDNAME'') by itself then .strip(), .capitalize() etc (as > well as other trim functions found via google, toProperCase() etc) > error out, but only in Firefox. > > This morning I stumbled across one that was working in firefox: > > $(''question'').update(''Hello, is '' + toProperCase(waGetField(''FIRST'') + > '' '' + waGetField(''LAST'')) + ''there?'') > > The only difference I could see between this and other non-working > bits was that I was adding a space. So I wrote a function that returns > waGetField(field)+''''.strip() and used it in place of waGetField and lo > and behold, .strip(), .capitalize() and all the other regex based > string functions all work in both IE and firefox for me now. > > I realize this is probably more detail than anyone needs since it''s > for such a specialized scenario, but I thought I''d toss it in there > for someone else who uses this software to maybe stumble across in a > google search at some point. > > On Dec 6, 9:29 am, LexNonScripta <lex.non.scri...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > I think we all want to see what you are stripping > > > All things prototype are usually cross-browser, if anything, they > > would fail in IE.. :D > > > On Dec 4, 4:13 pm, Shaitan <atothek...-AilVLgyPuuJBDgjK7y7TUQ@public.gmane.org> wrote: > > > > When using .strip() in firefox I get the following error: > > > > Unable to convert JavaScript value /^\s+/ to Java value of type char > > > file://///Sv010082/cpse2webagent/scripts/javascript/prototype.js > > > Line 375 > > > > It works fine in Internet explorer. Does .strip() not work with > > > Firefox? If not is there a cross browser way to trim? > > > > Thanks.- Hide quoted text - > > > - Show quoted text ---~--~---------~--~----~------------~-------~--~----~ 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 think IE developer's tool bar and Microsoft Script debugger offer something similar! I do have them installed but most my debugging occur in FF :) On Dec 7, 2007 11:54 AM, LexNonScripta <lex.non.scripta@gmail.com> wrote:> > I had problems with unicode string conversions in JS, especially when > stuff like đšžćč are being used.. > > Just a tip: Use FireFox -> firebug for debugging such stuff at > development time. ex.: console.log(toProperCase(waGetField('FIRST')); > this would write the return value to the firebug console. Sounds like > an improper return value to me (/^\s+/ in your error report???) > > You also have a cross-browser firebug at > http://www.getfirebug.com/lite.html, > if you need support for IE and others (they would throw an error if > you use console.log()) > > Sounds like an interesting project... > > On Dec 6, 6:26 pm, Shaitan <atothek...@ignmail.com> wrote: > > Thanks for the interest in my problem. I think I figured it out. It > > wasn't a prototype or a firefox issue. The development I do is > > creating on-screen scripting for a callcenter using a vendor supplied > > plugin for macromedia dreamweaver called visual scriptor for designing > > scripts for their SER E2 dialer. It looks like firefox isn't too keen > > on the way the function that grabs the contents of fields from the > > call record returns the data. I found that when using > > waGetField('FIELDNAME') by itself then .strip(), .capitalize() etc (as > > well as other trim functions found via google, toProperCase() etc) > > error out, but only in Firefox. > > > > This morning I stumbled across one that was working in firefox: > > > > $('question').update('Hello, is ' + toProperCase(waGetField('FIRST') + > > ' ' + waGetField('LAST')) + 'there?') > > > > The only difference I could see between this and other non-working > > bits was that I was adding a space. So I wrote a function that returns > > waGetField(field)+''.strip() and used it in place of waGetField and lo > > and behold, .strip(), .capitalize() and all the other regex based > > string functions all work in both IE and firefox for me now. > > > > I realize this is probably more detail than anyone needs since it's > > for such a specialized scenario, but I thought I'd toss it in there > > for someone else who uses this software to maybe stumble across in a > > google search at some point. > > > > On Dec 6, 9:29 am, LexNonScripta <lex.non.scri...@gmail.com> wrote: > > > > > I think we all want to see what you are stripping > > > > > All things prototype are usually cross-browser, if anything, they > > > would fail in IE.. :D > > > > > On Dec 4, 4:13 pm, Shaitan <atothek...@ignmail.com> wrote: > > > > > > When using .strip() in firefox I get the following error: > > > > > > Unable to convert JavaScript value /^\s+/ to Java value of type char > > > > file://///Sv010082/cpse2webagent/scripts/javascript/prototype.js > > > > Line 375 > > > > > > It works fine in Internet explorer. Does .strip() not work with > > > > Firefox? If not is there a cross browser way to trim? > > > > > > Thanks.- Hide quoted text - > > > > > - Show quoted text - > > >--~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
incidentally, i was thinking about console.log in other browsers the other day.. if 'console' is not defined, couldnt you pop up a window on the first console.log and then use a class method .log to write to a div on that window? effectively mimicing console.log console could be checked & defined as a class from the onload, if it doesnt already exist (ie firebug present) On Dec 8, 2007 10:56 AM, Antonio CS <antoniocs@gmail.com> wrote:> I think IE developer's tool bar and Microsoft Script debugger offer > something similar! > I do have them installed but most my debugging occur in FF :) > > > On Dec 7, 2007 11:54 AM, LexNonScripta < lex.non.scripta@gmail.com> wrote: > > > > > I had problems with unicode string conversions in JS, especially when > > stuff like đšžćč are being used.. > > > > Just a tip: Use FireFox -> firebug for debugging such stuff at > > development time. ex.: console.log(toProperCase(waGetField('FIRST')); > > this would write the return value to the firebug console. Sounds like > > an improper return value to me (/^\s+/ in your error report???) > > > > You also have a cross-browser firebug at > > http://www.getfirebug.com/lite.html, > > if you need support for IE and others (they would throw an error if > > you use console.log()) > > > > Sounds like an interesting project... > > > > On Dec 6, 6:26 pm, Shaitan < atothek...@ignmail.com> wrote: > > > Thanks for the interest in my problem. I think I figured it out. It > > > wasn't a prototype or a firefox issue. The development I do is > > > creating on-screen scripting for a callcenter using a vendor supplied > > > plugin for macromedia dreamweaver called visual scriptor for designing > > > scripts for their SER E2 dialer. It looks like firefox isn't too keen > > > on the way the function that grabs the contents of fields from the > > > call record returns the data. I found that when using > > > waGetField('FIELDNAME') by itself then .strip(), .capitalize() etc (as > > > well as other trim functions found via google, toProperCase() etc) > > > error out, but only in Firefox. > > > > > > This morning I stumbled across one that was working in firefox: > > > > > > $('question').update('Hello, is ' + toProperCase(waGetField('FIRST') + > > > > > ' ' + waGetField('LAST')) + 'there?') > > > > > > The only difference I could see between this and other non-working > > > bits was that I was adding a space. So I wrote a function that returns > > > > > waGetField(field)+''.strip() and used it in place of waGetField and lo > > > and behold, .strip(), .capitalize() and all the other regex based > > > string functions all work in both IE and firefox for me now. > > > > > > I realize this is probably more detail than anyone needs since it's > > > for such a specialized scenario, but I thought I'd toss it in there > > > for someone else who uses this software to maybe stumble across in a > > > google search at some point. > > > > > > On Dec 6, 9:29 am, LexNonScripta <lex.non.scri...@gmail.com> wrote: > > > > > > > I think we all want to see what you are stripping > > > > > > > All things prototype are usually cross-browser, if anything, they > > > > would fail in IE.. :D > > > > > > > On Dec 4, 4:13 pm, Shaitan <atothek...@ignmail.com > wrote: > > > > > > > > When using .strip() in firefox I get the following error: > > > > > > > > Unable to convert JavaScript value /^\s+/ to Java value of type > > char > > > > > file://///Sv010082/cpse2webagent/scripts/javascript/prototype.js > > > > > Line 375 > > > > > > > > It works fine in Internet explorer. Does .strip() not work with > > > > > Firefox? If not is there a cross browser way to trim? > > > > > > > > Thanks.- Hide quoted text - > > > > > > > - Show quoted text - > > > > > >--~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
On Sat, Dec 08, 2007 at 12:02:38PM +1300, Gareth Evans wrote:> incidentally, i was thinking about console.log in other browsers the other > day.. > if ''console'' is not defined, couldnt you pop up a window on the first > console.log and then use a class method .log to write to a div on that > window? effectively mimicing console.log > console could be checked & defined as a class from the onload, if it doesnt > already exist (ie firebug present)http://getfirebug.com/lite.html --Greg> On Dec 8, 2007 10:56 AM, Antonio CS <antoniocs-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > I think IE developer''s tool bar and Microsoft Script debugger offer > > something similar! > > I do have them installed but most my debugging occur in FF :) > > > > > > On Dec 7, 2007 11:54 AM, LexNonScripta < lex.non.scripta-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > > > I had problems with unicode string conversions in JS, especially when > > > stuff like ????? are being used.. > > > > > > Just a tip: Use FireFox -> firebug for debugging such stuff at > > > development time. ex.: console.log(toProperCase(waGetField(''FIRST'')); > > > this would write the return value to the firebug console. Sounds like > > > an improper return value to me (/^\s+/ in your error report???) > > > > > > You also have a cross-browser firebug at > > > http://www.getfirebug.com/lite.html, > > > if you need support for IE and others (they would throw an error if > > > you use console.log()) > > > > > > Sounds like an interesting project... > > > > > > On Dec 6, 6:26 pm, Shaitan < atothek...-AilVLgyPuuJBDgjK7y7TUQ@public.gmane.org> wrote: > > > > Thanks for the interest in my problem. I think I figured it out. It > > > > wasn''t a prototype or a firefox issue. The development I do is > > > > creating on-screen scripting for a callcenter using a vendor supplied > > > > plugin for macromedia dreamweaver called visual scriptor for designing > > > > scripts for their SER E2 dialer. It looks like firefox isn''t too keen > > > > on the way the function that grabs the contents of fields from the > > > > call record returns the data. I found that when using > > > > waGetField(''FIELDNAME'') by itself then .strip(), .capitalize() etc (as > > > > well as other trim functions found via google, toProperCase() etc) > > > > error out, but only in Firefox. > > > > > > > > This morning I stumbled across one that was working in firefox: > > > > > > > > $(''question'').update(''Hello, is '' + toProperCase(waGetField(''FIRST'') + > > > > > > > '' '' + waGetField(''LAST'')) + ''there?'') > > > > > > > > The only difference I could see between this and other non-working > > > > bits was that I was adding a space. So I wrote a function that returns > > > > > > > waGetField(field)+''''.strip() and used it in place of waGetField and lo > > > > and behold, .strip(), .capitalize() and all the other regex based > > > > string functions all work in both IE and firefox for me now. > > > > > > > > I realize this is probably more detail than anyone needs since it''s > > > > for such a specialized scenario, but I thought I''d toss it in there > > > > for someone else who uses this software to maybe stumble across in a > > > > google search at some point. > > > > > > > > On Dec 6, 9:29 am, LexNonScripta <lex.non.scri...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > > > > I think we all want to see what you are stripping > > > > > > > > > All things prototype are usually cross-browser, if anything, they > > > > > would fail in IE.. :D > > > > > > > > > On Dec 4, 4:13 pm, Shaitan <atothek...-AilVLgyPuuJBDgjK7y7TUQ@public.gmane.org > wrote: > > > > > > > > > > When using .strip() in firefox I get the following error: > > > > > > > > > > Unable to convert JavaScript value /^\s+/ to Java value of type > > > char > > > > > > file://///Sv010082/cpse2webagent/scripts/javascript/prototype.js > > > > > > Line 375 > > > > > > > > > > It works fine in Internet explorer. Does .strip() not work with > > > > > > Firefox? If not is there a cross browser way to trim? > > > > > > > > > > Thanks.- Hide quoted text - > > > > > > > > > - Show quoted text - > > > > > > > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
well thats one option, but i already use ie developer toolbar. I really should get around to installing fbl as well On Dec 8, 2007 12:54 PM, Gregory Seidman < gsslist+prototype-dNXPQ6k9rNiG6BJUYyje5axOck334EZe@public.gmane.org> wrote:> > On Sat, Dec 08, 2007 at 12:02:38PM +1300, Gareth Evans wrote: > > incidentally, i was thinking about console.log in other browsers the > other > > day.. > > if ''console'' is not defined, couldnt you pop up a window on the first > > console.log and then use a class method .log to write to a div on that > > window? effectively mimicing console.log > > console could be checked & defined as a class from the onload, if it > doesnt > > already exist (ie firebug present) > > http://getfirebug.com/lite.html > > --Greg > > > On Dec 8, 2007 10:56 AM, Antonio CS <antoniocs-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > I think IE developer''s tool bar and Microsoft Script debugger offer > > > something similar! > > > I do have them installed but most my debugging occur in FF :) > > > > > > > > > On Dec 7, 2007 11:54 AM, LexNonScripta < lex.non.scripta-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > wrote: > > > > > > > > > > > I had problems with unicode string conversions in JS, especially > when > > > > stuff like ????? are being used.. > > > > > > > > Just a tip: Use FireFox -> firebug for debugging such stuff at > > > > development time. ex.: console.log > (toProperCase(waGetField(''FIRST'')); > > > > this would write the return value to the firebug console. Sounds > like > > > > an improper return value to me (/^\s+/ in your error report???) > > > > > > > > You also have a cross-browser firebug at > > > > http://www.getfirebug.com/lite.html, > > > > if you need support for IE and others (they would throw an error if > > > > you use console.log()) > > > > > > > > Sounds like an interesting project... > > > > > > > > On Dec 6, 6:26 pm, Shaitan < atothek...-AilVLgyPuuJBDgjK7y7TUQ@public.gmane.org> wrote: > > > > > Thanks for the interest in my problem. I think I figured it out. > It > > > > > wasn''t a prototype or a firefox issue. The development I do is > > > > > creating on-screen scripting for a callcenter using a vendor > supplied > > > > > plugin for macromedia dreamweaver called visual scriptor for > designing > > > > > scripts for their SER E2 dialer. It looks like firefox isn''t too > keen > > > > > on the way the function that grabs the contents of fields from the > > > > > call record returns the data. I found that when using > > > > > waGetField(''FIELDNAME'') by itself then .strip(), .capitalize() etc > (as > > > > > well as other trim functions found via google, toProperCase() etc) > > > > > error out, but only in Firefox. > > > > > > > > > > This morning I stumbled across one that was working in firefox: > > > > > > > > > > $(''question'').update(''Hello, is '' + > toProperCase(waGetField(''FIRST'') + > > > > > > > > > '' '' + waGetField(''LAST'')) + ''there?'') > > > > > > > > > > The only difference I could see between this and other non-working > > > > > bits was that I was adding a space. So I wrote a function that > returns > > > > > > > > > waGetField(field)+''''.strip() and used it in place of waGetField > and lo > > > > > and behold, .strip(), .capitalize() and all the other regex based > > > > > string functions all work in both IE and firefox for me now. > > > > > > > > > > I realize this is probably more detail than anyone needs since > it''s > > > > > for such a specialized scenario, but I thought I''d toss it in > there > > > > > for someone else who uses this software to maybe stumble across in > a > > > > > google search at some point. > > > > > > > > > > On Dec 6, 9:29 am, LexNonScripta <lex.non.scri...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > wrote: > > > > > > > > > > > I think we all want to see what you are stripping > > > > > > > > > > > All things prototype are usually cross-browser, if anything, > they > > > > > > would fail in IE.. :D > > > > > > > > > > > On Dec 4, 4:13 pm, Shaitan <atothek...-AilVLgyPuuJBDgjK7y7TUQ@public.gmane.org > wrote: > > > > > > > > > > > > When using .strip() in firefox I get the following error: > > > > > > > > > > > > Unable to convert JavaScript value /^\s+/ to Java value of > type > > > > char > > > > > > > > file://///Sv010082/cpse2webagent/scripts/javascript/prototype.js > > > > > > > Line 375 > > > > > > > > > > > > It works fine in Internet explorer. Does .strip() not work > with > > > > > > > Firefox? If not is there a cross browser way to trim? > > > > > > > > > > > > Thanks.- Hide quoted text - > > > > > > > > > > > - Show quoted text - > > > > > > > > > > > > > > > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---