joe t. wrote:
i agree on that. setValue has its purpose pretty much in the name.
Set the value of a control. For checkboxes, setChecked
(bool) (also applying to radios?) would have made a lot more sense.
Yes, it does apply to radios to. It's a shame that the docs aren't
clear on this
Hi,
I just bumped into a weird bug in my code.
The thing is, that I am trying to update value of several checkboxes
with a value received in a result of ajax call.
Anyway, I have following construction:
input name=someName class=APP_CHANGELOG_LOG_ID value=
type=checkbox/
The checkboxes are
Hi,
I found where is the problem.
I assumed, that the Form.Element.setValue method sets the value of an
element.
In case of checkboxes that is not true.
The method changes the state of checked/unchecked instead, and leaves
the value attribute unchanged.
The example might be found here:
skaiuoquer pisze:
disccomp, Richard, Alex; thanks for your replies.
The problem with minified compressed versions is that they will never
get cached on the client side.
I mean, they will, but you will still be sending them each one of the
different combinations--so instead of loading
Alex McAuley pisze:
I am not trying to validate javascript with the validator lol...
My page includes it .. and having src=. is bad coding practise due to
parralell downloads ... i munge all the javascript together into one script
and compress it all before output - this is not the
Jeztah wrote:
Good morning
I have a site that can be heavy server load and decided to try and
take out some filtering on a page..
Example. I have a page with a table of search results and would like
to be able to put client side searching (ala Crtl+f on firefox)
What i would
Hi,
I just tried to put a json object inside an attribute an I bumped into
an issue with String#escapeHTML().
The method does escape all the ampersands and the greater/less than
signs, but it does nothing to the quots.
This make the method completely unusable for writing attributes (for
T.J. Crowder wrote:
Hi,
String#escapeHTML escapes HTML. Double quotes, single quotes, and
newlines are all valid in HTML, so IMHO it's out of scope for
escapeHTML to escape them. FWIW, I'd say the requirement you're
describing is specific enough to you that you should probably just add
Chris Sansom wrote:
I'm curious about the recent discussion that's arisen as a sideline
from the 'Creating new lines and bypassing them through escapeHTML'
thread.
I've been using Prototype for a little while now (though not
Scriptaculous - yet!). I'm not by any stretch of the
Matt wrote:
Hi Alex,
Still didn't work for me :( Just produced broken HTML output again.
If your html code is not broken on inside of php variable, then it
won't break anything inside json_encode;
[code]
?php
$html = '
div id=someIdthis is correct html
span
Jeztah wrote:
Morning...
Very silly and easy question but my brain isn't working today
How can i get the last row of a table (table id=foo) ...
The row is inserted dynamically via an ajax request so its not on the
page at load time!.
$('foo').select('tr:last');
Unlike jQuery,
louis w wrote:
This is what I ended up doing:
if (_is_ie) {
// IE Only focus/blur event listeners
f.observe('focusin',
this.onFocus.bind(this));
ioustinos wrote:
I have been using scriptaculous in one application of mine.
Everything runs smoothly.
Then i added the builder.js and changed the inclusion line into this
script type=text/javascript src=js/scriptaculous.js?
load=effects,dragdrop,controls,builder/script
Just a guess, but
Bertrand wrote:
Thanks for your kind answer, it did help a lot.
It should help, as it tells you are looking for the problem in wrong
place. Try to look for the problem in your own code and not blame
prototype.js when you're not sure.
I think the problem you might have is the lack of DOCTYPE
SamuelXiao wrote:
I am writing an application using prototype.js and dialog.2.0.js
(http://roland.devarea.nl/dialog/#e6) the iframe effect. But I
encountered a problem when I try to fitting it into my application.
What I want to do is that when a user click a href=#
id=dialog_1Show Iframe/a
Diodeus wrote:
[...]
In another situation, I need to pass parameters to the callback. So
would I do it this way?
var temp = handleCompletion(5)
wrapAjaxUpdater('showsomething.php?id=5', 'somediv', temp);
That still is not correct. This would assign the *result* of the
handleCompletion
swdean wrote:
I am quite new to coding and I am trying to show div in case js is
disabled
the reason is because I set it to display: none
You should do it completely otherwise.
Show div always, and hide it if javascript is enabled.
div class=hideOnLoad
/div
script type=text/javascript
swdean wrote:
Hey thank you guys
I am gonna do a bit more homework on this
Thanks for the tips for now!
:)
You should read about the techniques of progresive enhancement and
unobtrusive javascriot.
The first one stays, that a website should be one hundred percent usable
without any
Diodeus wrote:
I'm building the following array:
var ax = []
ax['aaa'] = 1
ax['aab'] = 2
ax['aac'] = 4
ax['aad'] = 6
I would like to loop though all of the values in this array.
[...]
What am I doing wrong here?
You use an Array while you should use either Hash, or plain
Matt Foster wrote:
[...]
To address the wrong order issue, you could create a queue of
requests such that each request is asynchronous but stacked such that
it will not be sent until the previous request has returned. I've
written something for this for prototype 1.5 as Ajax.RequestQueue
2009/3/20 Jeztah webmas...@thecarmarketplace.com:
After a little playing ove the last couple of days i came up with a
nice easy way of shrinking many js files on the fly into 1 file ...
this will speed up load time heavily on heavy javascript loaded
sites . the code is php and is very
Hi,
We had used a patched 1.6.0.2 prototype version for some time now.
I had little time to upgrade to 1.6.0.3, cause I needed to patch and
test the patched version before using it. I decided to do it now.
The only thing I patched was getDimensions() method, as I didn't know
at the time that
Hey,
input onclick=firePrototypeEvent(document.getElementById
('example5'),'event_2'); value=fire event_2 type=buttonbr
You can only fire custom event that is namespaced, that is: contains a
prefix and : sing. Eg. 'myEvents:event_2'. You also need to specify
the prefix when observing.
Lee Jenkins wrote:
Hi all,
I'm trying to implement a scrolling table myself since my needs are very
simple.
I'm placing the table that represents the grid cells within a div with
overflow:auto set and it scrolls. However, IE and FF seem to calculate the
width differently in
kevin wrote:
i just wanted to download page. page has script tags. download page
with result of this script. i've made it. but there is a problem. i
can't do that from my subdomain. only on MY domain. how can i break
it?
You can't. This is a security limitation of browsers.
You can read
Alex Mcauley wrote:
global how .. that doesnt really explain much
If you mean globaly accessible to javascript then you need to do something
like
?php
$bar='bar';
echo(scriptfoo=$bar/script);
?
marioosh, you also need to properly quote strings, or convert php
variables to
marioosh wrote:
Explaining [sorry for my english ;)]:
I need $var that is object of some class, and
$var will point to the same object in test1.php, test2.php,
test3.php ...
where: test1.php, test2.php ... are scripts that will be used in new
Ajax.Request(...
I need something like
Alex Mcauley pisze:
Quoting does not allways matter when setting javascript vars ...
Plus not every version of php has json_encode() installed on it
Yeah, your right. To much of intranet coding, when you know exactly
what you have on server, and if there's something you need and it's
not
28 matches
Mail list logo