[Q] Javascript & Action URL Related Question

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[Q] Javascript & Action URL Related Question

Chun, Sungjin
Hi,

To enhance speed of my web application, I want to reduce page size. To reduce
page size I want to make following javascript as a single function.

param1 = ['_s=nsiCHDqaecXwoNLR', '_k=SooWVgiu', '18'].join('&');
param2 = ['_s=nsiCHDqaecXwoNLR', '_k=SooWVgiu', '17'].join('&');
itemID = 'id_recent';

new Ajax.Updater('kData', 'http://localhost:9090/seaside/nim', {
    'onComplete': function() {
        setTimeout(function() {
            new Ajax.Updater('kData', 'http://localhost:9090/seaside/nim', {
                'onComplete': function() {
                    new Effect.Highlight('kHeader');
                    $('kTags').childElements().each(function() {
                        $(arguments[0]).removeClassName('itemSelected')
                    });
                    $(itemID).addClassName('itemSelected')
                },
                'evalScripts': true,
                'parameters': param1
            })
        },
        100);
        return false
    },
    'evalScripts': true,
    'parameters': param2
})

the parameters of function will be: param1, param2 and itemID. As you can see this
is generated script of Scriptaculous from Seaside but my application emits so many of
this script, if I can reduce this script string as 'update(...)' I can enhance page drawing
speed up to 60 times!.

My question is how can I get ths param1 and param2? It seems that _s and _k parts could
be gotten with actionUrl method, but I cannot figure out the '18', '17' like part.

Thank you in advance.


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside