under FF it works great, but under IE test1 cause error. It looks like
because one field are named position.
All CSS properties (well, those without hyphens) are implicitly
members of the `style` object in JS.
While this does not make CSS props reserved words in all contexts --
for
I want a fallback to the request in case the script is run not by url
but with open file from the browser, so i need to know if the request
is working or not
Without questioning the need to handle errors from Request in general,
I think you should trap the fact that you're running from
getPayoff.send(valsJSON);
send() takes as its (optional) argument an Object with the options for
the Request (including the data: property). Or, for legacy
compatibility, it accepts a prepared Query String-formatted string
with keys and values.
Looks like you passed it
var testJSON = {'min': 'blah', 'max': 'blah', 'betMin': 'blah'};
Yep (tho' at that point you're nearly creating the JSON string
yourself... I tend to not to quote key names but let the encoder do it
when needed for transit).
--Sandy
now, how would I combine objects? Sorry... I'm very new to all of this
and can't seem to find the answers when searching on my own.
var myObj = new Hash({min: 'blah', max: 'blah', bet: 'blah'});
var myObj2 = new Hash({plus: 'bloo'});
var setJSON = JSON.encode(myObj.combine(myObj2));
Note
Thanks! So can I just remove them?
Of course. They are extraneous. I think in JS2 it is supposed to be
very clear that they are allowed, so IE will not choke anymore once MS
says they're JS2-compatible, whenever that may be. I've never felt
disappointed at being denied this
I have a json string: Foo.Bar.Something
I'm trying to add an object to Something
[{someguid:somevalue}]
That's an Array with an Object at index 0, not a String -- which is
good, since you are running push() on it.
Foo.Bar.Something.push({someobject:someotherobject}), it fails:
missing :
I can see your point in a perfectionist sense, I think you idea is
the best way to do it. But from a pragmatic point of view I don't
have any problem with my original set up in firefox/webkit etc. I
have never had any problems telling people if you change the image
size then refresh
I know... but something error.
OK, what error?
Do you have an example page we can look at?
--Sandy
Pls write a code for MOOTOOLS 1.1
You need to put up a sample page.
The reason people are meandering into discussions of each v. explicit
loops, etc. is that we've given you all the working snippets we can
without a closer look at your actual environment.
--Sandy
reset.css?
To scratch default/classless styles back to known values across all
browsers.
--Sandy
Ok.. Is this a javascript of some type? is this a simple cut-n-paste
or do I need to build something?
Google it... there are few different takes on it, but it's all CSS (by
definition), not JS.
--Sandy
In fact the mistake was on the PHP. I solved it by strip the slashed
first to have a proper PHP array.
$json1 = json_decode(stripslashes($_GET[json]));
Someone please correct me if using the wrong path.
Yes, it stands to reason that if you are using magic quotes (which are
=
...
--Sandy
Sanford Whiteman, Chief Technologist
Broadleaf Systems, a division of
Cypress Integrated Systems, Inc.
e-mail: sa...@cypressintegrated.com
) a String. It isn't just an extension of arbitrary
character data. Also, not for nothin':
http://java.sun.com/j2se/1.4.2/docs/api/java/net/URI.html
--Sandy
Sanford Whiteman, Chief Technologist
Broadleaf Systems, a division of
Cypress Integrated Systems
- An URI is a string, despite its special arrangement of characters and
set of rules.
Hmm, isn't that kind of self-definition, though? To me, a URI is, if
it is any one non-OO thing, a struct with enum, and char[] members
(and some const members for the separators). It isn't just a
In an attempt to move up from the JavacScript dark ages, what would be
the correct mootools way to implement such functionality?
May I be so bold as to suggest that the BCP is pure CSS? What are the
special behaviors that you need beyond CSS :hover? (Not saying there
aren't some things you
Simplest solution is to add css display: none or visibility:
hidden, show overlay maybe with some animated gif and then display
everything with mootools on domready. But if user has turned on css
and not JavaScript - he will never see anything. And I prefer to
give him full
At the very least the *index* shouldn't be done in the client (which was my
point earlier).
Mmm, yes... and I think that unless the client-side search is built as
a Moo class/es, rather than including someone else's JS search code
(which may in fact be very well-written, just not
...or keep working on it.
Wouldn't bother -- you can't use expressions in object literal keys.
--Sandy
I just need the return false part for links, and having to keep
creating functions manually seems unnecessary.
The preferred way to do this for events is to use stop().
There are lots of ways to coerce a false result, though.
this.doSomething false
this.doSomething() == {}
this.doSomething false
typo, s/b doSomething()
I know how to do it, but I'm asking if there's a built-in way to do
this:
addEvent('click', this.doSomething.returnFalse(this));
addEvent('click',doSomething).addEvent('click',$lambda(false));
The default behavior will be canceled even if doSomething() returns
true. This conforms with
why is typing return false so much work?
It's definitely not if you have control over the bound method, but I
think the OP is going for a way of deadening the final default action
when the bound method can't/shouldn't be altered, and without wrapping
it in another method
--Sandy
I'd argue that it's a better pattern to have a handler method that calls the
other method. It's more transparent that this is what it's doing than adding
a lambda function that returns false.
Well taken, but the example for $lambda in the docs uses it for
exactly this purpose. :P
By
addEvent('click',function(){return f() false;})
amounts to the same thing.
I know it's the same as
f(); return false;
but it might be more easily interpreted as wrapping the function and
its forced-false return in one, and that's closer to what the OP was
wondering about (the
Am I missing something or does this seem to be counter intuitive?
if (!!window.myClass) ...
!! coerces the the value to real boolean, which I like better than
leaving it falsy/truthy.
--Sandy
I haven't got the faintest idea about how to solve this problem.
Instantiate the MultiBox before you resize the right nav bar.
--Sandy
When adding the MultiBox domready event, just put it inside the
existing domready block. Don't add another separate event, as I could
get different results due to browser event order.
window.addEvent('domready', function(){
new MultiBox('mb', {descClassName:
This really is quite pesky. Maybe why I don't like to put my trust in
lightbox scripts to fit in just anywhere (not that I've written my own
or anything).
Okay, new approach. Go back to Phatfusion's original lightbox scripts
(undo prev changes), then:
[1] Comment out the following line from
Hey!, in ie7 it's working perfectly. No problem at all. However, in
opera10 ff, the page size and lower margin issue is solved, but the
overlay is displaced about 15 px upward leaving an uncovered area at
the bottom of the page, and also, in ff, the page geets a horizontal
scrollbar, when
What is weird is that on the page displayed I don't use mootools but
firebug says the error comes from mootools.
If you load MT.js on this page, you are using MooTools enough
--Sandy
I'm feeling a little bit stumped but is there a way to use a
variable's content as a Hash key?
Not in an object literal.
But it will work inside [] notation.
--Sandy
Is there a better way to do this? And is there a way I can start or
stop the default event of a link?
Some people might have different ways, but if I am disabling a regular
a link that doesn't have anything but the default event, I don't
bother with adding more events just to dampen
I also tried [this.options.type'+Id'] which results in: invalid
property id
Can't use variables on the left-hand-side in an object literal. This
came up the other day as well... you need to use [] bracketed notation
(which you did).
There's always a way (not that you have the time!) to
This bug was due to name=send in the submit input field.
Is this the expected behavior?
Mm, makes sense to me. The name attribute is vital to form fields, and
the type=submit are sent along with the form, so they have to exist
in the DOM as children of the form. That's the same level at which
So I added some delay to wait until the images are loaded. But I
dont feel like this is a good practice.
Considered using 'onload' for the img tag?
I can't load the images through Javascript as they come with other
information that has to be processed by the controller
I want that when the user reloads the page it goes to www.server.com/contact
and not www.server.com/home.
You cannot change the hostname or path that would be reloaded
without actually reloading the document. In other words, you cannot
rewrite the main content of the location
for (p in this) {
if (i == index) {
return this[p]; ...
Like Eneko said, isn't there a theoretical prob in that the insertion
order is still not guaranteed to be the enumeration order per ES
standard? (Tho' I know the major browsers seem
Any help will be very appreciated.
I just tested this in a real copy of IE6 SP2 and it worked fine.
--Sandy
Well, thank you Sandy :).
Thank *you* for reminding me of why I don't abandon my real IE 6 test
box. :)
(Though just last night I rolled out our first you're running IE 6
and will only have accidental feature support after the end of 2009
popup, and I'm waiting for the calls tomorrow.)
On one of my projects with IE6 when dynamically changing the image I had to
delete the element from the dom and create a new element and insert it back
into the dom, a royal pain but it did work.
There isn't any error when Cristian's code runs in real IE 6 SP2 (not
a synthetic/hacked binary
It works for click and mouseenter events on al major browsers with
the exception of IE6. Al least where I've tested it.
The actual problem is that you are including pngfix.js (note how your
envt and mine can differ in big ways!).
While its aims in fixing transparency may be noble, the
I have tried $_GET and $HTTP_GET_VARS.
If you POSTED the form, the superglobal is $_POST.
--Sandy
The site we are building is run mostly on AJAX, however on some
systems, it seems that ALL ajax requests are blocked.
Possible. The X-Requested-With header could be used to filter the
outbound request. Off the top, this would be the most primitive means
of detecting AJAX traffic, if
this.effects.smoothScroll = new Fx.SmoothScroll({
wheelstops : false
Are you sure you don't want Fx.Scroll?
--Sandy
I mean, with the same code, the br / makes a line break in IE but
not in FF. Have you gor an idea on this ?
Make sure you are serving an appropriate MIME type. If truly the
*only* diff in content between these pages is that you are sending an
XHTML BR / vs. an HTML BR, that is the
...
var aClass = new myClass();
$(aClass).inject('someId');
When I copy-and-paste your exact code, I have no problem with the
$(aClass) call getting a handle to the div.
Dunno... sure you're including the right version of MT?
--Sandy
Sanford
The image is present within every other browser
Not in Opera 9...
but when hovered over it is not
present in IE. Although, when I do a print preview in IE the images
are there, maybe an IE conditional script is needed? any help would
truly be appreciated thanks for you help in advance
Devitodesign.com- All is working fine, there is just a popup when
clicked within any browser that says undefined the script is suppose
to function as a navigation but apparently even the example doesnt.
You have onOpen:
function(e,i){alert(e)};
The ImageMenu core is calling
In all honesty sandy, Im not very fluent in mootools
Heh, I'm a joke compared to most of these guys myself. :)
me an example? I understand its looking for an href I dont understand
the last part bind()
Using bind() allows you to change the object referred to by `this`
within a
Unfortunately I tried to implement that but I still get the same
undefined popup, I also tried to change the structure of the html to
no avail, any other suggestions, and thanks for all the help you put
in
Show me the page on which you still get the undefined popup but you
do have an A.href
Try this: http://demos.greghoustondesign.com/piechart/
Note: no worky under IE 8 native.
--Sandy
Sanford Whiteman, Chief Technologist
Broadleaf Systems, a division of
Cypress Integrated Systems, Inc.
e-mail: sa...@cypressintegrated.com
Put IE8 in IE7-emulation mode. Same piece of junk anyway.
Hey, c'mon. I'm not talking about me. Putting something on a public
site (without the IE7 meta hint) and expecting that users will
simply switch their browser to emulation mode instead of going away
from the site is bad
That's what I meant. We're all dev's so I've only assumed it was
obvious.
Well, if it were that obvious, wouldn't the widget's demo page force
emulation? :P
IE8 has a little user-base, ergo it's better to throw it in emulation
mode instead of trying to waste time on developing for three
Unfortunately I tried to implement that but I still get the same
undefined popup, I also tried to change the structure of the html
to no avail, any other suggestions, and thanks for all the help you
put in...
Joe, you removed the href attribute in your most current markup, so
obj.options.onOpen(this.firstChild.firstChild.firstChild.href, i);
Yes, although at a certain depth it makes more sense to use
getElement() on the LI. With the fixed, shallow depth of the original
markup using firstChild was clear... I think it gets less clear here.
--Sandy
Okay so I did that and upon doing that I get a popup that no longer
says undefined but it says the name of the site www.example.com that
the href is referring to
Yep, because the click handler is set to alert() only! If you want to
jump to the page, location.href=
--Sandy
as per your advice, It works so assume I did it right?
Yep.
--Sandy
I don't know how to say this, but hopefully you guys understand what I'm
trying to say. I tried to search on the list but could not figure out the
proper keyword for searching it.
Check Element.Pin in -More?
http://mootools.net/docs/more/Element/Element.Pin
--Sandy
Problem with imageMenu, It doesn't show images.
As far as I can tell I have everything uploaded to the server that I
need, imagemenu seems to be working, links to other pages in place but
ni images.
Your images use file:// urls.
--Sandy
Sorry to be a pain but new to all this, can you expand a bit, should
the images use something else?
Of course! http:// URLs are standard to access assets over the web, by
definition.
file:// URLs will only work if the site is on the local machine or on
a network server which is mounted
Removed the file:// part and the images are there, thank you so much,
been trying everything to get these to work.
OK. You do have to pay attention to things like that. There's no sense
having a dev environment if you can't deploy transparently to the
server. Your IDE should not embed
Is there a fix for this so that the menu displays the same in both
browsers?
You are taking advantage of the browser default padding for the URL
elements. Better to use a reset.css to clear such defaults and use
known values. The equivalent CSS is:
.imageMenu ul {
padding-left:
URL
^UL
Can it be done? Can I add the tooltip to the dynamically generated
code? Seems that the tooltip code go wrong when acts before the div
is created .. is that the problem? how can I solve it?
I wouldn't say it goes wrong -- it just attaches to whatever it sees
in the DOM at the time. Why
people hate jQ syntax! Guess we need to get MT XML
up to snuff. Or you could move to JSON here -- any reason not to?
Sanford Whiteman, Chief Technologist
Broadleaf Systems, a division of
Cypress Integrated Systems, Inc.
e-mail: sa...@cypressintegrated.com
$$('DIV.tab-page DIV#tab-content TABLE')
If you're providing markup, don't massage it so that it becomes
invalid for anyone else to paste. Also, you have class=tab-content
in your message, but elsewhere you say it's an id. Either way, CSS
question, not JS...
--Sandy
Just wanted to let you know that I fought with it on your behalf for
past 2 hours. No luck either. Will look at it again tomw.
--Sandy
Sanford Whiteman, Chief Technologist
Broadleaf Systems, a division of
Cypress Integrated Systems, Inc.
e-mail: sa
In defense of the library, attach and detach are documented:
http://mootools.net/docs/more/Drag/Drag#Drag:attach
But it's Scroller::attach/::detach that's being called.
-- Sandy
please remove me, thank you!
Dude, Google Group, look in the mail headers.
-- Sandy
No...it's running locally on my laptop right now. Here is the Master
Page that contains the div's though.
I am not speaking for everyone, but there's no way I'm going to look
through someone's preprocessor (ASP.NET) code in this group. Why don't
you gen the actual HTML/JS/CSS, save it
I have little problem: I change some element style with setStyle on
click event, when you reclick I want to all element return with the
default state.
Unless you have some *very* good reason for the inline style, why not
use addClass/removeClass?
-- Sandy
I just thought that it *might* be possible that the browser has the
cookie in memory (and accessible via JS) on the page that has the
initial set-cookie http header, but doesn't keep it in memory on
any subsequent pages.
You're not so wrong about this. The browser gets the original
I thought the browser then resends the cookie on every consecutive
request to the domain/path specified by the initial set-cookie
http header from the server
This doesn't happen automatically, in your page you've got to ask for
it.
It does happen automatically. By the time, e.g. PHP
Being able to see the YES means its enabled...
I think that's it, too... but certain my users would be screaming if I
ever rolled out something this (relatively) impenetrable. It's
well-implemented, don't get me wrong -- smooth and all that -- but I
don't know what modern-world
Let me know what you think, I have just updated it.
Now, with labels outside, it makes immediate sense.
I don't know whether there's more than a niche need for labels inside.
Good work.
-- Sandy
I realise that this is a mootools group but - why do you say that
using $_REQUEST is wrong?
Yep, off-topic so brief... $_R Is Considered Harmful® because
· mixing in (E)S at all breaches client/server security divide
· cookies from apps elsewhere in an SLD can maliciously or
...written to S...
s/b ...written to $_S(ESS) or $_C...
text-indent: -1000px;//what's this used for???
P.S. comments in CSS use only /* */ -- maybe you knew that.
-- Sandy
and could u pls help me solve the first quesion:how to add images?
If this is the ImageMenu I think it is, each IMG just gets wrapped
in a new LI in the markup.
-- Sandy
I search THE function equivalent for sleep (php) in mootools. I
don't remenber but i know that this function exist and i don't find
him.
If you find him, let ECMA know. :P
There isn't anything in cross-browser JS that can do what sleep()
actually does.
What is your functional
do {
now = new Date().getSeconds();
} while (now till);
But as demonstrated elsewhere around the web, that isn't what sleep()
does -- suspending execution, ceding CPU to another code path -- and
in most ways is its opposite.
-- Sandy
Try switching the DOCTYPE -- IE8 Native Mode w/HTML4 will glide
smoothly where XHTML1 wants IE7 Compat Mode.
-- Sandy
P.S. The actual content isn't valid HTML _or_ XHTML at this point.
Totally freezes the browser for 3 seconds, then wakes up. Seems like a
good type of sleep to me. I love it.
Sorry, but waiting on a synchronous Ajax call (and gratuitous HTTP
connection, natch) is readily debunked as a production-ready analog to
sleep(). It may seem suitable in the lab but
Why? Workaround?
Demo page (mooshell.net or your own)?
--Sandy
Will I get attacked for wondering about the OO integrity of this
concept? I admit I'm no purist in deed, but speaking theoretically,
manually creating a serialized object in order to instantiate a real
object is questionable.
I had assumed the application for this was one in which
http://mooshell.net/VNE5e/;
Updated at http://mooshell.net/yxL3F/1.
-- Sandy
He wants ajax form submissions.
I just amended his own MooShell. Was matching his requirement
...THE PROBLEM IS THAT IF YOU RUN SUMBIT BUTTON WITH HELP OF URL
(ONCLICK) THEN THE SUBMIT EVENT WILL BE NOT CATCHED BY MOOTOOLS :-(
which his 'Shell didn't, as he didn't catch the lack of
Between all the mooshells I think we've covered every possible way to
submit a form aside from hand delivering it.
:)))
-- Sandy
All fireEvent() does it run..for want of a better descriptionthe
forms onsubmit function but doesn't actually submit the form.
We could say simulates the consequences of an HTML-level submit
event, but does not fake the event itself
-- Sandy
Hello ?
http://mooshell.net/9GhnF/3
Make sure you don't have trailing commas in object literals (for IE
7-).
-- Sandy
@Sandy : sorry, i'm french, and my english is quite limited, as you
can read. What do you mean by trailing commas in object literals ?
Thanks to others for clarifying that for you... I had put up your code
in MooShell with that fix in it.
-- Sandy
No it should not cause an issue as you are not actually leaving the
domain. the only part of the url that counts as your domain is the
(bar.com)...
Not true, same origin refers to proto, port, and host.
https://developer.mozilla.org/En/Same_origin_policy_for_JavaScript
However, you can
P.S.: This is my first contribution of a mootools-script to the
community so I would be pleased to receive some feedback from yo :)
Clicking 'benchmark' froze my FF 3.0.14 a few times in a row. But I do
appreciate your contribution. ;)
Have you tested in FF 3?
-- Sandy
Think (although I should have gone to bed hours ago) you want
link:chain
in your options.
-- Sandy
On most platforms i would be surprised if your loop actually
executes all the requests since some should just stall out because
the request object is busy.
That's why you use link: chain... I agree completely that you should
consolidate into one request when possible, but I don't
I take it your reply means I can't do a form with two buttons in IE?
Or at least I can't do it with $('my-form').send() ?
Oscar was saying that you have to manually wrap the natives like event
in $() in IE -- they are not automatically extended as in other
browsers -- I don't know
Oscar
s/b Oskar, sorry.
1 - 100 of 922 matches
Mail list logo