[jQuery] Horizontal Menu Plugin

2007-04-16 Thread James
th no real success as of yet. Thanks in advance! James

[jQuery] Re: jQuery syntax question

2009-07-13 Thread James
The eq() selector is one way of doing it: http://docs.jquery.com/Selectors/eq On Jul 13, 9:09 am, Matthew wrote: > So it seems like everyday I learn a new way to code the same thing. > What I am trying to do is add some code after a paragraph depending on > how many paragraphs are in the content

[jQuery] Re: Using jQuery to completely separate HTML from Javascript

2009-07-13 Thread James
Something like this could achieve what you want: $("a.link").click(function() { var id = this.id.split('-')[1]; // -> 1, 2, or 3 foo(id); return false; // prevents follow through of link }); On a side note, if you want to do a click and directly call a function without passi

[jQuery] Re: table cells selector question

2009-07-13 Thread James
Try closest(): http://docs.jquery.com/Traversing/closest text 1 text 2 text 3 $("td.someclass").click(function() { var parentTable = $(this).closest("table"); // and you can get the cells in several ways, here's one var cells = parentTable.find("td.someclass"); });

[jQuery] Re: Why does my Jquery elements handles not work?

2009-07-13 Thread James
parseInt(): http://www.w3schools.com/jsref/jsref_parseInt.asp Example: var sNum = "1234"; var n = parseInt(sNum, 10); // 10 means base-10 number sytem On Jul 13, 11:20 am, macjohn wrote: > It worked! > Thanks a million!! > > OK now that I am asking syupid questions: > > I pick up variables fro

[jQuery] Re: return false; on links only working on first click in IE

2009-07-13 Thread James
I'm not sure what the problem exactly is, but just pointing out what I see: var vtid=jQuery(this)..parent('div.controller') Do you have two dots there, or is that a typo? On Jul 12, 7:43 pm, pedalpete wrote: > I've been trying to make my very ajaxy site more SEO friendly, lots of > the returned

[jQuery] Re: Help with jQuery validator plug in

2009-07-13 Thread James
You have a copy of both jQuery 1.3.2 and 1.2.6 loaded on the page at the same time. That will probably cause issues... Use one or the other (preferably the latest version). On Jul 13, 3:45 am, erin_mcg wrote: > I've been searching for days for help on this and cannot find it > anywhere and if I

[jQuery] Re: Clone and Replace

2009-07-13 Thread James
I don't see anywhere in the code where you're setting an ID to the . And if you're cloning an existing that has an ID, that may cause issues because IDs are suppose to be unique on a page. Is there any reason you're cloning an existing instead of just appending it in with all the other content?

[jQuery] Re: Clone and Replace

2009-07-13 Thread James
How about just removing the empty and use something like the following for your insert row after your AJAX response: $("#groups").append(''); On Jul 13, 1:00 pm, Nate wrote: > Also, James, each table row has a unique id.  it will be called > something like i

[jQuery] Re: Clone and Replace

2009-07-13 Thread James
ah, I am new to jQuery...) > > I still want that table row to fade in...but neither method works: > > $('#groups').append('hello').fadeIn > ("fast"); > > $('#groups').fadeIn("fast").append('hello tr>'); >

[jQuery] Re: Chaining $.append

2009-07-13 Thread James
You forgot a closing quote on: onclick='return false; On Jul 13, 2:00 pm, dnagir wrote: > Hi Cody, > > > $("").text > > (data.Name).appendTo("#prods-list"); > > I tried this: > $(" link').appendTo("#foo") > > just on the jQuery doc page:http://docs.jquery.com/Manipulation/appendTo > > But it doe

[jQuery] Re: jquery alerts

2009-07-13 Thread James
The jQuery UI Dialogs are pretty decent. Is there any style in particular that you're interested in? On Jul 13, 7:45 am, reneara...@gmail.com wrote: > can anyone suggest some good jquery alert windows/dialogs?

[jQuery] Re: trigger click on an anchor

2009-07-13 Thread James
Yes, it's a little different. Calling click() will not do an auto- mouseclick on the link. You'd have to do something like: // set click callback $("#clickme").click(function() { location.href = this.href; // goes to link }); // trigger click callback $("#clickme").click(); On Jul 13, 7:0

[jQuery] Re: Validate - How do I $.ajax without using the form plugin?

2009-07-14 Thread James
Here's one way to do it: $("#ajax_form").validate( [set validation options] ); $("#submit_btn").click(function() { var valid = $("#ajax_form").valid(); // returns true or false if (valid) { // do ajax submission } }); On Jul 14, 7:33 am, ButtersRugby wrote: > I am t

[jQuery] Re: help on function val()

2009-07-14 Thread James
var $selected = $radioBoutons.filter(':checked'); This removes from the $radioBoutons set of all elements that are not checked (which should end up with 0 or 1 item). On Jul 14, 2:45 am, rejome wrote: > Great ! That works perfectly. > > One last question : > How can I use the variable declared

[jQuery] Re: Convert single click to double click?

2009-07-14 Thread James
Is the callback function of the double-click handler separate (has a variable name to reference)? If so, just use that function as the callback to the single-click handler. Otherwise, maybe you can just have the single-click trigger a double- click event. I haven't tried this. $("#myDiv").click(

[jQuery] Re: children() passable variables there

2009-07-14 Thread James
When you say "bogs down" does that mean it works, but very slow? Or does it mean it doesn't work at all? How many rows are you working with? On Jul 14, 1:31 am, Alexandru Adrian Dinulescu wrote: > Hello. > > I am trying to do >         $("tbody tr").each(function(){ >             $(this).childre

[jQuery] Re: getting xhtml custom data in select box

2009-07-14 Thread James
Try: $("select[id^=price_item_]").attr("data\\:interval"); On Jul 14, 1:22 pm, introvert wrote: > Hello, > > I have the following selectbox xhtml structure: > > >          Volvo >          Saab >          Mercedes >         Audi > > > Now I want to get the data:interval attribute value of the

[jQuery] Re: Inserting elements

2009-07-14 Thread James
What is the code you're using? $("ul.list").append('item 2'); should work from your html. On Jul 14, 2:24 pm, Eno wrote: > Given this HTML: > > item 1 > > How would I insert elements inside the element after the > existing ? I tried using append() but that created a second > element with th

[jQuery] Re: Dialog Box Trouble w/ Variables

2009-07-14 Thread James
Why on earth do you have: var modal = modal; ??? It doesn't make sense... Aside from that weirdness, you should set your code like: var content = { modal:true }; var $dialog = $("") .dialog(content); $dialog.dialog('open'); On Jul 14, 11:14 am, Nick wrote: > Anyone:  I cant seem t

[jQuery] Re: Doing something before the get request

2009-07-14 Thread James
$.ajax({ url: 'file.html', type: 'get', beforeSend: function() { // add loading image }, success: function(data) { ("#msg").html(data); }, error: function() { alert('something bad happened...'); } }); On Jul 14, 11:05 am, Fabio Milheiro wro

[jQuery] Re: Doing something before the get request

2009-07-15 Thread James
I insert the parameters. I couldn't find that > information anywhere else. > > Could you please tell me or indicate where I can see that. > > Regards > > On Jul 15, 3:16 am, James wrote: > > > $.ajax({ > >     url: 'file.html', > >     ty

[jQuery] Re: Jquery url encode

2009-07-15 Thread James
Using the Javascript escape() function should do the job most for you of the time. On Jul 15, 3:28 am, MorningZ wrote: > Honestly, you'd be better off encoding the results on the server > during the step "Im using Ajax to get results back" > > On Jul 15, 6:24 am, Aldo wrote: > > > Im using Ajax

[jQuery] Re: Detecting a redirect response to an Ajax query

2009-07-15 Thread James
jQuery does send the header: X-Requested-With: XMLHttpRequest so you can check for that on the server-side. On Jul 15, 11:47 am, candlerb wrote: > My complete() callback looks like this: > >       complete: function(res, status) { >         if ( status == "success" || status == "notmodified" )

[jQuery] Re: how to get the response header of an ajax request

2009-07-16 Thread James
Using $.ajax(), when you set a 'complete' callback function, the XHR object should be provided for you, which you're able to use to get the response headers. On Jul 16, 3:56 am, jeanluca wrote: > $.ajax({ >   type: "GET", >   url: my_url, >   async: false > > }).getAllResponseHeaders() ; > > On

[jQuery] Re: BUG: fadeIn callback gives error!

2009-07-16 Thread James
The code like: $("#featuredgame").fadeIn("slow", setTimeout("fadeOutFeaturedGame()", 5000)); Should be: $("#featuredgame").fadeIn("slow", function() { setTimeout(fadeOutFeaturedGame, 5000); }); The code like: $("#featuredgame").fadeOut("slow", fadeInFeaturedTvShow()); Should be: $("#featur

[jQuery] Re: data: $("#contact_form").serialize(),

2009-07-16 Thread James
Could you define "not working"? Are there any error messages? Is $("#contact_form").serialize() not giving the right values? Is the AJAX request not being sent? Is there no response coming back from the AJAX request? Try adding an 'error' callback also to see if it gets called. On Jul 15, 6:24 

[jQuery] Re: Binding Events on a Click

2009-07-16 Thread James
Here's an example (untested): http://link1.com"; class="link">Link 1 Hidden Text 1 http://link2.com"; class="link">Link 2 Hidden Text 2 http://link3.com"; class="link">Link 3 Hidden Text 3 $(function() { $(".a.link").click(function() { $(this).next('div').show(); // you might

[jQuery] Re: show dynamic changes when a refresh occurs

2009-07-16 Thread James
The data is still there since the browser does a cache of the form info, but dynamically created elements do not get cached in the same way, unfortunately. I haven't tried this before, but one thing you can try is to have a hidden input in your form, and the purpose of this is to store the number

[jQuery] Re: Recoving failure on request submission

2009-07-16 Thread James
I believe that jQuery Form extends jQuery's native $.ajax method, so you could use the options for $.ajax also. In $.ajax options, there's an 'error' callback for non-success responses. Additionally, there's a 'complete' callback which also passes a reference to the XMLHTTPRequest object (the core

[jQuery] Re: Can't iterate through SPANs and execute Ajax GET

2009-07-16 Thread James
It's a scope issue. $(document).ready(function() { $("span").each(function (i) { var mySpan = this; // set mySpan $.get("myfile.php", { target: this.id, key: "value" }, function(data) { // alert("Data Loaded: " + data); // mySpan wi

[jQuery] Re: show dynamic changes when a refresh occurs

2009-07-17 Thread James
r > function closeIt() { >     return "You will lose any data if you close or refresh the window > at this point!"; > > } > > and I want to remove the event handler when they submit the form >         >             onclick="onclick();" /> >      

[jQuery] Re: AJAX load()

2009-07-17 Thread James
How about something like this: $(document).ready(function(){ $('input.load').click(function(){ $('#Details').load('episodes.html .'+this.id); }); }); On Jul 17, 8:51 am, Phil wrote: > Here i have a problem: I a

[jQuery] Re: Newbie Datepicker Question

2009-07-17 Thread James
Is the initial value in the textbox in the same format the datepicker would put into the textbox if a date was selected? (e.g. 4/03/2010, and not 4/03/2010) On Jul 17, 8:30 am, sankofa wrote: > I have succesfully applied the datepicker to a blank textbox. > > However, when I apply the datepicker

[jQuery] Re: Newbie Datepicker Question

2009-07-17 Thread James
Sorry, that should've been: (e.g. 4/03/2010, and not 04/03/2010) On Jul 17, 9:16 am, James wrote: > Is the initial value in the textbox in the same format the datepicker > would put into the textbox if a date was selected? > (e.g. 4/03/2010, and not 4/03/2010) > > On Jul

[jQuery] Re: non-ajax Post?

2009-07-17 Thread James
What happens if you use $.ajax and set option async:false? It might stall the page a little, but try to see if it works. On Jul 17, 9:17 am, Theodore Ni wrote: > Your best option is to log on the server-side page the form submits to. > Barring that, you can always submit the form on a callback f

[jQuery] Re: Injecting tags to specific location.

2009-07-17 Thread James
I think something as simple as this should work: $("#maincontent, #left, #right").each(function() { var content = $(this).html(); $(this).html(''+content+''); }); Might get a bit more complicated if there are other javascript that acts on the content. It might break some existing css als

[jQuery] Re: I dont understand why this doesnt work.

2009-07-17 Thread James
Maybe you should try using Twitter's API (with JSON) along with the jQuery's $.getJSON(). On Jul 17, 10:09 am, Mike wrote: > Its simple: > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";> > http://www.w3.org/1999/xhtml"; > > >     > >     > >     >  $(document).ready(function() {

[jQuery] Re: Newbie Datepicker Question

2009-07-17 Thread James
That was just an example. You should try to make it the same then. Use your server-side script that gets the date from the database to format the date before you output it so it's the same as what datepicker uses (or whatever you set it). On Jul 17, 9:50 am, sankofa wrote: > The initial value is

[jQuery] Re: event.preventDefault(); not working in IE

2009-07-17 Thread James
Without seeing the context of the rest of your code, it's difficult to help. Are you sure 'event' is set to the correct event object? On Jul 17, 10:18 am, robotwink wrote: > Hello, > > I'm using IE8 and when I pass: event.preventDefault(); I get an error > message: > > Webpage error details > >

[jQuery] Re: event.preventDefault(); not working in IE

2009-07-17 Thread James
t; > Here's how it looks: > > > <!-- > > $(document).ready(function() { >         $("#send").click(function (){ > >                 event.preventDefault(); > >         }); > > }); > > //--> > > > On Jul 17, 4:25 pm, James wr

[jQuery] Re: Ajax Upload

2009-07-17 Thread James
You can't rename the file on the user's computer. Only the final saved file on the server-side. You'd have to change the script to change the alert text making it seem like that file [username]_15987456.jpg was uploaded. On Jul 17, 3:45 pm, "Dave Maharaj :: WidePixels.com" wrote: > I an using th

[jQuery] input fields don't work after using $load()

2009-07-20 Thread James
I am using the $(load) function to populate a div in my HTML with form. The code snippets look something like this. ... ... ... ... $('#formArea').load('content/myForm.txt'); The form loads fine, but the input controls no longer work once the form is loaded using this AJAX technique. Does

[jQuery] Re: attr() on crashing IE6

2009-07-20 Thread James
If I remember right, IE6 has issues with creating elements without using createElement() and adding attributes to them afterwards. Using the method that Hector specified to create the element should prevent the issue from occuring in IE6. On Jul 20, 8:59 am, Hector Virgen wrote: > This seems pos

[jQuery] Re: Username availability check and form validation

2009-07-20 Thread James
The code you provided is just the check when the field has the blurred event called. Are you also doing the check when the form is submitted? You have to do some kind of check on form submit, and if it doesn't pass, do a "return false;" and the form should not be submitted. On Jul 20, 2:28 am, ps

[jQuery] Re: input fields don't work after using $load()

2009-07-20 Thread James
Read: Why do my events stop working after an AJAX request? http://docs.jquery.com/Frequently_Asked_Questions#Why_do_my_events_stop_working_after_an_AJAX_request.3F On Jul 19, 8:31 pm, James wrote: > I am using the $(load) function to populate a div in my HTML with > form.  The code sn

[jQuery] Re: Rename a file name

2009-07-20 Thread James
Could you give an example of a 'before' and 'after' of a filename? On Jul 20, 1:43 pm, "Dave Maharaj :: WidePixels.com" wrote: > I was wondering if someone could point out how to rename a file name. > > In the script I am using I see > > function fileFromPath(file){   >   return file.replace(/.*

[jQuery] Re: Rename a file name

2009-07-20 Thread James
ve Maharaj :: WidePixels.com" wrote: >  Before could be anything the user has 07.jpg to > this_is_my_best_friends_wedding.jpg and I just want to completely remove > everything before the extension and replace it with something unique like > date/time so 12565895.jpg > > -----Or

[jQuery] Re: Delay a swap of a DIV

2009-07-22 Thread James
window.setTimeout(function() { $('#main-nobut').hide('slow'); $('#main-but').show('slow'); }, 5000); 5000 is 5000ms, or 5 seconds. Do you have a way to retrieve this time on when you want it to appear? On Jul 22, 9:57 am, Mats wrote: > How do I bind this in with the show/hide using jQue

[jQuery] Re: Parsing a complicated JSON file with JQUERY !

2009-07-22 Thread James
What exactly do you want to do? How is the JSON content stored? In a separate file? On the document? Is it introduced through jQuery's getJSON()? Is it stored as a string in some variable? On Jul 22, 5:17 am, Abraham Boray wrote: > As U can see guys , I got that json structure , & I want to pars

[jQuery] Re: jquery cookie text resizer

2009-07-23 Thread James
Inside the textResize() function, on the first line try adding: level = parseInt(level); I'm thinking when you're manually calling textResize, you're doing something like: textResize(3); But when you're doing it through the cookie, it's not an Integer, it's a String: textResize("3"); Your switc

[jQuery] Re: Detect ajax with file uploads

2009-07-23 Thread James
Are you sure it doesn't receive the HTTP_X_REQUESTED_WITH header? It should be sent by jQuery. Which Browser/OS and jQuery version are you using? Have you tried using Firebug to check if the X_REQUESTED_WITH header is being sent? On Jul 23, 9:50 am, Lito wrote: > Hi! I'm developing a framework t

[jQuery] Re: Using a load function with a post

2009-07-24 Thread James
According to the documentation for $.load: http://docs.jquery.com/Ajax/load "if you pass in any extra parameters in the form of an Object/Map (key/ value pairs) then a POST will occur. Extra parameters passed as a string will still use a GET request." Using serialize() will pass the data value i

[jQuery] Re: newbie question.

2009-07-27 Thread James
This: (function() { do some stuff } )(); is known as a closure. It just runs once and it does not leave around any global variables (that is, if you also don't set any inside this function also). Compared to this: function doSomething() { // do some stuff }; The doSomething variable will exist

[jQuery] Re: how to delay operation

2009-07-27 Thread James
You want to do this with jQuery (Javascript)? This should be done on the server side. A user can stop Javascript, you know. If the user submits the form and doesn't wait for 30 seconds before going to another website, the email will not be sent to them... On Jul 24, 7:54 pm, bharani kumar wrote:

[jQuery] Re: Selecting the values of radio buttons

2009-07-27 Thread James
It sounds strange that value="2" would be the number of points. Usually, a value would be used to indicate a unique answer for a question. Usually, 1, 2, 3, 4 if you have 4 possible answers for one question. I would suggest using the ID or CLASS attribute, or Javascript objects to store that type

[jQuery] Re: jQuery + Ajax request

2009-07-27 Thread James
IDs in HTML are unique. You cannot have multiple elements with id="removeSearchword". You can use the CLASS attribute instead, or make unique IDs like: id="removeSearchword_1", id="removeSearchword_2", ... and then change your selector to: $("[id^=removeSearchword_]").click(...); On Jul 26, 10:0

[jQuery] Re: Fetching data from callback with $.ajax

2009-07-27 Thread James
If you want a global variable, set a global variable. var isAuthenticated = false; $(document).ready(function(){ // do your ajax here and set: isAuthenticated = true; // in your success callback }); On Jul 26, 5:27 am, FrenchiINLA wrote: > I would do like that: > isAuthenticated function

[jQuery] Re: consistently unable to get return false to work, why?

2009-07-27 Thread James
If the return false fails, it's usually something wrong with parsing your Javascript that causes the problem. For example: $("input#email).after("works"); It's missing a closing quote (") after "email". On Jul 27, 12:28 pm, pedalpete wrote: > Thanks John, > > I wasn't familiar with the .live()

[jQuery] Re: newbie question.

2009-07-27 Thread James
No problem, Michael. Thanks for the clarification regarding an anonymous function and a closure, and the detailed explanation for closures. I'll give some related resources a good read on closures. :) On Jul 27, 1:46 pm, "Michael Geary" wrote: > That's a great explana

[jQuery] Re: JQuery Load() with callback functionality

2009-07-28 Thread James
Here: $("#report_here").load("/admin/reports/statistics_report/", { // Parameters sent go here }, finished() "finished()" is suppose to be "finished", without the parenthesis. On Jul 28, 4:18 am, "chris.j.p...@googlemail.com" wrote: > Hi, > > I have a func

[jQuery] Re: run function in success event

2009-07-30 Thread James
To run a callback function without any arguments, use: success: HidePreloaderBlue To run one with arguments, use: success: function() { HidePreloader("#bluePreloader"); } On Jul 29, 4:54 pm, orangdalam wrote: > i wrote this code: > >

[jQuery] Re: Simple calculation

2009-07-30 Thread James
Make sure to typecast your data from Strings to Integers/Floats before you do calculations on them. Otherwise, 1+1 may equal 11. Use the parseInt() or parseFloat() functions. http://www.w3schools.com/jsref/jsref_parseInt.asp http://www.w3schools.com/jsref/jsref_parseFloat.asp On Jul 30, 9:15 am,

[jQuery] Re: jQuery and the 'this' keyword

2009-07-30 Thread James
Why not just use: myObj.OtherFunction(); On Jul 30, 9:53 am, Michael Lawson wrote: > Hmmm i'm not quite sure what you're trying to do exactly :) > > cheers > > Michael Lawson > Development Lead, Global Solutions, ibm.com > Phone:  1-276-206-8393 > E-mail:  mjlaw...@us.ibm.com > > 'Whether one b

[jQuery] Re: jquery blocks javascript?

2009-07-30 Thread James
You need to use jQuery version 1.3 or greater to use $.live(). Otherwise you can use the livequery plugin with older versions of jQuery. On Jul 30, 12:54 pm, solow wrote: > JS ERROR: > > Gebruikersagent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; > Trident/4.0) > Tijdstempel: Thu, 30 Jul

[jQuery] Re: Slow response to AJAX calls in IE7

2009-07-31 Thread James
Are you sure it's the call? Or is it the response callback? Are you doing something like writing to the DOM after the AJAX response? A little code would be helpful to see what's going on. On Jul 30, 7:05 pm, Justin wrote: > I am developing quite a complex user interface in jQuery that relies > o

[jQuery] Re: $(this).text().trim().toLowerCase() throwing errors in IE

2009-07-31 Thread James
jQuery's trim is used like: var str = $.trim(str); On Jul 31, 10:24 am, Magnificent wrote: > Hi all, > > I'm running into an IE7 problem where the Visual Studio debugger is > saying: > > "Microsoft JScript runtime error: Object doesn't support this property > or method" > > Visual Studio is high

[jQuery] Re: $(this).text().trim().toLowerCase() throwing errors in IE

2009-07-31 Thread James
oops, bad use of "var" here, but you get the idea. ;) On Jul 31, 10:29 am, James wrote: > jQuery's trim is used like: > var str = $.trim(str); > > On Jul 31, 10:24 am, Magnificent > > wrote: > > Hi all, > > > I'm running into an IE7 p

[jQuery] Re: Caching of javascript files

2009-07-31 Thread James
If domainA and domainB both have a relative link to /resources/ jquery-1.3.2.js, they both will not share the same cached copy of jQuery. You'll need to use an absolute url that both point to the same place, like you mentioned with Google's AJAX Libs. That's where the advantage is for those who vi

[jQuery] Re: $(this).text().trim().toLowerCase() throwing errors in IE

2009-07-31 Thread James
Yeah, I believe the JS implementation in FF3.5 now have native trim functions: https://developer.mozilla.org/En/Firefox_3.5_for_developers On Jul 31, 10:53 am, Magnificent wrote: > It's interesting how Firefox 3.5.1 doesn't seem to have a problem with > my original syntax/chain.

[jQuery] Re: Select Boxes - Pulling the currently selected string instead of value

2009-07-31 Thread James
Either of these should work: $("#choices option:selected").text(); $("#choices option:selected")[0].text; On Jul 31, 10:45 am, Zaliek wrote: > How do I retrieve the currently selected option string in a select box > instead of the value? > > String > > > Using > $("#choices").val(); > returns

[jQuery] Re: Get append() result

2009-08-03 Thread James
How about: $row = $("..."); var newrow = $row.appendTo("#docs tbody"); On Aug 3, 11:51 am, Brad wrote: > If I add a row to a table in the following manner, how can I get a > reference to the added row? > > var row = "..."; > var newrow; > newrow = $('#docs tbody').append(row); > > With the abov

[jQuery] Re: Get this in ajax

2009-08-04 Thread James
$('.del').live('click', function() { var str = $(this).serialize() + '&js=true'; var $this = $(this); // set variable here $.ajax({ url: $(this).attr('action'), data: str, beforeSend: function() { },

[jQuery] Re: binding "text" event

2009-08-05 Thread James
You can also register and bind custom events through it, so you can pretty much put 'anything' inside $.bind. For more info, just do a search on creating custom events with jQuery and you'll find some stuff. Just curious, how does what you're doing come in useful when handling Chinese input? On

[jQuery] Re: Using .live and .each

2009-08-05 Thread James
It's not clear what you want to do. You said you are "not using ajax" but you have content "brought in through ajax". What exactly do you need $.live for? For what browser event? On Aug 5, 1:17 pm, Nic Hubbard wrote: > Anyone?  Someone must have done this... > > On Aug 5, 11:32 am, Nic Hubbard

[jQuery] Re: Using .live and .each

2009-08-06 Thread James
sing ajax I bring in new content such as: > > my iso date > > Each time I insert these into the DOM they need to be converted.  The > above script was used to convert them on page load and did not account > for content being added using ajax. > > On Aug 5, 5:14 pm, James wro

[jQuery] Re: Click event to load a new page

2009-08-06 Thread James
Do you mean that when someone clicks on an image, it just goes to a different page? (Similar to a normal tag around an image.) If so: $("#i4").click(function() { document.location.href = 'index.php? whichPage=slider&whichAct=0&subPage=mixnmingle'; }); Or did you mean "load" an external page

[jQuery] Re: IE6 - Ajax onchange error

2009-08-06 Thread James
Please post some example code. On Aug 6, 3:20 am, Matthias Kolbe wrote: > Hello there :o) > > I have a little problem, I have 4 selectboxes with an onchange event. > > Onchange should call an ajax request using jquery and reload those > boxes. > > The problem is, that the selectbox I used for se

[jQuery] Re: Make event happen after a certain amount of time has passed.

2009-08-06 Thread James
Use the setTimeout/setInterval functions with some kind of global counter. If some kind of action/event occurs, the counter would be refreshed and the function would not execute. Would you like to specify in more detail what you would like to achieve? On Aug 6, 11:43 am, Simon wrote: > Hey, > >

[jQuery] Re: Make event happen after a certain amount of time has passed.

2009-08-06 Thread James
ion (in case > he/she doesn't get it that it would move, dunno). > > > > On Thu, Aug 6, 2009 at 6:03 PM, James wrote: > > > Use the setTimeout/setInterval functions with some kind of global > > counter. If some kind of action/event occurs, the counter would be > > re

[jQuery] Re: a selector does not in safari

2009-08-06 Thread James
That selector works fine in Safari and Chrome (WinXP) for me. Could you post your HTML and any relevant code on what you're doing? On Aug 6, 7:43 am, hobbyman wrote: > I am programming in ASP.NET and using a "hidden" server control which > basically creates a hidden input in the browser. > > The

[jQuery] Re: Attribute selection not working in MSIE; eg $("input[name=name]").val()

2009-08-07 Thread James
Try it here if it works or not: http://jsbin.com/imadi On Aug 7, 4:57 am, "Cesar Sanz" wrote: > mmm.. > > $(document).ready(function(){ var x = $("input[name=name]").val(); > window.alert(x); }); > > Works for me in IE 7 > > When you say "no results", do you mean, an error?? or just that > $("i

[jQuery] Re: count checkboxes selected

2009-08-07 Thread James
Suppose all your checkbox has the class "myCheckbox": var numSelected = $("input.myCheckbox:checked").length; alert(numSelected); You can use simple math to get how many are remaining. On Aug 7, 10:53 am, ripcurlksm wrote: > I have a script where a user can select any 10 out of 20 CD's. I am u

[jQuery] Re: count checkboxes selected

2009-08-07 Thread James
It was an example to show you how to get the number of selected checkbox... If you want to integrate it with events, then you might want to do something like: $("input.myCheckbox").click(function() { var numSelected = $("input.myCheckbox:checked").length; var numLeft = 10 - parseInt(numS

[jQuery] Re: count checkboxes selected

2009-08-07 Thread James
puts with id that begins with "chkLimit_". On Aug 7, 12:36 pm, ripcurlksm wrote: > Thanks James, that was really helpful -- I've placed the code, but I can not > get it to populate the . Did I place it in the correct area? > > http://psylicyde.com/misc/checkbox > -- &g

[jQuery] Re: Checkbox behaviour

2009-08-07 Thread James
You can have as many document ready checks as you want. I'd like to keep things organized by only having one though. As for the checkbox being selected by default when the page loads, you can do either of two things: 1) run the function on page load that checks for the checkbox and do any changes

[jQuery] Re: jquery(VALIDATE)

2009-08-07 Thread James
Well, to look at the actual AJAX response, you can use Firebug for Firefox to see it. You're suppose to have your remote page return "true" if it's good and "false" if it's not okay. Looking at your code, both username and email validation checks have the same url and data. Ideally, you're suppos

[jQuery] Re: input has focus

2009-08-10 Thread James
You can still use the same technique but just not use jQuery to do it. On Aug 10, 10:09 am, MartinBorthiry wrote: > On 10 ago, 16:49, "Dan G. Switzer, II" > wrote: > > > You can add a class to your field when it has focus and then check for the > > class: > > $(":input") > > // add focus/blur e

[jQuery] Re: How to identify if user chose to see secure only or secure and nonsecure items

2009-08-11 Thread James
I've haven't tried Google AdSense before to know much about it, but I'm wondering if this page is of help to you. http://nedbatchelder.com/blog/200710/httphttps_transitions_and_relative_urls.html However, depending on what your purpose is of the secure page (e.g. login, registration with sensitiv

[jQuery] Re: jQuery not working with content that is loaded in.

2009-08-11 Thread James
Does "reloading" perform some kind of action that modifies the DOM (e.g. introduce new content via AJAX). If so, then this FAQ may explain your problem: http://docs.jquery.com/Frequently_Asked_Questions#Why_do_my_events_stop_working_after_an_AJAX_request.3F On Aug 11, 6:03 am, cz231 wrote: > Hi,

[jQuery] Re: how to write a frameset with jquery

2009-08-11 Thread James
Have you tried hard-coding the frameset HTML in the source (not via Javascript) to see if the page shows up properly? Also, try using Firebug for Firefox to debug. With Firebug you can view the HTML as it is even with content dynamically added after page load. On Aug 10, 11:31 pm, cokegen wrote

[jQuery] Re: Replace script tag

2009-08-11 Thread James
The way you're doing this looks very unnatural by having the script tag in the middle of your content. What exactly are you trying to achieve? Just adding text? It would be better if you did something like this: 11Csere()22 $(function() { $("#lufi").text('Duma'); }); And if you wan

[jQuery] Re: Pagination

2009-08-11 Thread James
I'm assuming a page is a dynamic page with the same URL? For example, a different layer or content loaded dynamically via AJAX. If that's the case one way is through the URL hash (e.g. page.html#p3 - indicates page 3). Every time you change a page, you update the hash in the URL. If you do a searc

[jQuery] Re: Pagination

2009-08-11 Thread James
Geez, I screwed up on a sentence pretty badly.. "so technically hitting backspace on your keyboard will navigate through the changes in hash." On Aug 11, 9:43 am, James wrote: > I'm assuming a page is a dynamic page with the same URL? For example, > a different la

[jQuery] Re: Embedded JavaScript Not Loading With .load() Call

2009-08-11 Thread James
Are you putting your code in the document ready function? http://docs.jquery.com/Tutorials:Introducing_%24%28document%29.ready%28%29 On Aug 11, 6:51 am, Steven wrote: > I'm using this code for my website to load pages dynamically: > >         var hash = window.location.hash.substr(1); >        

[jQuery] Re: iframe not always loading

2009-08-11 Thread James
Please provide some code as to how you're doing this. Thanks. On Aug 11, 4:22 am, sorinh wrote: > hi > > i havehttp://www.qualitydesign.ro/test/jquery/and at the "three" > button i've inserted an .., but it's loaded only > once, click on the "one", "two", "three" and again 1,2,3. what seems > to

[jQuery] Re: How to use this "this" event which has been passed to a function as a parameter

2009-08-11 Thread James
This: $(obj).parent.addClass("newstyle"); should be like: $(obj).parent().addClass("newstyle"); On Aug 11, 1:08 pm, Russ wrote: > Hello, > > I have a link; > click me > > And what i'd like to do is use the "this" object to manipulate the css > of its parent; > > function DoSomething(obj) { > >

[jQuery] Re: Post variable array

2009-08-12 Thread James
I don't see the problem... Something like this should work: var action = 'somepage.php'; var postThis = {Name:"Jimmy", Username:"Something", Password:"something", Email:"someth...@someplace.com"}; $.post(action, postThis, function(data) { alert('done'); }); Otherwise, post your real code fo

[jQuery] Re: Post variable array

2009-08-12 Thread James
type is correct) > > On Aug 12, 2:00 pm, James wrote: > > > I don't see the problem... > > > Something like this should work: > > > var action = 'somepage.php'; > > var postThis = {Name:"Jimmy", Username:"Something&q

[jQuery] Re: Post variable array

2009-08-12 Thread James
the json2.js file. On Aug 12, 11:37 am, cz231 wrote: > And there's no way to do it without adding another js file? > > I ask because for this project is pretty important to keep the number > of requests down. > > On Aug 12, 3:43 pm, James wrote: > > > The type yo

  1   2   3   4   5   6   7   8   9   10   >