[mochikit] button to come back to previous page

2008-07-15 Thread anna1980

hi
i'm working in application which use the library Mochikit; what i need
to do is adding one function to one button to make him also  go back
to page the user come from (something like history.go(-1))
the button is:
close_btn = SPAN({class: button close_run}, bouton1),

and what he is doing now is this:

connect(close_btn, 'onclick', function(){
addElementClass(close_run_btn, 'hidden');
removeElementClass(close_info_div, 'hidden');
findChildElements(close_info_div, [input])
[0].focus();
});
actually i don't understand what he is doing now to be able to add
other function.
can somebody help me to understand better

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



[mochikit] Re: button to come back to previous page

2008-07-15 Thread machineghost

addElementClass(close_run_btn, 'hidden');
This line is basically the same as saying:
close_run_btn.classNames +=  hidden;

removeElementClass(close_info_div, 'hidden');
This line uses a method that is the reverse of the last one:
close_info_div.classNames.replace(hidden, );

findChildElements(close_info_div, [input])[0].focus()
This line could be split in to two:
var childElements = findChildElements(close_info_div, [input]);
childElements[0].focus();
and then you could replace the first line with something like:
var childElements = close_info_div.childNodes;
var inputChildElements = [];
for(var i = 0;  i  childElements.length; i++) {
if(childElements[i].tagName == input)
inputChildElements.append(childElements[i];
}
 childElements = inputChildElements;


So, in other words, line 1 adds the hidden class to close_run_btn.
Line 2 removes that same class from close_info_div.  Line 3 finds
changes the browser's focus to the first INPUT element that is a child
of close_info_div.  If you wanted to add go back functionality to
you're code, you'd just need to do:

connect(close_btn, 'onclick', function(){
addElementClass(close_run_btn, 'hidden');
removeElementClass(close_info_div, 'hidden');
findChildElements(close_info_div, [input])[0].focus();
history.back();
});

But that would be sort of silly; what's the point of adding/removing
classes and changing the focus if you're just going to send the user
to a different page?

Hope that helps.

Jeremy

On Jul 14, 8:12 am, anna1980 [EMAIL PROTECTED] wrote:
 hi
 i'm working in application which use the library Mochikit; what i need
 to do is adding one function to one button to make him also  go back
 to page the user come from (something like history.go(-1))
 the button is:
 close_btn = SPAN({class: button close_run}, bouton1),

 and what he is doing now is this:

 connect(close_btn, 'onclick', function(){
 addElementClass(close_run_btn, 'hidden');
 removeElementClass(close_info_div, 'hidden');
 findChildElements(close_info_div, [input])
 [0].focus();
 });
 actually i don't understand what he is doing now to be able to add
 other function.
 can somebody help me to understand better
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
MochiKit group.
To post to this group, send email to mochikit@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/mochikit?hl=en
-~--~~~~--~~--~--~---



[mochikit] MochiMedia looking for Web Developers

2008-07-15 Thread Bob Ippolito

If you're reading this list, we know you use MochiKit, so how about
coming and working with the team that developed it in the first place?
 We're looking for a Senior Web Application Developer experienced
using Python, Pylons, MochiKit, SQLAlchemy, etc.  Here's a short job
description.  Reply back to [EMAIL PROTECTED] if you're interested!

Senior Web Application Developer for Mochi Media

We're looking for a Sr Web Developer to build out applications in
Python to support our network of Flash game developers. The ideal
candidate has 5+ years of experience building applications for large
web brands, loves to iterate designs, gets agile development, and is
unafraid of diving into any area the problem leads him/her to. You
should have opinions on programming languages, frameworks and styles,
yet be versatile enough to use any of them. CSS/DHTML/AJAX pour out of
your mind and into code as fast as you can type it. If I've described
you, let me now describe us.

Mochi Media is a fast growing startup based in San Francisco. We build
a platform for Flash game developers with in game advertising as a key
focus for the developers. We just closed our series B round, and we're
looking to ramp the company quickly. We're a small team with a very
high bar for the types of people we'll bring in led by me (CTO and
co-founder) and Eric Boyd our VP Eng.

Mochi Media key stats
20% impression growth every month for almost a year.
60MM unique users every month.
Strong and rapidly growing revenues.
Small team where you can come in and have an immediate impact

-bob

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