Table Toggle...
|
Mar. 29, 2009, 05:33 PM
Post: #1
|
|||
|
|||
Table Toggle...
running the latest sidki set and having difficulty wrapping my fingers around a toggle...
i've "captured" a nested <table...</table> into a \0 variable... what would my replacement line be to toggle that \0 ??? |
|||
Mar. 29, 2009, 08:04 PM
(This post was last modified: Mar. 29, 2009 11:08 PM by lnminente.)
Post: #2
|
|||
|
|||
RE: Table Toggle...
That's what i use
Code: <a class=\5 href="\3" title="\4\=\9" onclick="this.parentNode.innerHTML=unescape('$ESC(\0)');return false">table</a> |
|||
Mar. 29, 2009, 09:16 PM
Post: #3
|
|||
|
|||
RE: Table Toggle...
you LOST me!!! big time...
let's start over... i have a web page that contains this source code: Code: <table width=100% border=1 cellspacing=0 cellpadding=10 bordercolor=222255> i'm matching the code with this web filter: Code: Name = "Toggle Table Test" i need the Replace = line for the filter that will insert that table where i can toggle it on and off, where it is off by default... |
|||
Mar. 29, 2009, 11:03 PM
(This post was last modified: Mar. 29, 2009 11:12 PM by lnminente.)
Post: #4
|
|||
|
|||
RE: Table Toggle...
Then i suppose is only take some code from the yahoo filters you maintain...I don't have proxomitron installed here.
I edited my above post to don't confuse this thread... |
|||
Mar. 30, 2009, 10:10 AM
Post: #5
|
|||
|
|||
RE: Table Toggle...
it's unfortunate that you edited that post, but all is good...
it's your href="\3" line that is the "you lost me" bit... nowhere in the filter (which is now no longer there for readers to reference), nowhere is \3 "defined"... |
|||
Mar. 30, 2009, 11:14 AM
(This post was last modified: Mar. 30, 2009 11:14 AM by sidki3003.)
Post: #6
|
|||
|
|||
RE: Table Toggle...
(Mar. 29, 2009 08:04 PM)lnminente Wrote: Using $ESC with potentially huge strings is apparently critical. I got "unexpected" results when trying to do that with an early version of the "display cookies" filter. You could store your "to be innerHTMLed" data in another element, e.g. textarea. Another way is to let the toggle switch the table's display. "MozillaZine: Alternate Display" is a good example but possibly not easy to read, so... For the sake of simplicity let's assume that the "bordercolor" value is your identifier. Your example isn't rendered as table because text content must be within TD's, so, test code: Code: <table width=100% border=1 cellspacing=0 cellpadding=10 bordercolor=222255> Code: [Patterns] |
|||
Mar. 30, 2009, 12:00 PM
Post: #7
|
|||
|
|||
RE: Table Toggle...
eureka! thanks!!
it was the MozillaZine that i was trying to reverse-engineer... but it was kind of hard to follow, +'s and ++'s tend to lose me many thanks... |
|||
Mar. 30, 2009, 01:11 PM
Post: #8
|
|||
|
|||
RE: Table Toggle...
PR, that is a general replacement i use. Don't worry for href="\3" while javascript is enabled, it will be used only when javascript is disabled, but yes, for table it isn't needed.
Sidki, it seems the conversion proxomitron does is not the same than javascript, i noticed it with the accute with the spanish vocals (áéíóú). As you said for cookies is not recommended, but maybe is not for the size but because of the different conversions. Code: You could store your "to be innerHTMLed" data in another element, e.g. textarea. |
|||
Mar. 30, 2009, 01:42 PM
Post: #9
|
|||
|
|||
RE: Table Toggle...
(Mar. 30, 2009 01:11 PM)lnminente Wrote: Sidki, it seems the conversion proxomitron does is not the same than javascript, i noticed it with the accute with the spanish vocals (áéíóú). Yes, Proxomitron's $ESC() is escaping way less then JS escape(). Quote:As you said for cookies is not recommended, but maybe is not for the size but because of the different conversions. Seemed to me being the amount of data, because now that i've split the cookie string, using $ESC() on each fragment, it works (so far). Quote: Like so: Code: <html> |
|||
Mar. 30, 2009, 05:53 PM
Post: #10
|
|||
|
|||
RE: Table Toggle...
(Mar. 30, 2009 01:42 PM)sidki3003 Wrote: Seemed to me being the amount of data, because now that i've split the cookie string, using $ESC() on each fragment, it works (so far).If you splitted the cookies, then you maybe removed the ;. After you telling it i went to the test window and i did a $UESC($ESC(a ; b)) , the result is a%20;%20b If i'm right this is bad, it should be "a ; b" again Thanks Sidki i don't know javascript, all i do is comparison and modifications from one code to another. So, I modified your code moving it to onclick and returning false to be able to use href. It is useful for me for replacing banner links to be able to click on it when javascript is disabled. It would be: Code: <div id="original_\0" style="display:none">\8</div> -\8 is the original content matched by the filter There is a worst problem now: we download the content of the original div, and i'm not sure if we could escape and unscape it using javascript. |
|||
Mar. 30, 2009, 07:18 PM
Post: #11
|
|||
|
|||
RE: Table Toggle...
(Mar. 30, 2009 05:53 PM)lnminente Wrote:(Mar. 30, 2009 01:42 PM)sidki3003 Wrote: Seemed to me being the amount of data, because now that i've split the cookie string, using $ESC() on each fragment, it works (so far).If you splitted the cookies, then you maybe removed the ;. After you telling it i went to the test window and i did a $UESC($ESC(a ; b)) , the result is a%20;%20b If i'm right this is bad, it should be "a ; b" again I don't remember. Anyway, i've just checked that filter again. My current (non-public alpha) version doesn't use $ESC() any more at all. So probably there was a reason... Quote:There is a worst problem now: we download the content of the original div, and i'm not sure if we could escape and unscape it using javascript. That depends on the actual tags *and* browser. Nonetheless, it's an issue, and that's where <textarea> comes into play (code then being stored in myTextarea.value, not being rendered). IIRC it's slightly more complex. I think i've also seen this method being used in a "toggle Flash" post by z12, on this forum. |
|||
Mar. 30, 2009, 07:39 PM
(This post was last modified: Mar. 30, 2009 07:40 PM by ProxRocks.)
Post: #12
|
|||
|
|||
RE: Table Toggle...
(Mar. 30, 2009 07:18 PM)sidki3003 Wrote: I think i've also seen this method being used in a "toggle Flash" post by z12, on this forum. correct... i've been using the method (with off-and-on success) to prevent connections from being made on items not yet toggled on... which, if memory serves, is only an ie|shell issue... i seem to recall that Firefox handles that better, don't remember on Opera... and have done extremely limited testing with Chrome and Iron... |
|||
Mar. 30, 2009, 08:21 PM
(This post was last modified: Mar. 30, 2009 08:31 PM by lnminente.)
Post: #13
|
|||
|
|||
RE: Table Toggle...
I think to remember FF doesn't download hided flash objects, but hided images are downloaded.
Code: [Patterns] |
|||
« Next Oldest | Next Newest »
|