[jQuery] Re: How to queue up ajax requests?

2008-07-18 Thread Abba . Bryant

or, blockUI the interface on each click and load once per click. This
will mean the user has to space their clicks out because they CANT
click more times.

On Jul 17, 7:39 am, wick <[EMAIL PROTECTED]> wrote:
> partner[etc],
>
> > Currently, when the pan ends, an onEnd event is fired, which then
> > fires off the ajax. So what you're suggesting is that i queue the pan
> > onEnd events?
>
> Nope, I think. Back to your "pan-pan-pan-pan-pan" situation, doing
> what you suggest would still fire 5 times (onEnd fires after each
> individual pan)  correct?
>
> What Shawn actually suggested (and from your reply, sounds like
> you may not have understood) was to delay executing your ajax request
> until a setTimeout timer expires. If another pan event happens during
> the timeout period, you reset the timeout & start the timer over. So,
> that's not a queue. The beauty with the timer is you don't flood the
> server with useless requests. I've used the timeout trick for ajax
> requests triggered by hover events on table rows. Same situation as
> yours - it only makes sense to do the ajax request when the user takes
> a 200ms (or whatever you think is appropriate) break. If you
> appreciate good UI design, throw a "loading" indicator up immediately
> (during the timeout period) to indicate to the user that something is
> happening.
>
> If you are worried about your ajax response taking longer than 200ms
> or whatever you use for the timer delay, then you'll need the ajax
> request queue solution too of course, but judging from your
> discussion, the timeout method will take care of 99% of the problem &
> it's more direct fix for the problem as you described it.
>
> -Wickhttp://www.CarComplants.com
>
> On Jul 16, 9:47 pm, partner56290674 <[EMAIL PROTECTED]>
> wrote:
>
> > I suppose shawn we can just agree to disagree because your comments
> > about it's application specific, IMO, is completly misguided in this
> > topic. IMO, it's not application specific but a option for any
> > developer to use. I don't see it as something very specific, no more
> > than jquery having an @each syntax thingy. I read your comment as 'i
> > want to do this and i don't know how, so jQuery, can you do this for
> > me because i don't know how/can't be bothered'. Even the next reply is
> > doing some queuing, so i can't be THAT far removed. If it's in the
> > Core, then it's assumed it's an important wrapper to help developers
> > maximize the technology they are using.
>
> > After all this, though ... this is my personal opinion of how i see
> > things against yours .. and neither of us are wrong or write .. it's
> > personal opinion.
>
> > The topic asked if this functionality was in the core - and it's not.
> > I suppose you're 100% right in seeing if John Resig and the krew think
> > this is an important option which could see benefit from the
> > community... or just more debate.
>
> > :)


[jQuery] Re: Calling PHP Functions from jQuery?

2008-07-15 Thread Abba . Bryant

My recommendation would be to use a serverside framework. I find
CakePHP allows me to simplify ajax development greatly.

On Jul 14, 10:44 pm, Mario Wolff <[EMAIL PROTECTED]> wrote:
> On 14 Jul., 16:11, Yavuz Bogazci <[EMAIL PROTECTED]> wrote:
>
> > is it possible to call php functions from jquery?
>
> My way:
> PHP:
>  function utf8_encode_recursive(&$arr){
> array_walk_recursive($arr,create_function('&$item,
> $key','$item=utf8_encode($item);'));
> return $arr;
> }
> function utf8_decode_recursive(&$arr){
> array_walk_recursive($arr,create_function('&$item,
> $key','$item=utf8_decode($item);'));
> return $arr;
> }
> if(@$_GET['protocol']!="jsonrpc"){
> die("jsonrpc only!");
> }
> if(@$_GET['version']!="1.0"){
> die("jsonrpc version mismatch!");
> }
> if(!is_callable('jsonrpc_'[EMAIL PROTECTED]'function'])){
> die("uncallable function!");
> }
> if([EMAIL PROTECTED]'parameter']){
> $_GET['parameter']=array();
> }
> if(!is_array(@$_GET['parameter'])){
> $_GET['parameter']=array($_GET['parameter']);
> }
> echo
> json_encode(utf8_encode_recursive(call_user_func_array('jsonrpc_'.@
> $_GET['function'],utf8_decode_recursive($_GET['parameter'];
> ?>
>
> JS:
> $.getJSON(
> 'helper.php',
> { protocol:'jsonrpc',
>   version:'1.0',
>   'function':'myfunc',
>   'parameter[id]':'4711',
>   'parameter[value]':'hello world!'
> },
> function(data){
> if(window.console){
> console.log(data);
> }
> }
> );
>
> > thank a lot
> > yavuz


[jQuery] Superfish Question

2008-07-11 Thread abba bryant


I was just wondering if there was any sort of workaround for the tiny 1px
twitch that happens on the submenu items once the animation is complete.

Thanks
-- 
View this message in context: 
http://www.nabble.com/Superfish-Question-tp18409078s27240p18409078.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: completely resetForm

2008-07-09 Thread Abba . Bryant

try using the validation plugins resetForm method? I don't know for
sure if it will work but looking at the source Jorn linked it seems
likely.


On Jul 9, 6:33 am, caseyw <[EMAIL PROTECTED]> wrote:
> Hi Jörn, thank you for responding.
>
> I've tried adding the validator.submitted = {}; and it doesn't work.
>
> I also took lines 264-272 and adjusted the 'this' to my validator and
> still isn't working.
>
> Anything else I can do?
>
> Thanks!
>
> caseyw


[jQuery] Re: HTML Parsing issue

2008-07-09 Thread Abba . Bryant

I notice your request has a closing tag after a self-closing tag.
...
 shouldn't close itself and
also have a closing tag. That would and should invalidate your soap
request if I am correct without jquery interfering.

try making the original request valid xml and check it again. IE..
...
  notice that the first open
tag is not self-closed allowing the  tag to be the closing
entity.

Also for future reference, always try and validate the xml involved in
your SOAP requests. I find it helps a great deal in debugging them.


On Jul 8, 6:19 am, shruthi <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I noticed JQuery does some clean up while appending html to an
> element. This is a problem for me,
> because I'm trying to use a text area which gets loaded with a soap
> request.
>
> My soap request looks like this.
>
>  xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";> soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";
> xmlns:ns1="http://ws.apache.org/axis2";> ns1:echoInteger> soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";
> xsi:type="soapenc:int" xmlns:soapenc="http://schemas.xmlsoap.org/soap/
> encoding/">1
>
> JQuery is closing the tag  as . This makes my soap
> request invalid.
>
> Is there a way to turn off this feature? Even a workaround would be
> great!


[jQuery] Re: Issue using a long array in jquery autocomplete

2008-07-02 Thread Abba . Bryant

Check that there isn't a comma at the end of the last item in your
array. I had the same problem with autocomplete and it turned out that
I had a comma at the end of the last item due to an oversimplified
loop serverside to output the array.

IE

[ 'item', 'item', 'item', ] will break in IE but not FF etc.

you want

[ 'item', 'item', 'item ] notice no trailing ',' at the end of the
final item.


On Jul 1, 5:56 am, Gearóid O'Ceallaigh <[EMAIL PROTECTED]> wrote:
> Hi, thanks for the reply.
>
> I can't post the page since the site is being developed locally. I
> figured out several things that may prove useful however. I tried
> using a group of the data to see if this was the problem. IE6 returned
> the same error: "Unterminated String Contstant" but I noticed that the
> line it had a problem with had a German character ( ü ) in it. An
> element before this in the list also had this character but threw up
> no problem. The word in which the character is used was
> " (something)führer" so I rename all elements with the word führer and
> replaced them with "fuhrer". The smaller array now worked.
>
> I tried applying the same technique (as a stop gap) to the larger
> array but again IE6 was complaining about an "unterminated string
> constant". I then removed all cases of the character "ü" and replaced
> them with "u". Now IE has the error "Expected ']' " about halfway
> through the array. There is no syntax error around these lines - I've
> checked a few times.
>
> Is there a chance that these foreign characters are causing the errors
> within the script?
>
> On Jun 30, 3:59 pm, gf <[EMAIL PROTECTED]> wrote:
>
> > On Jun 30, 3:38 am, Gearóid O'Ceallaigh <[EMAIL PROTECTED]> wrote:
>
> > > Hi,
>
> > > I'm using bassistance's autocomplete on a website (plugin page found
> > > here:http://plugins.jquery.com/project/autocompletex). Its perfect
> > > for I need since it allows the data for the autocomplete to be loaded
> > > from a local array. However, whilst the autocomplete works fine in
> > > most browsers - it seems that the length of the array is throwing up
> > > an error in IE6. The array contains maybe 500+ elements of data but
> > > even if I put them on a single line in the code, the error still gets
> > > thrown up.
>
> > > Has anyone else ever had this problem?
>
> > It's possible but not real likely that IE6 has a bug preventing it
> > from handling that many elements. Without seeing the error nobody can
> > say for sure.
>
> > Having programmed for a long-long time, my instinct is to say more
> > likely it's some sort of quoting or delimiting bug in the array
> > definition. With that many elements it's hard to scan through them by
> > eye unless you have laid them out in a very organized fashion. Our
> > eyes and brain are good at finding changes in a pattern of orderly
> > rows and columns, not at finding a missing comma or quote in pages of
> > characters. So, I always line my arrays up vertically into columns as
> > much as possible. (A programming editor like vim with the align module
> > makes it really easy.)
>
> > My next thought is I would use an Ajax query to reduce the array of
> > 500 down to something a lot more manageable. You don't say how big
> > each element is, but that many elements will slow page load and
> > rendering making your user's browser bog down a bit.
>
> > Do you have the offending page somewhere that others can see it so
> > they can try to figure out what's wrong? Don't post the code here as
> > it'll cause screams as people open up that many lines of code.


[jQuery] Re: Safari 2.0.4 not passing the jQuery test

2008-06-22 Thread Abba . Bryant

I believe you misinterpreted the statement by John.
The *entire* test suite passes in Safari. To overcome the memory
issues they need to break the test suite into multiple smaller sets of
tests and run those. If the entire suite is run it causes Safari to
crash due to the applications memory management problems.

On Jun 22, 6:29 am, Jeff Kenny <[EMAIL PROTECTED]> wrote:
> I understand Safari's limitations, but saying it's compatible sets an
> expectation that it (all of it) will work.
>
> I consistently had Safari crash when trying to use the html() and
> replaceWith() functions. If you're aware of Safari's issues and only
> run the test suite in pieces, then it'd be nice if you could publish
> what the pieces are so that we (the jQuery using public) know what we
> should be looking out for.
>
> Thanks for the reply, even if we disagree on "compatible".  :-)
> Jeff
>
> On Jun 19, 9:43 am, "John Resig" <[EMAIL PROTECTED]> wrote:
>
> > Jeff -
>
> > Safari2 has serious memory issues that are impossible to work around
> > - simply loading and executing too much JavaScript will cause it to
> > crash (as you see with the test suite). We do run the test suite
> > againstSafari2 but in pieces to verify that it works as intended.
> > Yes, we still supportSafari2.
>
> > --John
>
> > On Thu, Jun 19, 2008 at 12:12 AM, Jeff Kenny <[EMAIL PROTECTED]> wrote:
>
> > > I'm working on a site and the js is crashingSafari2.0.4, so I went
> > > back to check the compatibility page and it says it's supported. I ran
> > > the test page (http://jquery.com/test/) inSafari2.0.4 multiple
> > > times and it crashed EVERY time BUT at different places.
>
> > > So...my question is, is jQuery really compatible withSafari2.0.4 or
> > > should it be taken off the list of compatibility? In which case I'm a
> > > little screwed.


[jQuery] Re: BlockUI: Strange flickering behavior.

2008-05-22 Thread Abba . Bryant

The point is that your calling a interface blocking plugin to do
something as simple as a hover effect. The plugin intercepts events on
elements behind the blocking overlay to prevent interaction with the
blocked portion of the page amongst other things. You don't need or
even want that behavior. It is akin to using a the claw end of a
hammer to remove screws, it might work but it is the wrong tool for
the job, as a result there may and likely will be odd side effects.

If you would like I can illustrate how simple your code can be once I
get home for the evening.
For the record, in FF on the mac when I click your thumbnail the
browser simply takes me to the image. There is no blockUI action going
on at all when I click the thumb.

Abba




On May 22, 8:58 am, "Chris Jordan" <[EMAIL PROTECTED]> wrote:
> Thanks Abba. I'm using it because it's convenient. I don't have to worry
> about anything. I just call it. If it does a little more, I'm not real
> worried about it. Also, once the thumbnail is clicked on, I'm using blockUI
> again to display the larger image.
>
> Chris
>
>
>
> On Wed, May 21, 2008 at 6:46 PM, <[EMAIL PROTECTED]> wrote:
>
> > I have to point out that the blockUI plugin is overkill if all you
> > want to do is fade the image and display a caption over it. If you
> > gave each thumbnail a javascript created div inside the link and set
> > to a 0 opacity with a white bg and then simply increased the opacity
> > on hover-over, and decreased it on hover-out you wouldn't have to deal
> > with the overhead of blocking the ui and intercepting click events etc
> > that the plugin has to do.
>
> > IE on the ready event loop over all the links by classname, append a
> > div to each link, set the css style for the div ( pos absolute inside
> > relative links, height and width set to the parent size and insert a
> > span based on the rel attr. opacity 0 ) and then attach a hover
> > function to each of the same classname links that grabs the interior
> > div and sets the opacity to what you like. On the hover out simply
> > revert the div back to the original style rules ( you could even
> > create a single style object for the div and simply reuse it )
>
> > I hope I was clear, since I am at work I don't have the time to write
> > any enlightening code for you.
> > Is there some particular reason I might be missing that would make you
> > want to use the blockUI plugin?
> > Abba
>
> > On May 21, 10:31 am, "Chris Jordan" <[EMAIL PROTECTED]> wrote:
> > > I figured out what the hour glass is all about. I'm throwing up an
> > overlay,
> > > and that puts up the hour glass automatically. if you hover over just the
> > > text in the middle, then there's no hour glass there.
>
> > > Thanks for everyone's help!
>
> > > Chris
>
> > > On Wed, May 21, 2008 at 11:45 AM, Chris Jordan <[EMAIL PROTECTED]
>
> > > wrote:
>
> > > > Hey, that's progress! I'm still getting the hour glass too, but the
> > flicker
> > > > is gone. It seemed before like the constantly being blocked and
> > unblocked in
> > > > rapid succession. Now, it looks just right, except that I don't like
> > the
> > > > hour glass. But I think I can show it to my client like this.
>
> > > > Any further assistance would be much appreciated. If anyone can figure
> > out
> > > > how to get rid of the hour glass, that'd be great.
>
> > > > Here's what the code looks like now:
> > > > // change message border
> > > > $.blockUI.defaults.css.border = '0px solid red';
> > > > $.blockUI.defaults.css.cursor = 'default'; // I'm just assuming that
> > this
> > > > will work.
>
> > > > // make fadeOut effect shorter
> > > > $.blockUI.defaults.fadeOut = 400;
>
> > > > $(".thumb").hover(function() {
> > > >        // MOUSEOVER HERE
> > > >     $(this).block({
> > > >         message: $(this).attr("alt"),
> > > >         css: {
> > > >             padding:        0,
> > > >             margin:         0,
> > > >             width:          '100%',
> > > >             top:            '40%',
> > > >             left:           '35%',
> > > >             textAlign:      'center',
> > > >             color:          '#FF',
> > > >             cursor:         'default', // but just in case it didn't
> > work
> > > > above, i set it here too...
> > > >             backgroundColor:'transparent',
> > > >             fontWeight:        'bold'
> > > >         },
> > > >         overlayCSS:  {
> > > >             backgroundColor:'#F2F2F2',
> > > >             opacity:        '0.6'
> > > >         }
> > > >     })
> > > > },function() {
> > > >        // MOUSEOUT HERE
> > > >        $(this).unblock();
> > > > });
>
> > > > On Wed, May 21, 2008 at 11:31 AM, Chris Jordan <
> > [EMAIL PROTECTED]>
> > > > wrote:
>
> > > >> Michael, I'll try this. Thanks so much.
>
> > > >> On Wed, May 21, 2008 at 11:21 AM, Michael Price <
> > > >> [EMAIL PROTECTED]> wrote:
>
> > > >>> Chris Jordan wrote:
>
> > >  Just to clarify, in order to see the problem (especially in FF -- it
> > > >>>

[jQuery] Re: BlockUI: Strange flickering behavior.

2008-05-21 Thread Abba . Bryant

I have to point out that the blockUI plugin is overkill if all you
want to do is fade the image and display a caption over it. If you
gave each thumbnail a javascript created div inside the link and set
to a 0 opacity with a white bg and then simply increased the opacity
on hover-over, and decreased it on hover-out you wouldn't have to deal
with the overhead of blocking the ui and intercepting click events etc
that the plugin has to do.

IE on the ready event loop over all the links by classname, append a
div to each link, set the css style for the div ( pos absolute inside
relative links, height and width set to the parent size and insert a
span based on the rel attr. opacity 0 ) and then attach a hover
function to each of the same classname links that grabs the interior
div and sets the opacity to what you like. On the hover out simply
revert the div back to the original style rules ( you could even
create a single style object for the div and simply reuse it )

I hope I was clear, since I am at work I don't have the time to write
any enlightening code for you.
Is there some particular reason I might be missing that would make you
want to use the blockUI plugin?
Abba


On May 21, 10:31 am, "Chris Jordan" <[EMAIL PROTECTED]> wrote:
> I figured out what the hour glass is all about. I'm throwing up an overlay,
> and that puts up the hour glass automatically. if you hover over just the
> text in the middle, then there's no hour glass there.
>
> Thanks for everyone's help!
>
> Chris
>
> On Wed, May 21, 2008 at 11:45 AM, Chris Jordan <[EMAIL PROTECTED]>
> wrote:
>
>
>
> > Hey, that's progress! I'm still getting the hour glass too, but the flicker
> > is gone. It seemed before like the constantly being blocked and unblocked in
> > rapid succession. Now, it looks just right, except that I don't like the
> > hour glass. But I think I can show it to my client like this.
>
> > Any further assistance would be much appreciated. If anyone can figure out
> > how to get rid of the hour glass, that'd be great.
>
> > Here's what the code looks like now:
> > // change message border
> > $.blockUI.defaults.css.border = '0px solid red';
> > $.blockUI.defaults.css.cursor = 'default'; // I'm just assuming that this
> > will work.
>
> > // make fadeOut effect shorter
> > $.blockUI.defaults.fadeOut = 400;
>
> > $(".thumb").hover(function() {
> >// MOUSEOVER HERE
> > $(this).block({
> > message: $(this).attr("alt"),
> > css: {
> > padding:0,
> > margin: 0,
> > width:  '100%',
> > top:'40%',
> > left:   '35%',
> > textAlign:  'center',
> > color:  '#FF',
> > cursor: 'default', // but just in case it didn't work
> > above, i set it here too...
> > backgroundColor:'transparent',
> > fontWeight:'bold'
> > },
> > overlayCSS:  {
> > backgroundColor:'#F2F2F2',
> > opacity:'0.6'
> > }
> > })
> > },function() {
> >// MOUSEOUT HERE
> >$(this).unblock();
> > });
>
> > On Wed, May 21, 2008 at 11:31 AM, Chris Jordan <[EMAIL PROTECTED]>
> > wrote:
>
> >> Michael, I'll try this. Thanks so much.
>
> >> On Wed, May 21, 2008 at 11:21 AM, Michael Price <
> >> [EMAIL PROTECTED]> wrote:
>
> >>> Chris Jordan wrote:
>
>  Just to clarify, in order to see the problem (especially in FF -- it
>  looks a little different in IE) mouse over one of the thumbnails in the
>  center of the page, and then leave the mouse there. You don't have to do 
>  any
>  further movement of the mouse to see the problem happening.
>
>  Thanks everyone. I really, really need help on this. :o(
>
> >>> Downloaded a copy of the page via Firefox and tried changing your
> >>> bindings to use the hover function - seemed to work OK but I'm still 
> >>> getting
> >>> the eggtimer over the images for some reason:
>
> >>> $(".thumb").hover(function() {
> >>>// MOUSEOVER HERE
> >>> },function() {
> >>>// MOUSEOUT HERE
> >>> });
>
> >>> Regards,
> >>> Michael Price
>
> >> --
> >>http://cjordan.us
>
> > --
> >http://cjordan.us
>
> --http://cjordan.us


[jQuery] Re: fadeTo refiering/flickering when hovering div's element

2007-12-19 Thread abba bryant


I read this thread and then closed the tab and instantly realized that I
needed to say something.
I have been a long time reader - not so often contributor to the list here
and I consistently and often read responses like this thread from various
other contributors.

Thank you guys so much for jquery and for the jquery community.


Karl Swedberg-2 wrote:
> 
> 
> On Dec 19, 2007, at 3:38 PM, don Jao wrote:
> 
>> Thank you very much for your reply. I don't know how can I say how  
>> much I
>> appreciate you're answer!
> 
> Hi Don,
> 
> It's not a problem at all. I'm glad it's working now for you!
> 
>> Thank you once again. I feel sorry for time you spend on that, but  
>> it now
>> works.
> 
> 
> I freely and happily give my time, because jQuery was freely and  
> happily given to me. :-)
> 
> 
> --Karl
> _
> Karl Swedberg
> www.englishrules.com
> www.learningjquery.com
> 
> 
> 
>>
>>
>> Hi Karl,
>>
>> Thank you very much for your reply. I don't know how can I say how  
>> much I
>> appreciate you're answer! I rewrote the code from a scratch and it  
>> worked,
>> using .hover(). Weird thing that 1st time I was trying to make it, i  
>> used
>> exactly .hover(). When it didn't work, i switchet to .mouseover and  
>> the
>> result was thr same. Probably that was a small mistake. Today i even  
>> tried
>> to embed onmouseover into  iteslf, the result was the same - not
>> working.
>>
>> Thank you once again. I feel sorry for time you spend on that, but  
>> it now
>> works.
>>
>> Thank you.
>> All the best.
>>
>>
>> Karl Swedberg-2 wrote:
>>>
>>>
>>> Hi don,
>>>
>>> I just approximated your page's markup and used the .hover() method.
>>> It's working fine for me. Would you mind testing here and letting us
>>> know if you still see the problem? ...
>>>
>>> http://test.learningjquery.com/fadeto.html
>>>
>>> Thanks,
>>>
>>> --Karl
>>> _
>>> Karl Swedberg
>>> www.englishrules.com
>>> www.learningjquery.com
>>>
>>>
>>>
>>> On Dec 19, 2007, at 2:36 AM, don Jao wrote:
>>>


 Hi Wizzud, thank you for youre reply.

 Unfortunatelly, it doesn't work. That way i behave exactly the same
 way.
 Probably, this is something impossible.

 All the best.

 Wizzud wrote:
>
>
> Try using hover() instead.
> Hover() has built-in code for testing whether the element under the
> mouse has the target element as an ancestor.
>
> On Dec 18, 9:23 am, don Jao <[EMAIL PROTECTED]> wrote:
>> Hi Everyone,
>>
>> I'm pretty new to jQuery, and my JavaScript sills aren't very good
>> to0,
>> but
>> they're not too bad either.
>>
>> I'm in need to fade a whole div, with couple of input fields, text
>> and
>> images inside it from 50% to 100% opacity. I used simple way to
>> get it:
>> $("div").mouseover( function() { $(this).fadeTo("slow", 1) } );
>>
>> however this way i get annoying re-fade effect when i move mouse
>> inside
>> that
>> div without leaving it:http://www.adpro.ee/temp/delme.html
>>
>> Is there any way around to make it work properly?
>>
>> Thanks in advance.
>> --
>> View this message in
>> context:http://www.nabble.com/fadeTo-refiering-flickering-when-hovering-div
>> %2...
>> Sent from the jQuery General Discussion mailing list archive at
>> Nabble.com.
>
>

 -- 
 View this message in context:
 http://www.nabble.com/fadeTo-refiering-flickering-when-hovering-div%27s-element-tp14375108s27240p14412489.html
 Sent from the jQuery General Discussion mailing list archive at
 Nabble.com.

>>>
>>>
>>>
>>
>> -- 
>> View this message in context:
>> http://www.nabble.com/fadeTo-refiering-flickering-when-hovering-div%27s-element-tp14375108s27240p14424769.html
>> Sent from the jQuery General Discussion mailing list archive at  
>> Nabble.com.
>>
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/fadeTo-refiering-flickering-when-hovering-div%27s-element-tp14375108s27240p14429138.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: How do you do Client/Server interaction? (CakePHP/JSON/jQuery)

2007-11-02 Thread abba bryant


You can do all of this with requestHandler component ( to check if an action
is 'requested' by another view or element, router::parseExtensions ( to
manage automatic template switching for requests mapped with a ".js" file
extension ); view::requestAction ( to actually request the json ) and the
javascript helper ( check out the inline parameter on the $javascript->link
function and the json encoding and json decoding function also )

I generally set up the router to handle .xml and .js requests. To use much
of ext you need to return json a lot. I then map the js layouts and /js view
subfolders to certain actions. In those actions I use requestAction to grab
the data I want from whatever controller - there is an excellent bakery
article by gwoo on reusable elements. read that if you havent. -
http://bakery.cakephp.org/articles/view/creating-reusable-elements-with-requestaction
- You can request the action complete with its mapped extension following
any parameters you might have even. IE /users/profile/1.js

If I need the js for certain objects ALL THE TIME I set an element up that
uses requestAction if no data is passed to it or my passed data instead to
request the JSON I need. I might even be inclined to put these reusable
parameterized json elements in their own
elements/json/controller_name/action_name folders.

Using the $plugin variable in the various cache functions ( this is usually
blank - resulting in double underscore cache filenames ) you can even cache
the results of each requestAction with more granularity ( a few more bakery
reads -
http://bakery.cakephp.org/articles/view/optimizing-your-cakephp-elements-and-views-with-caching
- and -
http://bakery.cakephp.org/articles/view/cache-elements-individually-for-each-user
)

There is a ton you can do with requestAction and the router alone. Let me
know if you have questions or need samples on implementation.



[EMAIL PROTECTED] wrote:
> 
> 
> Hey Tane - check out cake's JavascriptHelper::object()
> 
> On Nov 1, 6:00 pm, "Tane Piper" <[EMAIL PROTECTED]>
> wrote:
>> Well, what would you know!  Having written out what I wanted to get,
>> and by simply applying a little brainpower, I came up with the
>> solution.  What I did was write a CakePHP component and helper.  First
>> off, here is the component:
>>
>> > class JsonComponent extends Component {
>> var $json_for_layout = array();
>> function addToJSON($add = array()){
>> $this->json_for_layout =
>> array_merge($this->json_for_layout, $add);
>> }
>> function getJSON() {
>> return $this->json_for_layout;
>> }}
>>
>> ?>
>>
>> What this component does is allows me to pass in arrays to a global
>> array in the controller, json_for_layout.  Every time I call this from
>> a controller, it add's to the array.  The next step is in my
>> beforeRender() function in my AppController, I do this:
>>
>> $this->set('json_for_layout', $this->Json->getJSON());
>>
>> This sets my view variable.  I then need to actually generate the JSON
>> and output it to a var:
>>
>> > class JsonHelper extends JavascriptHelper {
>> function renderJSON($data, $varname = 'Pastemonkey'){
>> $json = json_encode($data);
>> $output = $this->codeBlock('var ' . $varname . ' = ' .
>> $json . ';');
>> return $output;
>> }}
>>
>> ?>
>>
>> Now, what I do is inside my header, I echo this out to the view:
>>
>> renderJSON($json_for_layout));?>
>>
>> And thats it!  Check your DOM tab in firebug to see the global object
>> now available.
>>
>> For example, if I pass in my sitename, I can simply call it with:
>>
>> Pastemonkey.sitename
>>
>> Hope this helps out a few people, and I intend to write a more
>> thorough blog about it tomorrow.
>>
>> On 01/11/2007, Tane Piper <[EMAIL PROTECTED]> wrote:
>>
>>
>>
>> > Apologies for the cross posting here, but I myself am at a bit of a
>> > crossroads in my applications development, and I'd like to take the
>> > time to put out this email in the hopes that it generates some good
>> > discussion, and can maybe teach me a few things.
>>
>> > A little background first to my issues.  I am developing my
>> > application at the moment (pastemonkey.org) and it's being built on
>> > CakePHP and jQuery.  At the moment, I'm using a lot of CakePHP's built
>> > in stuff to generate my HTML, and I'm using jQuery to do some simple
>> > Ajax stuff and some DOM manipulation.
>>
>> > Where I am at a crossroads is how to do my client/server interaction
>> > with JSON.  For example, I have the facility in place for inline
>> > comments.  When you see a paste, you can double click on each line to
>> > create and view the comments.  When you create one, there is code that
>> > generates the comment and enters the line number and paste ID.
>>
>> > To display this, what I do is create an array of the line numbers, and
>> > generate JSON using PHP's inbuilt functions.  So an array like this
>

[jQuery] Re: Advanced Problem - Any takers?

2007-11-02 Thread abba bryant


Can you post the html you are trying to append? It sounds like you might have
found a bug but seeing as how I can append fine with the simple samples
given there might be some sort of problem in your appended markup that is
triggering it.


ja-6 wrote:
> 
> 
> Karl,
> 
> Thanks for the help, but it didn't seem to work. Any other
> suggestions?
> 
> Josh
> 
> On Nov 2, 1:49 pm, Karl Swedberg <[EMAIL PROTECTED]> wrote:
>> Hi there,
>>
>> Instead of this:
>>
>> > var my_var = "HI";
>>
>> try this:
>>
>> var my_var = $("HI");
>>
>> Hope that helps.
>>
>> --Karl
>> _
>> Karl Swedbergwww.englishrules.comwww.learningjquery.com
>>
>> On Nov 2, 2007, at 1:53 PM, ja wrote:
>>
>>
>>
>> > I'm dynamically inserting html into a page that only contains an
>> > image. Such as...
>> > 
>> >  
>> >http://my_domain.com/my_image.jpg 
>> >  
>> > 
>>
>> > my script has a large amount of html that i want to insert. the html
>> > is stored in a variable . Such as..
>> > var my_var = "HI";
>> > (the actual html is much larger and more complicated than my example)
>>
>> > I then have..
>> > $('body').append(my_var);
>>
>> > which you would think would insert the html into the page. it doesn't,
>> > instead it just inserts it as text. The source in Firebug is now...
>> > 
>> >  
>> >http://my_domain.com/my_image.jpg 
>> >   HI
>> >  
>> > 
>>
>> > NOTE: that extra div that's all CAPS, isn't a typo. jquery inserts
>> > that for some reason and I don't know why.
>> > The page doesn't render the "HI" as html, it displays it as
>> > plain text.
>> > If I use the same code on a page that has some more to it, like
>> > google's homepage, the extra "" isn't there and my html gets
>> > inserted properly (not as text).
>>
>> > any clues as to why? is this a bug? am I missing some aspect of web
>> > pages when they are only images?
>> > Thanks in advanced for your help.
>> > Josh
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Advanced-Problem---Any-takers--tf4739677s27240.html#a13556911
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: TreeView with "Checkbox Tree"

2007-07-24 Thread abba bryant


There is more to it than just a checkbox. The checking / unchecking behaviors
clears or checks the child boxes.


MARIO MOURA wrote:
> 
> Other good example
> 
> http://www.scbr.com/docs/products/dhtmlxTree/
> 
> Regards
> 
> 
> 
> 2007/6/26, Jörn Zaefferer <[EMAIL PROTECTED]>:
>>
>>
>> Mario Moura wrote:
>> > Yes, Jörn
>> >
>> > Will be a good addon to treeview.
>> >
>> > About Christof email if just add the checkboxes to the -Tag will
>> > work?
>> >
>> > Should I re-create my tree from my select form using
>> > 
>> > or
>> >  
>> How about this?
>>
>> Blah
>>
>> --
>> Jörn Zaefferer
>>
>> http://bassistance.de
>>
>>
> 
> 
> -- 
> Mário Alberto Chaves Moura
> [EMAIL PROTECTED]
> 31-9157-6000
> 
> 

-- 
View this message in context: 
http://www.nabble.com/TreeView-with-%22Checkbox-Tree%22-tf3976905s15494.html#a11767769
Sent from the JQuery mailing list archive at Nabble.com.



[jQuery] Re: site is having problems ( late thu / early fri july 6th )

2007-07-06 Thread abba bryant


It seems to be fine right now but the errors I was seeing were all related to
mysql being offline. The wordpress error was the mysql database unavailable.


Rey Bango-2 wrote:
> 
> 
> Hi Abba,
> 
> Part of the problem has been that when we announced jQuery v1.1.3, we 
> got a ton of traffic from Digg, Reddit, Ajaxian & Dzone. Anytime you get 
> that much traffic, you're bound to have some instability.
> 
> It would be helpful if you could list out the errors that you're 
> receiving so we can try to address them. Without that, it makes it kind 
> of tough to troubleshoot the problems. I personally have had no issues 
> getting to the site and navigating around so when you see an error, 
> could you please jot it down and submit it?
> 
> Thanks,
> 
> Rey
> 
> abba bryant wrote:
>> 
>> I can bring up the homepage finally ( was down earlier as well ) but the
>> docs
>> / plugins / blog / dev site are all generating a variety of errors ( all
>> seem to be that local mysql access isn't working at the host )
>> 
>> How am I supposed to play with the new behaviors when I can't see the
>> project?!! I can't stay up all night waiting for it to come back online
>> so I
>> guess I will have to stop being an insomniac fanboy and wait until
>> tomorrow
>> ( or whenever the team fixes the issue )
>> 
>> I have also noticed a LOT of downtime on the blog lately.
>> 
>> Abba Bryant
> 
> -- 
> BrightLight Development, LLC.
> 954-775- (o)
> 954-600-2726 (c)
> [EMAIL PROTECTED]
> http://www.iambright.com
> 
> 

-- 
View this message in context: 
http://www.nabble.com/site-is-having-problems-%28-late-thu---early-fri-july-6th-%29-tf4034202s15494.html#a11470067
Sent from the JQuery mailing list archive at Nabble.com.



[jQuery] site is having problems ( late thu / early fri july 6th )

2007-07-06 Thread abba bryant


I can bring up the homepage finally ( was down earlier as well ) but the docs
/ plugins / blog / dev site are all generating a variety of errors ( all
seem to be that local mysql access isn't working at the host )

How am I supposed to play with the new behaviors when I can't see the
project?!! I can't stay up all night waiting for it to come back online so I
guess I will have to stop being an insomniac fanboy and wait until tomorrow
( or whenever the team fixes the issue )

I have also noticed a LOT of downtime on the blog lately.

Abba Bryant
-- 
View this message in context: 
http://www.nabble.com/site-is-having-problems-%28-late-thu---early-fri-july-6th-%29-tf4034202s15494.html#a11460374
Sent from the JQuery mailing list archive at Nabble.com.



[jQuery] Re: Date picker question

2007-06-06 Thread abba bryant


I am retarded. I found it. I was for some reason looking at the first
datepicker by kelvinluck. I see now that version two has the example I
wanted.


abba bryant wrote:
> 
> Not long ago there was a link from one of these threads that had a
> datepicker plugin with an example using callbacks to modify a group of
> month / day  / year select fields.
> 
> Does anyone remember the link to this example or even which plugin it was?
> I have looked over kelvinluck's plugin and I can't tell for sure if it was
> his or someone elses.
> 
> Thanks in advance.
> 

-- 
View this message in context: 
http://www.nabble.com/Date-picker-question-tf3879879s15494.html#a10995627
Sent from the JQuery mailing list archive at Nabble.com.



[jQuery] Date picker question

2007-06-06 Thread abba bryant


Not long ago there was a link from one of these threads that had a datepicker
plugin with an example using callbacks to modify a group of month / day  /
year select fields.

Does anyone remember the link to this example or even which plugin it was? I
have looked over kelvinluck's plugin and I can't tell for sure if it was his
or someone elses.

Thanks in advance.
-- 
View this message in context: 
http://www.nabble.com/Date-picker-question-tf3879879s15494.html#a10995514
Sent from the JQuery mailing list archive at Nabble.com.



[jQuery] Re: jquery.us

2007-05-18 Thread abba bryant


done = done++;


george.gsgd wrote:
> 
> 
> Has anyone seen this:
> 
> http://jquery[dot]us (not linked so as not to aid their efforts)
> 
> Obviously someone trying to cash in with google ads and spammy keyword
> stuffing. But I got a hit in my referers so they must be doing
> something right (even though that's so wrong).
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/jquery.us-tf3776075s15494.html#a10687110
Sent from the JQuery mailing list archive at Nabble.com.



[jQuery] Re: jEditable/CSS question

2007-04-19 Thread abba bryant


tried display:block; ? also if the plugin is inserting a container div, check
that elements styles as well. It might be a fixed width. I don't use the
plugin so I can't be more help.



Josh Nathanson-2 wrote:
> 
> 
> Hey all,
> 
> I'm working with jEditable which changes text to an input field when you 
> click the text.  It works really nicely.
> 
> I modded it a bit to allow me to style each of the elements individually, 
> rather than the whole form, which is working fine.
> 
> When you generate a textarea, it also creates a "submit" and "cancel" 
> button - problem is that the submit button always appears to the right of 
> the textarea, with the cancel button below the textarea on the next line.
> 
> I'd like to have both buttons appear below the textarea.  I've tried 
> applying clear:both and float:none to the button style via a class to make 
> this happen, but neither has worked.  Are there any other tricks to
> getting 
> the button to break to the next line below the textarea via css?  I don't 
> want to append a  in the jEditable code because that seems like a
> hack. 
> Thanks for any help.
> 
> -- Josh 
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/jEditable-CSS-question-tf3608824s15494.html#a10084361
Sent from the JQuery mailing list archive at Nabble.com.



[jQuery] Re: jquery modal form not loading - help!

2007-04-16 Thread abba bryant


I get the spinner and no form in firefox 1.5
According to firebug the get request is made and the returned page looks
like it should work.



Tetsuo-3 wrote:
> 
> 
> Hi Rob
> 
> Thanks for your help. I've looked at my scripts and can't see that it
> is requesting anything from domain, so I don't think that's it. As I
> mentioned, the window also doesn't load on my local machine, which
> suggests something more fundamentally wrong with the code. Strangely,
> I've had this working fine for weeks, and now all of a sudden it's not
> loading, despite me not changing anything, other than uploading the
> site to a host :\
> 
> Any other ideas? I can give you the url if it's something you feel you
> would understand..
> 
> Thanks
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/jquery-modal-form-not-loading---help%21-tf3583160s15494.html#a10022461
Sent from the JQuery mailing list archive at Nabble.com.