[Lift] Re: Additions to JqJsCmds

2009-01-21 Thread Joachim A.

Viktor,
thanks for your note about IE6 and 7 so I'll avoid replacing tables, etc.
Without IE the IT world would be better place ;)

Did ReplaceWith work well for things like div and span?

(I just noticed net.liftweb.http.js.jquery.JqJE.JqRemove, so Remove is already 
available.)

Joachim

 My experience with replaceWith has been troublesome at best.
 IE6 (and in some cases IE7) crashes when trying to replace certain
 elements.

 I was able to work around it by only replacing the contents of ceertain
 elements.
 (TR, TABLE, THEAD etc cause intermittent IE6 crashes when replaced)




--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Additions to JqJsCmds

2009-01-21 Thread Viktor Klang
replaceWith works well with div but can sometimes choke on span if the
span is not closed correctly.

My solution was:

Send the attributes you want for the specified element, then alongside of
it, include what contents you'd like that element to have. (This gives the
effects of replaceWith, but without the possibility to cahnge tag-types)

consider:

div id='X'Foo/div

now, if the server'd like to make that div not displayed and make it contain
'Bar' instead, it'd send something that'd evaluate to something similar to
the following:

$(# + upd.update['id']).css('display','none').html('Bar')

I hope I make _any_ sense, I'm high on caffeine and am stressed like a
shaved pig.

/Viktor

On Wed, Jan 21, 2009 at 2:13 PM, Joachim A. wallaby.po...@googlemail.comwrote:


 Viktor,
 thanks for your note about IE6 and 7 so I'll avoid replacing tables, etc.
 Without IE the IT world would be better place ;)

 Did ReplaceWith work well for things like div and span?

 (I just noticed net.liftweb.http.js.jquery.JqJE.JqRemove, so Remove is
 already
 available.)

 Joachim

  My experience with replaceWith has been troublesome at best.
  IE6 (and in some cases IE7) crashes when trying to replace certain
  elements.
 
  I was able to work around it by only replacing the contents of ceertain
  elements.
  (TR, TABLE, THEAD etc cause intermittent IE6 crashes when replaced)




 



-- 
Viktor Klang
Senior Systems Analyst

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---