[jQuery] Re: Problem with loading page through ajax

2009-02-17 Thread Beres Botond
If you put alert(data) in the function, what exactly does it show? Also you could try specifying the data type like: $.post("hotline.aspx", function(data) { $("#load").html(data); }, "html"); On Feb 17, 3:32 pm, "r1u0...@gmail.com" wrote: > Hi, > > I've got problem with loading new page thro

[jQuery] Re: Cancel Previous $.post request

2009-02-17 Thread Beres Botond
Basically the main point of what James said is that you don't send the request at all in the first place *instantly*.. only after a small delay, so if the user keeps typing only one request will be sent (the latest one) I assume you have a keyup event on the search input or similar... trying to k

[jQuery] Re: How to get the selected values in multi-select

2009-02-11 Thread Beres Botond
It seems to me, that just gets the first option value from the multiple select, and not necessarily a selected one. At least if #selection points to the selection widget. $('#selection > option:selected').each(function() ( // this should loop through all the selected elements alert($(this

[jQuery] Re: Cannot Get JQuery Ajax to work in Google Chrome browser

2009-02-11 Thread Beres Botond
I believe that for POST the correct way to send parameters is like this: data: {pageScroll: maxScroll, pageTime: endTime, location: currentURL} However it is weird that it works for you in IE and Firefox, as you have it now. Worth a try anyway. On Feb 11, 3:09 am, Karl Rudd wrote: > It's prob

[jQuery] Re: How to synchronize callback events

2009-02-05 Thread Beres Botond
Ideal solution would be with some custom callback for the append, or something similar... but can't think of an exact solution like that right now. Another solution, which although not ideal, it is simple and *could* work quite well, is calling the ADD_DHTML function with a setTimeout. setTimeou

[jQuery] Re: Hide or show div depending on the value of radio button

2009-02-03 Thread Beres Botond
typo: group_numer = group_number On Feb 3, 10:31 am, Beres Botond wrote: > It's fairly simple to do. > I haven't tested this piece of code, but it should work. > > $("div[id^=PrimaryBox] :radio").click(function() { >      var clicked_val = $(this).val(); &g

[jQuery] Re: DOM manipoulation after ajax load

2009-02-03 Thread Beres Botond
Ok, I'll be more specific to make your life easier :) The reason your code example doesn't work, is because you start the load request, but that is asynchronous (the first A in AJAX :)), and javascript will execute your next statement with 'each' before the .load is finished, it doesn't wait for t

[jQuery] Re: Hide or show div depending on the value of radio button

2009-02-03 Thread Beres Botond
It's fairly simple to do. I haven't tested this piece of code, but it should work. $("div[id^=PrimaryBox] :radio").click(function() { var clicked_val = $(this).val(); var div_idstr = $(this).parent('div').attr('id') var group_number = div_idstr.substring (div_idstr.length-1,div_ids

[jQuery] Re: Having a problem with checkboxes

2009-01-31 Thread Beres Botond
Yes you can use : Just modify your jquery code as well: var checked_status=this.checked;$("input[name^='paradigm']").each (function(){ this.checked=checked_status; }); http://docs.jquery.com/Selectors/attributeStartsWith#attributevalue On Jan 31, 12:

[jQuery] Re: Using $_POST to transmit large key/pair

2009-01-31 Thread Beres Botond
&key=pair... > > On Jan 30, 2:25 pm, Beres Botond wrote: > > > As shown in the docs (link I gave you), it should work > > > $.post("order_send_email.php", > >        {order_message : order_message}, // {key : variable} > >        function(data) > >

[jQuery] Re: Using $_POST to transmit large key/pair

2009-01-30 Thread Beres Botond
: > Thanks, Beres. > > I am reading this order_message from a DIV. How do I 'POST' it? By > using form? > > Also, to url encode... do I use "escape(....)"? > > On Jan 30, 3:08 am, Beres Botond wrote: > > > You want to use POST, but you are sending

[jQuery] Re: issue with ajax function

2009-01-30 Thread Beres Botond
ice returns. Since dataType of my jquery ajax > method is set to 'json', this should be interpreted as json data. > > On 30 jan, 11:14, Beres Botond wrote: > > > > > So the AJAX call actually returns some result now? > > > If you alert() the result,

[jQuery] Re: issue with ajax function

2009-01-30 Thread Beres Botond
d looks like : > >  [WebMethod] >     public string GetPublication(String pText) { >       String result = ""; > >       result = @"{""results"": [ >             { >                 ""id"": ""4"", >            

[jQuery] Re: issue with ajax function

2009-01-30 Thread Beres Botond
A parameter has to be key=>value, in some form, otherwise how is it identified? contentType: "application/json; charset=utf-8", This should only be set if your webservice expects the input parameter in JSON format as well, and not only the response is JSON. Is this the case? How does the code o

[jQuery] Re: Using $_POST to transmit large key/pair

2009-01-30 Thread Beres Botond
You want to use POST, but you are sending your data as GET (without url encoding). So I'm pretty sure it cuts before "#", because # is a non-alphanumeric character and you haven't urlencoded your data. Data in URL = GET, not POST, even if you are using $.post . http://docs.jquery.com/Post So e

[jQuery] Re: Cancel concurrently running ajax events

2009-01-29 Thread Beres Botond
You are looking at this the wrong way. Instead of thinking of "cancelling" lots of ajax requests once they have been sent already.(which is not really doable, or "ugly", as far as I know), you shouldn't be making all those requests in the first place. Let me explain: You shouldn't fire an ajax re

[jQuery] Re: closure inside ajax method

2009-01-27 Thread Beres Botond
That *should* get called twice. What does debug() do? If you put alert() instead of it, it will still be just 1 alert? Also If you can test it in Firefox with Firebug addon (http:// getfirebug.com/), you should be able to see if there are actually 2 requests going out correctly (and the response t

[jQuery] Re: How get data objects from a php file called via ajax updated?

2009-01-16 Thread Beres Botond
Why don't you check your old thread for responses instead of posting the same thing twice? http://groups.google.com/group/jquery-en/browse_thread/thread/c94d4da1f304e2d/0b7b2b0e9c9ea11e?hl=en&lnk=gst&q=ajax#0b7b2b0e9c9ea11e Do what I said there, and also make sure that your PHP script is working

[jQuery] Re: How get data objects from a php file called via ajax

2009-01-16 Thread Beres Botond
If you want to have events on html elements loaded/added dynamically, you need to bind the event after the element has been inserted into the page. $("#myresult").html(html); // define your click event here Or with jquery 1.3 you can use .live() http://docs.jquery.com/Events/live On Jan 15,

[jQuery] Re: Wrapping non empty text node with

2009-01-16 Thread Beres Botond
Actually, you'll need $("#target").find("li").each(function(){ to process each li from target ul. On Jan 16, 12:22 pm, Beres Botond wrote: > I don't think you need .find("li"), just > > $("#target > li").each(function(){ > >

[jQuery] Re: Wrapping non empty text node with

2009-01-16 Thread Beres Botond
I don't think you need .find("li"), just $("#target > li").each(function(){ Other than that, looks pretty simple already On Jan 16, 10:50 am, Jacky wrote: > Hi all, > > I'm looking for a way to wrap text node with . > > HTML: > > > Item 1 > Item 5 > > Item 5-1 >

[jQuery] Re: How do i "generify" this action to happen for every radio button with id=other

2009-01-16 Thread Beres Botond
http://docs.jquery.com/Selectors/attributeContains#attributevalue $("input[id*='other']").bind(evt, function(){ alert('This should get called when you click on any radio if it's id contains other') if ($(this).attr('checked') == 'checked' && $(this).val() == 'other') {

[jQuery] Re: How do I use the JSON api to enter a value in a tag?

2009-01-16 Thread Beres Botond
The concept is basically the same. You would add something like: $('#my_target_element').append('' + item.title + '') On Jan 16, 1:01 am, desbest wrote: > How do I use the JSON api to enter a value in a tag? > > Code is herehttp://codedumper.com/flickr-api-using-jquery-json > Example is h

[jQuery] Re: Covering multiple elements with a single function, but passing a variable?

2009-01-15 Thread Beres Botond
This really depends on the exact html structure you have. Ideally I would put the 'ul' and it's related 'a' within the same div. But if you have it exactly like in the example above, this will work: $('a.additem').click(function() { var list_id = $(this).prev('ul').eq(0).attr('id')

[jQuery] Re: keep session alive

2009-01-14 Thread Beres Botond
I don't see what this has to do with jQuery or Javascript in general. Maybe give us some more details. On Jan 14, 3:33 pm, hjorth wrote: > hi > > i got a big problem > > i need to take a session from one page and keep it alive on another > page where i have a long form. > > is this possible?

[jQuery] Re: Display Loading Image While Ajax Content Loads

2009-01-14 Thread Beres Botond
Maybe you'll have more luck with this. // display loading animation here $("#ajax_content").load('/sourcefiles/example.html', {}, function() { // hide loading animation here }); However I'm still not sure if it will actually wait till images are downloaded. On Jan 14, 7:14 am, jinscoe wro

[jQuery] Re: select() not working

2009-01-14 Thread Beres Botond
Ah yeah, sorry I didn't pay enough attention there :p On Jan 14, 1:37 pm, "jQuery Lover" wrote: > *type: $jQ("#country_id").val(my_value); > > - > Read jQuery HowTo Resource  -  http://jquery-howto.blogspot.com > > > > On Wed, Jan 1

[jQuery] Re: select() not working

2009-01-14 Thread Beres Botond
It seems you don't know what .select() should be used for. It has absolutely nothing to do with selecting and option of a select box. Read the docs carefully. http://docs.jquery.com/Events/select Try this instead (assuming that #country_id is a select box): $jQ("#country_id]").value(my_value)

[jQuery] Re: Issue with loading content once using AJAX and display it as a SimpleModal (plugin)

2009-01-14 Thread Beres Botond
I think the most likely issue is that you are doing an ajax request (load), but manipulate the same div without waiting for the request to complete. So the modal is created before .load is finished. Try moving $("#content").modal(); to a callback of .load. This is a golden rule of ajax request, if

[jQuery] Re: Trouble setting Select object in browsers != IE 7

2008-12-15 Thread Beres Botond
The code you posted should work normally. But make sure existingCase.records.Spin_Off__c is a string (and also make sure it doesnt have trailing whitespace!). But if it just doesn't work, yeah you can set an option "selected" explicitly $("#00N8002fnHx > option").each(function() { if($(thi

[jQuery] Re: driving me mad - ajax

2008-12-09 Thread Beres Botond
This is not a solution, as I haven't encountered this issue yet, just possible pointers to find the source of the problem. http://pastebin.com/m7a986ddf On Dec 9, 1:48 pm, "Rik Lomas" <[EMAIL PROTECTED]> wrote: > Hi ToonMariner, > > This article might help > you:http://www.think2loud.com/2008/

[jQuery] Re: JQuery events + ajax question

2008-12-09 Thread Beres Botond
Cleaning that up is not Jquery's job as far as I know but the JScript garbage collector (which basically depends on the browser). The garbage collector is pretty smart so it shouldn't be any leak... serious leaks used to happen only on Circular References especially in IE6 for example, but even th

[jQuery] Re: jQuery with prototype - RTFM but still problem

2008-12-09 Thread Beres Botond
://www.cjd-rz.de/1http://www.cjd-rz.de/wp-content/themes/cjd/style.css Use Firefox 3 with Firebug to identify problems like this in 1 minute. On Dec 9, 3:37 pm, Beres Botond <[EMAIL PROTECTED]> wrote: > The source of the problem is that they both use $ as a shortcut. But > there are

[jQuery] Re: jQuery with prototype - RTFM but still problem

2008-12-09 Thread Beres Botond
The source of the problem is that they both use $ as a shortcut. But there are several ways to make the work together, I used prototype +jquery+scriptaculous together in several projects One of the most surefire ways to do this, but probably not the most elegant is the following: 1. Include proto