[Javascript] Replacing link text with random string of equivalent size...

Flavio Gomes flavio at economisa.com.br
Fri Aug 6 15:17:25 CDT 2004



Mike, you Thief!!!

  Well, I just finished writing, and, believe it or not, I used almost 
exactly the same stuff.. T.T

  Ben, I'll be mailing you my sollution so you can tell me if was it 
what you wanted and evaluate it, ok?


Mike Dougherty wrote:

> i don't understand the scope of this request.  To make gibberish, why 
> not just replace the existing text with some transformation of it.  To 
> reduce the concerns about round-tripping, just store the original 
> content so you can easily replace it.
>
> <div onMouseover="gibberish(this)" onMouseOut="restore(this)">
>   original text
> </div>
>
> gibberish(obj) {
>   obj.originalContents = obj.innerHTML;
>   obj.innerHTML = [[some means of mangling the contents- possibly 
> using .replace() iteratively]]
>   }
>
> restore(obj) {
>   obj.innerHTML = obj.originalContents;
>   }
>
>   For some really interesting effects, put these mouseovers on all the 
> container objects on the page.  I'm not really sure what you'd be 
> illustrating with this, but once you have it working the way you want, 
> post a link to it so we can see it.
>
>
> On Fri, 6 Aug 2004 12:18:50 -0400
>  Ben Mauer <me at telephag.nu> wrote:
>
>> Hi all,
>>
>> I have a challenge for the community here. I need a possibly simple, 
>> possibly complex, but definitely not common JavaScript.
>>
>> Basically, I'm making a website for an exhibition and symposium on 
>> the power and pathologies of networks, with a focus on computer 
>> viruses / viral outbreaks. Here's an early mockup...
>>
>> http://www.watsoninstitute.org/infopeace/ppn/mockups/ppn7.html
>>
>> I want a JavaScript that basically takes paragraph text, links, 
>> whatever -- and on rollover, replaces it on-the-fly with an 
>> equivalent number of random characters and numbers with a roughly 
>> equivalent amount of spaces (basically gibberish -- what an Arabic or 
>> Chinese language site looks like when you don't have the proper 
>> font). When the user moves their mouse out of the particular piece of 
>> text (contained by paragraphs or h3 tags or whatever), it's replaced 
>> with the original text. I imagine this will take some serious mucking 
>> about and parsing in the JavaScript DOM. Though, if it were just 
>> links, perhaps the scope of the problem would be less?
>>
>> The general idea is to give the impression that the site is in flux, 
>> you could mess it up at any moment, ultimately expressing the 
>> delicacy and manipulability of data.
>>
>> I'd need the script in by next Wednesday (August 11), preferably 
>> sooner. I can offer a small amount of money (in the realm of $50 to 
>> $150 depending on the scope of the problem).
>>
>> Some articles I think might help get his/her juices flowing:
>> http://www.felgall.com/jstip42.htm
>> http://www.mediacollege.com/internet/javascript/number/random.html
>> http://www.quirksmode.org/dom/domparse.html
>>
>> Thanks,
>>
>> Ben
>>
>> -- 
>> Ben Mauer
>> Sole Proprietor, Mantled
>> ben at mantled.com
>> 617.283.5764
>> AIM telephag
>



More information about the Javascript mailing list