[jQuery] Re: [autocomplete] Dynamic textboxs

2009-08-06 Thread Jake McGraw

Every time you insert a new text field to the DOM, you have to call
autocomplete().

On Wed, Jul 22, 2009 at 10:03 AM, escriba wrote:
>
> I can't put autocomplete working with dynamic textboxs. I have a
> javascript function to add dynamic textboxs, but when i attach the
> autocomplete function to the dynamic textboxs, it doenst work.
>
> Some work that might help this issue:
>
> // Javascript function that adds dynamicly textboxs
>
> var initial_count = new Array();
> var rows_limit = 5; // Set to 0 to disable limitation
>
> function addRow(table_id)
> {
>        var tbl = document.getElementById(table_id);
>        // counting rows in table
>        var rows_count = tbl.rows.length;
>        if (initial_count[table_id] == undefined)
>        {
>                // if it is first adding in this table setting initial rows 
> count
>                initial_count[table_id] = rows_count;
>        }
>        // determining real count of added fields
>        var tFielsNum =  rows_count - initial_count[table_id];
>        if (rows_limit!=0 && tFielsNum >= rows_limit) return false;
>        var input = ' id="bla" size="70" maxlength="250"/>';
>        var remove= '';
>
>        try
>        {
>                var newRow = tbl.insertRow(rows_count);
>                var newCell = newRow.insertCell(0);
>                newCell.innerHTML = input;
>                var newCell = newRow.insertCell(1);
>                newCell.innerHTML = remove;
>        }
>        catch (ex) {
>                //if exception occurs
>                alert(ex);
>        }
> }
>
> // Button that adds textboxs dynamicly
> 
>
> // Jquery autocomplete function call
>
> $(document).ready(function()
> {
>        $("#bla").autocomplete(cities);
> });
>
> NOTICE: I already have this working with fixed textboxs, the only
> problem is with dynamicly added textboxs. Thanks
>


[jQuery] Re: Please Help - While Loop PHP & JSON - Comment List

2009-04-29 Thread Jake McGraw

#commentWrapper is the selector for the following element:



The JS I provided will append that element if it isn't already
present. I did have to make a single change:

$(body).append('');

to:

$("body").append('');

Also, you should specify the type expected for the $.post call:

$.post(url, data, callback, ### type goes here ###);

For your purposes:

$.post("url", {/* data */}, function(data){/* callback */}, "json");

I've updated the following example code:

http://snipt.net/jakemcgraw/jquery-listserv-answer-ajax-comment-list

- jake

On Tue, Apr 28, 2009 at 10:55 PM, fluxUX  wrote:
>
> This is great. Thanks so much!
>
> For some reason the DIV for the "commentWrapper" is not working on the
> render page..here is what I have:
>
> 
>
> 
> 
> go
> 
>
> 
> 
>
> It appears the code you provided amends the DIV. Any thoughts would be
> great?
>
> On Apr 28, 5:11 pm, Jake McGraw  wrote:
>> You've got quite a few errors in both your JavaScript and PHP, which
>> probably explains the lack of answers. Utilizing AJAX using jQuery and
>> PHP can be a bit confusing at first, I've tried to make some sense of
>> what you're doing here:
>>
>> http://snipt.net/jakemcgraw/jquery-listserv-answer-ajax-comment-list
>>
>> - jake
>>
>> On Tue, Apr 28, 2009 at 12:17 PM, fluxUX  wrote:
>>
>> > I want to display an unordered list of comments from my echoed JSON
>> > result using this jQuery code block:
>>
>> > $("#goComment").click(function(){
>>
>> > bigComment = $("#bigComment").val();
>>
>> >                    $.post("i-upComments.php", {      //this inserts the 
>> > comment
>> > into the 'comments' table in the DB
>>
>> >                bigComment: bigComment,
>> >                u: u,
>>
>> >            }, function(data){
>>
>> >           //display the list of comments as a unordered list - LI
>>
>> >        });
>>
>> >        });
>>
>> > -
>> > Here is my PHP:
>>
>> > >
>> > include_once("db.php");
>>
>> > $u = 'Jl6XR';
>>
>> > $sql = "SELECT * FROM bigNest INNER JOIN comments ON comments.u =
>> > bigNest.uid";
>>
>> > $result = mysql_query($sql);
>>
>> > while($array = mysql_fetch_array($result)) {
>>
>> > $bigtitle = $array[bigtitle];
>> > $bigbody = $array[bigbody];
>> > $comments = $array[comments];
>> > }
>>
>> > $val = array("bigtitle" => $bigtitle,
>> >             "bigbody" => $bigbody,
>> >             "comments" => $comments,
>>
>> >            );
>>
>> > $output = json_encode($val);
>> > echo $output."\n";
>>
>> > ?>


[jQuery] Re: Please Help - While Loop PHP & JSON - Comment List

2009-04-28 Thread Jake McGraw

You've got quite a few errors in both your JavaScript and PHP, which
probably explains the lack of answers. Utilizing AJAX using jQuery and
PHP can be a bit confusing at first, I've tried to make some sense of
what you're doing here:

http://snipt.net/jakemcgraw/jquery-listserv-answer-ajax-comment-list

- jake

On Tue, Apr 28, 2009 at 12:17 PM, fluxUX  wrote:
>
> I want to display an unordered list of comments from my echoed JSON
> result using this jQuery code block:
>
> $("#goComment").click(function(){
>
> bigComment = $("#bigComment").val();
>
>                    $.post("i-upComments.php", {      //this inserts the 
> comment
> into the 'comments' table in the DB
>
>                bigComment: bigComment,
>                u: u,
>
>            }, function(data){
>
>           //display the list of comments as a unordered list - LI
>
>        });
>
>        });
>
> -
> Here is my PHP:
>
> 
> include_once("db.php");
>
> $u = 'Jl6XR';
>
> $sql = "SELECT * FROM bigNest INNER JOIN comments ON comments.u =
> bigNest.uid";
>
> $result = mysql_query($sql);
>
> while($array = mysql_fetch_array($result)) {
>
> $bigtitle = $array[bigtitle];
> $bigbody = $array[bigbody];
> $comments = $array[comments];
> }
>
> $val = array("bigtitle" => $bigtitle,
>             "bigbody" => $bigbody,
>             "comments" => $comments,
>
>            );
>
> $output = json_encode($val);
> echo $output."\n";
>
>
> ?>
>


[jQuery] Re: finding

2008-12-02 Thread Jake McGraw

On Tue, Dec 2, 2008 at 2:23 PM, Jeffrey Kretz <[EMAIL PROTECTED]> wrote:
>
> 
> Before I answer, I've gotta ask (I've been wondering for MONTHS), have you
> read the Starrigger series?
> 

Previously, Googling "jake mcgraw"  would bring up hits for the
Starrigger series... as you can see:

http://www.google.com/search?q=jake+mcgraw

I've fixed that. I know about the series but have never read any of it.

>
> Now that that's out of the way, I can think of a couple of approaches.
>
> #1. Parse the links with regex
>
> $.get(link,{},function(html){
>  var r_links = /]*?href\s*=\s*['"]([^"'>]+)[^>]*>/gi;
>  var m;
>  while (m=r_links.exec(html))
>  {
>makeRequest(m[1]);
>  }
> });
>
> #2. Remove the script tags and inline events with regex, then grab the HTML.
>
> var makeRequest = function(link) {
>  $.get(link, {}, function(html){
>  html =
> html.replace(//gi,'').replace(/on\w+\s*=\s*(['"])
> [^"'>]+\1/gi,'');
>  $("a", html).each(function(){
>makeRequest($(this).attr("href"));
>  });
>  });
> }

I'll test what the performance is for eacvh of those methods, thanks
for the advice.

- jake


>
> -Original Message-
> From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of Jake McGraw
> Sent: Tuesday, December 02, 2008 7:09 AM
> To: jquery-en@googlegroups.com
> Subject: [jQuery] Re: finding 

[jQuery] Re: finding

2008-12-02 Thread Jake McGraw

Whoops, not trying to top post, but I believe our threads are related,
in that we're both processing HTML from an AJAX request.

Sorry,
- jake

On Tue, Dec 2, 2008 at 10:08 AM, Jake McGraw <[EMAIL PROTECTED]> wrote:
> I'm using jQuery AJAX to recursively spider a website to build a
> sitemap.xml file. I'll acknowledge that this is an ass backwards
> method for building a sitemap, but let's put aside that issue. My
> issue is that I'd like to be able to parse anchors in each page, but
> not execute the JavaScript on the page. The pseudo code looks
> something like:
>
> var makeRequest = function(link) {
>  $.get(link, {}, function(html){
>  $("a", html).each(function(){
>makeRequest($(this).attr("href"));
>  });
>  });
> }
>
> $("a").each(function(){
>  makeRequest($(this).attr("href"));
> });
>
> My problem is that when I do $("a", html), the html is executed (DOM?)
> and IE complains about JavaScript errors. My question is can I prevent
> the JS from being executed, external resources from being loaded (img,
> css) but still get the anchors for each page?
>
> - jake
>
> On Thu, Nov 6, 2008 at 1:01 PM, axemonkey <[EMAIL PROTECTED]> wrote:
>>
>> Hi all. I'm having an amazing amount of pain trying to parse and
>> execute JS script blocks in remote HTML (in IE, typically).
>>
>> Here's the code in question:
>>
>> $.ajax({
>>type:   "POST",
>>url:checkFilename,
>>dataType:   "text",
>>success:function(src){
>>var wtf = $(src).find("script").each(function(){
>>eval( $(this).text() );
>>});
>>}
>> });
>>
>> http://www.pastie.org/308878
>>
>> checkFilename is just an HTML file, so src comes back with the entire
>> source of that page. What I want to do then is use find() to get all
>> inline 

[jQuery] Re: finding

2008-12-02 Thread Jake McGraw

I'm using jQuery AJAX to recursively spider a website to build a
sitemap.xml file. I'll acknowledge that this is an ass backwards
method for building a sitemap, but let's put aside that issue. My
issue is that I'd like to be able to parse anchors in each page, but
not execute the JavaScript on the page. The pseudo code looks
something like:

var makeRequest = function(link) {
 $.get(link, {}, function(html){
  $("a", html).each(function(){
makeRequest($(this).attr("href"));
  });
 });
}

$("a").each(function(){
  makeRequest($(this).attr("href"));
});

My problem is that when I do $("a", html), the html is executed (DOM?)
and IE complains about JavaScript errors. My question is can I prevent
the JS from being executed, external resources from being loaded (img,
css) but still get the anchors for each page?

- jake

On Thu, Nov 6, 2008 at 1:01 PM, axemonkey <[EMAIL PROTECTED]> wrote:
>
> Hi all. I'm having an amazing amount of pain trying to parse and
> execute JS script blocks in remote HTML (in IE, typically).
>
> Here's the code in question:
>
> $.ajax({
>type:   "POST",
>url:checkFilename,
>dataType:   "text",
>success:function(src){
>var wtf = $(src).find("script").each(function(){
>eval( $(this).text() );
>});
>}
> });
>
> http://www.pastie.org/308878
>
> checkFilename is just an HTML file, so src comes back with the entire
> source of that page. What I want to do then is use find() to get all
> inline 

[jQuery] LiveQuery won't allow explicit onchange firing?

2008-10-08 Thread Jake McGraw

Using livequery for a project when I ran across an issue using the
following code:

$("input").livequery( "change", function(){

  if ($(this).is(":checked")) {
alert("checked!");
  } else {
alert("not checked!");
  }

}).change();

My problem is the chained "change" function call. It looks like
livequery doesn't like when I directly call events from within jQuery,
custom events don't work either:

$("input"),livequery("demo.change", function(){

  if ($(this).is(":checked")) {
alert("checked!");
  } else {
alert("not checked!");
  }

}).change(function(){

  $(this).trigger("demo.change");

}).change();

This does work, but doesn't utilize livequery:

$("input").change(function(){

  if ($(this).is(":checked")) {
alert("checked!");
  } else {
alert("not checked!");
  }

}).change();

So, my question is, how do I trigger livequery events within JavaScript?

- jake


[jQuery] Re: help with ajax post

2008-09-05 Thread Jake McGraw

$.ajax({
type: "POST"
, url: "GetNewHash.aspx"
, data:
{
  orderid : $("#orderid").val()
  , amount : $("#amount").val()
  , dtnow : $("#time").val()
  , Gateway_MerchantConfigID : $("#Gateway_MerchantConfigID").val()
}
   , async: false
   , success : function (response) {
 $("#hash").val(response);
   }
});

- jake

On Fri, Sep 5, 2008 at 3:36 PM, nananannae2 <[EMAIL PROTECTED]> wrote:
>
> can someone help me get this to work please?  i need a post to a page
> that returns a string to set but it's my first time using it
>
>  $("#hash").val(
>   $.ajax({type: "POST"
>   ,url: "GetNewHash.aspx"
>   ,data:"orderid="+ $("#orderid").val()+"&amount="+ $
> ("#amount").val()+"&dtnow="+ $("#time").val()
> +"&Gateway_MerchantConfigID="+ $("#Gateway_MerchantConfigID").val()"
>   ,async: false}).responseText);
>


[jQuery] Re: Anyone know where to ask jQuery questions?

2008-09-05 Thread Jake McGraw

Jim:

See this http://dev.jquery.com/ticket/3143. Long story short, jQuery
only supports $(html) or $(xmlObject).

- jake

On Fri, Sep 5, 2008 at 2:53 PM, Jim Buzbee <[EMAIL PROTECTED]> wrote:
>
> I must be in the wrong group. This morning, I posted a question ("I
> must be missing something simple...") on a pared-down jQuery code
> segment and a URL showing the problem. Out of the 10,000+ members of
> the mailing list, my Apache log shows a grand total of 1 hit on the
> example and I got no response on the mailing list.
>
> I must be in the wrong list. Is there somewhere to ask jQuery
> questions?
>
> Once again, the code in question can be found at:
>
> http://batbox.org/bh.html
>
> It works under firefox/safari, and doesn't under IE7
>
> Thanks,
> Jim Buzbee
>


[jQuery] Re: Preview: Password validation and strength meter

2008-08-21 Thread Jake McGraw

Couple of things:

1. Can we get some kind of interaction with an Ajax dictionary for common words.
2. Options: {minimum:4, maximum:16, ... }

- jake

On Thu, Aug 21, 2008 at 9:12 AM, Jörn Zaefferer
<[EMAIL PROTECTED]> wrote:
> Hi jQueryans,
>
> I'd like to share a preview of a validation extension for validating
> passwords, combined with a password strength meter. Preview means the
> API is subject to change, code may be more buggy than usual, etc. pp.
>
> Code is here: http://dev.jquery.com/view/trunk/plugins/validate.password/
> A demo here: http://dev.jquery.com/view/trunk/plugins/validate.password/demo/
> To get an idea how passwords are rated, check out the tests:
> http://dev.jquery.com/view/trunk/plugins/validate.password/test/rating.js
>
> To use, include the jquery.validate.password files (js and css) and
> put the strength meter markup somewhere in your form (see demo
> markup). Add a rule "password" to your password field (removed
> required rule if present).
>
> Looking forward to your feedback!
>
> Jörn
>


[jQuery] Re: Select

2008-07-21 Thread Jake McGraw
On Mon, Jul 21, 2008 at 3:15 PM, shapper <[EMAIL PROTECTED]> wrote:

>
> Hello,
>
> I am trying to style my form inputs, textareas and selects as follows:


Try using yui-css-reset and yui-css-base. These CSS files will strip all
most of the default styling set by the browser. Check it out here:

http://developer.yahoo.com/yui/reset/

- jake


>
>
>input, select, textarea {
>  border: solid 6px #ECF0F9;
>  color: #252525;
>  font: normal 0.75em Verdana, Geneva, sans-serif;
>  padding: 0.25em;
>  width: 520px;
>}
>
> I am having a few problems:
>
> Firefox 3:
>
>   1. The select is narrow than the inputs and textareas;
>   2. When I click the select the dropdown borders look different ...
> some are thinner than others.
>
> IE 7:
>
>  1. The select is narrow than the inputs and textareas;
>  2. The border of the select is not changed.
>
> What am I doing wrong and how can I make the appearance of a Select
> look the same across various browsers?
>
> Can I do this with JQuery?
>
> Thanks,
> Miguel
>


[jQuery] Re: Button Updating Help

2008-07-10 Thread Jake McGraw

You have two options:

liveQuery http://brandonaaron.net/docs/livequery/ to automatically
bind functions

or

Manually do it using something like:

var myFunction = function(e) {
   $('#objects').append('').find(".add_letter_code_object").click(myFunction);
};

$(function(){
  $(".add_letter_code_object').click(myFunction);
});

- jake

On Thu, Jul 10, 2008 at 3:19 PM, stephen <[EMAIL PROTECTED]> wrote:
>
> This is my code:
>
> $(document).ready(function() {
>$('.add_letter_code_object').click(function(event) {
>$('#objects').append('')
>});
> });
>
> What im trying to do is when you click the + button it appends a new
> object which also has a + button to add more, the problem I'm having
> is when you try to use the + button on the NEWLY created object it
> doesn't work, is there a way for updating a function upon appending
> new objects ( or code )? Thanks for any suggestions and help
>


[jQuery] Re: DOM changes persist after page reload in FF?

2008-06-25 Thread Jake McGraw

Do you have a live example page?

- jake

On Tue, Jun 24, 2008 at 1:07 PM, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> First off, the caveat, I'm a noob. However, I have a small piece of
> code that is causing some odd behaviour in FF 2 and 3 but not in other
> browsers (IE6 & 7, Safari 3 are the ones I've tested).
>
> The code inspects a text input and on each keyup issues an ajax
> request. The target PHP file checks whether the input matches a string
> and if so the jQuery code then disables the text input field, scans
> the page for PayPal add to basket buttons (normally 7 off them) and
> adjusts each form hidden field amount and button text by 2 pounds (the
> forms are not encrypted).
>
> This all seems to work very well on every browser I've got immediate
> access to but not FF 3 (Mac) or FF 2 (Win). On these browsers the
> changes to the hidden fields persist across page reloads so if I input
> the correct code then refresh the page and input the correct code
> again then the form fields and buttons will be adjusted by 4 pounds
> and not just two. This behaviour will continue as many times as I can
> be bothered to refresh and reenter the correct code. What's
> particularly odd is the button values are reset to the originals after
> each page refresh, just not the hidden fields amounts.
>
> I've no doubt that this is down to me a) not understanding how the DOM
> really works and b) not really understanding how jQuery works and c)
> writing crappy code. However, I'd really appreciate some guidance and
> explanation. My code is pasted below.
>
> Cheers
>
> Greg
>
> $(document).ready(function(){
>// reset the discount input
>$('#discountCode').attr('disabled', '').val('');
>
>$('#discountCode').keyup(function() {
>var inputValue = $('#discountCode').val();
>
>$.get('/assets/data/discount.php', {code: inputValue},
> function(data) {
>if (data == 'true')
>{
>// if code is correct we disable the 
> input
>$('#discountCode').attr('disabled', 
> 'disabled');
>
>// and show the tick mark
>$('#correctCode').css('display', 
> 'inline');
>
>// get each hidden input amount
>$("#main form 
> input[name='amount']").each(function() {
>var originalCost = 
> $(this).val();
>// apply the discount
>var discountCost = 
> originalCost - 2;
>// set the discount in the 
> hidden amount fields
>$(this).val(discountCost);
>// Change the button text
>var newButtonText = 
> '£'+discountCost+' Add to basket';
>
> $(this).parent().next('.paypal_button').val(newButtonText);
>// reset variables
>originalCost = 0;
>discountCost = 0;
>});
>};
>});
>});
> });
>


[jQuery] Re: How do I add click event to Ajax result?

2008-06-25 Thread Jake McGraw

Whoops, find(".clickable") should be find("#clickable")

- jake

On Wed, Jun 25, 2008 at 9:01 AM, Jake McGraw <[EMAIL PROTECTED]> wrote:
> function(data){$("#foo").html(data).find(".clickable").click(function(){
>  // Do onclick stuff here
> });
>
> - jake
>
> On Wed, Jun 25, 2008 at 6:51 AM, jebberwocky <[EMAIL PROTECTED]> wrote:
>>
>> hello all
>>
>> I have a js code as:
>>
>> $(document).ready(function() {
>>$(".menu-item2").click(function(){
>>$.get("/foo" ,{cate:$(this).attr("name")},
>>function(data){$("#foo").html(data); <== data = "> id="clickable" /
>>>"
>>});});
>>  });
>>
>> and html:
>>
>> 
>>
>> the question is how do i add onclick to "clickable"???
>>
>


[jQuery] Re: How do I add click event to Ajax result?

2008-06-25 Thread Jake McGraw

function(data){$("#foo").html(data).find(".clickable").click(function(){
  // Do onclick stuff here
});

- jake

On Wed, Jun 25, 2008 at 6:51 AM, jebberwocky <[EMAIL PROTECTED]> wrote:
>
> hello all
>
> I have a js code as:
>
> $(document).ready(function() {
>$(".menu-item2").click(function(){
>$.get("/foo" ,{cate:$(this).attr("name")},
>function(data){$("#foo").html(data); <== data = " id="clickable" /
>>"
>});});
>  });
>
> and html:
>
> 
>
> the question is how do i add onclick to "clickable"???
>


[jQuery] Re: Sortable Checkbox

2008-06-03 Thread Jake McGraw

On Mon, Jun 2, 2008 at 2:45 PM, Kandy I <[EMAIL PROTECTED]> wrote:
>
> Are there any plugins like on Apple's Pro site, with the sortable
> checkbox?
>
> http://www.apple.com/pro/profiles/

If you would like the specific functionality provided by Apple's site,
it would be trivial to implement yourself. I'd use the metadata plugin
to assign each entry a label and then attach a click event to each
label choice. Add CSS to match the look.

- jake


[jQuery] Re: thoughts ? Announcing AJAX Libraries API: Speed up your Ajax apps with Google’s infrastructure

2008-06-03 Thread Jake McGraw

My company is using it on our dev server, we'll most likely move it
out to production sometime this winter. So far, it has turned out to
be a great resource, especially for keeping all of our different apps
on the same page and staying up to date on the latest library releases
(in our case jQuery).

One question I'd like to ask: What resources has Google committed to
this project to ensure availability? I've noticed that
http://code.google.com has yet to switch to the Google AJAX Libraries
API, are there any plans to do this in the future?

- jake

On Tue, Jun 3, 2008 at 11:07 AM, Jiming <[EMAIL PROTECTED]> wrote:
>
> Great!
>
> It could be even better if you can have some most popular plugins
> included.
>
> Thanks,
> Jiming
>
>
> On Jun 3, 2:55 am, Seth - TA <[EMAIL PROTECTED]> wrote:
>> Scottus
>>
>> Nifty idea.
>>
>> Suggestion - Look to implement plugin options as well. Keeping track
>> of versions is a benefit and the speed improvement is nice to a
>> degree, but the biggest struggle is I hate having to have 5 or 6
>> 

[jQuery] Re: Modal overlay for specific page section

2008-05-19 Thread Jake McGraw

Gawd, I am one lazy developer, Mike goes through the trouble of
creating a well laid out site with plenty of tutorials and I totally
miss "Element Blocking".

Thanks Alexandre + Mike!

- jake

On Mon, May 19, 2008 at 4:49 PM, Alexandre Plennevaux
<[EMAIL PROTECTED]> wrote:
> sure jake, there is the excellent blockUI plugin
>
> http://www.malsup.com/jquery/block/
>
> On Mon, May 19, 2008 at 10:45 PM, Jake McGraw <[EMAIL PROTECTED]> wrote:
>>
>> Hello all,
>>
>> I'd like to know if a jQuery plugin exists that allows for creating a
>> modal overlay for a specific element of a page (say a DIV). The
>> overlay would completely cover the section and prevent click-throughs
>> or any other interaction with the elements within the section. Note:
>> I've seen the modal plugins that cover the entire screen, I need one
>> that correctly positions and sizes itself for a given section (not the
>> whole screen).
>>
>> - jake
>
>
>
> --
> Alexandre Plennevaux
> LAb[au]
>
> http://www.lab-au.com


[jQuery] Modal overlay for specific page section

2008-05-19 Thread Jake McGraw

Hello all,

I'd like to know if a jQuery plugin exists that allows for creating a
modal overlay for a specific element of a page (say a DIV). The
overlay would completely cover the section and prevent click-throughs
or any other interaction with the elements within the section. Note:
I've seen the modal plugins that cover the entire screen, I need one
that correctly positions and sizes itself for a given section (not the
whole screen).

- jake


[jQuery] Re: OT: Firefox 3 RC1 for Mac

2008-05-19 Thread Jake McGraw

Check out http://ejohn.org/blog/sexy-firefox-3/

- jake

On Mon, May 19, 2008 at 4:18 PM, Shelane <[EMAIL PROTECTED]> wrote:
>
> Is there a way to install Firefox 3 RC1 without affecting FF2 on a
> Mac.
>
> The release notes have this message: Please note that installing
> Firefox 3 will overwrite your existing installation of Firefox on Mac
> OS X and Linux.
>
> I'm guessing that's if you simply install it into the Applications
> folder.  If I install it in another folder within the Applications
> folder, will it be ok?  If it's using this same directory for it's
> support files (~/Library/Application Support/Firefox) can it still
> affect FF2?
>
> I have to keep FF2 because it's the "officially" supported browser at
> work.  But I would love to install FF3 to start testing on my apps.
>


[jQuery] Re: $ is not defined

2008-05-06 Thread Jake McGraw

Could you provide an example of this online?

- jake

On Tue, May 6, 2008 at 12:33 PM, mdg583 <[EMAIL PROTECTED]> wrote:
>
>  Hi, I don't know where this problem is coming from, but I find that
>  over the course of a few jquery AJAX operations and a ajaxForm submit,
>  for a little while I find that "$ is not defined". Basically, I am
>  loading a form into the current document using the jquery load
>  function, and then setting up ajaxForm to submit this form and put the
>  results into another div. This content that is finally loaded into
>  this next div div has a javascript function near the beginning, and at
>  the point in time when this script is reached, I find that "$ is not
>  defined".
>
>  This happened once before and I just worked around it, but that is
>  getting difficult.
>
>  Does anyone know why this would be?
>
>  I have jquery.form that says it requires jQuery v1.1 or later, and I
>  have jQuery 1.2.1.
>


[jQuery] Re: Selector Madness! How to Select all the Text on a Page?

2008-05-02 Thread Jake McGraw

ah why not try $("body").text() That should strip all of the markup?

- jake

On Fri, May 2, 2008 at 8:55 AM, Joe <[EMAIL PROTECTED]> wrote:
>
>  Okay I have read and reread 
> http://www.learningjquery.com/2006/11/how-to-get-anything-you-want-part-1
>
>  and
>
>  http://www.learningjquery.com/2006/12/how-to-get-anything-you-want-part-2
>
>  and still cannot figure out how to grab all the text (not the markup)
>  on a page.  I am toying with the Google Translation API and am
>  attempting to parse all text, translate, and put it back.  I have the
>  looping logic (and the 500 char limit issue with Google) sorted out,
>  but I can't get the fundamental part down...GRABBING ALL THE TEXT.
>
>  So let's say you have markup like so
>
>  
>  blabh blah 1
>  blabh blah 2
>  blabh blah 3
>  
>
>  and even
>
>  some heading
>
>  and
>
>  Some paragraph text
>
>  etc. etc.
>
>  I want to be able to grab all the text and manipulate it.
>
>  I've tried $("#mainContainerDiv *").each(...some function), but
>  this crashed the system.
>
>  I would like to do something like this:
>
>  $("#mainContainerDiv *.text".each(some function...), but this
>  clearly won't work.
>
>  Any help is greatly appreciated.
>
>


[jQuery] Re: [ANNOUNCE] New Twitter Account for jQuery & jQuery UI Projects

2008-04-30 Thread Jake McGraw

*http://docs.jquery.com/

On Wed, Apr 30, 2008 at 9:45 AM, Jake McGraw <[EMAIL PROTECTED]> wrote:
> @jquery doc.jquery.com is down :-P
>
>  - jake
>
>
>
>  On Wed, Apr 30, 2008 at 9:27 AM, Rey Bango <[EMAIL PROTECTED]> wrote:
>  >
>  >  Jason described it perfectly and you won't be left out of the loop because
>  > you don't use Twitter. The mailing list is still the main point of
>  > communication for the jQuery project. You would be surprised, though, how
>  > many people do not subscribe to the mailing list but are on Twitter and
>  > other services. We need to reach those folks as well.
>  >
>  >  Going forward, we're going to use every means possible to get the word out
>  > about jQuery. Remember that part of the team is dedicated to evangelism
>  > efforts so we won't be thinning ourselves out.
>  >
>  >  Rey...
>  >
>  >
>  >
>  >  Rick Faircloth wrote:
>  >
>  > > Thanks, Jason... just wanted to make sure I wasn't getting "left out
>  > > of the loop" or had to subscribe to yet *another* source of info...
>  > >
>  > > Rick
>  > >
>  > >
>  > > > -Original Message-
>  > > > From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
>  > Behalf Of Jason Huck
>  > > > Sent: Wednesday, April 30, 2008 8:31 AM
>  > > > To: jQuery (English)
>  > > > Subject: [jQuery] Re: [ANNOUNCE] New Twitter Account for jQuery & 
> jQuery
>  > UI Projects
>  > > >
>  > > >
>  > > > Twitter posts (or "tweets") are limited to 140 characters, so they're
>  > > > not going to replace full-fledged announcements. Rather, most of the
>  > > > time, they'll just be headlines with a URL which points to...you
>  > > > guessed it...the plugin repository, the main site, this list, various
>  > > > blogs, etc.
>  > > >
>  > > > So, I wouldn't worry about news being distributed exclusively via
>  > > > Twitter. You just might find out about something a little bit sooner
>  > > > if you use the service. In fact, even if you don't have a Twitter
>  > > > account, you can still subscribe to an RSS or Atom feed of the updates
>  > > > via your favorite feed reader.
>  > > >
>  > > > I don't know how much automation is currently in place or planned, but
>  > > > it might be nice to set it up to auto-announce new additions to the
>  > > > plugin repository, new posts at planet.jquery.com, etc.
>  > > >
>  > > > - jason
>  > > >
>  > > >
>  > > >
>  > > >
>  > > >
>  > > > On Apr 30, 8:05 am, "Rick Faircloth" <[EMAIL PROTECTED]> wrote:
>  > > >
>  > > > > Hi, Rey...
>  > > > >
>  > > > > First, a disclaimer... I'm not a Twitter user, so I don't "get it", 
> as
>  > I've
>  > > > > heard Twitter users say of no-users.  :o)
>  > > > >
>  > > > > That being said, I wanted to ask why another source of info, beyond
>  > the
>  > > > > jquery.com site, the ton of individual plug-in sites, doc sites, etc,
>  > is needed.
>  > > > >
>  > > > > It seems that we're spreading the sources of info even thinner, 
> rather
>  > than deeper.
>  > > > >
>  > > > > I was surprised to see the Twitter accounts starting up.
>  > > > >
>  > > > > So, I'm hoping to understand the desired benefits of using Twitter.  
> I
>  > know you stated
>  > > > > below that you hope to "maximize the reach of announcements about
>  > upcoming jQuery &
>  > > > > jQuery UI updates and releases."  How does Twitter do that better 
> than
>  > the mailing list?
>  > > > > And will the mailing list continue to be adequate for this of us who
>  > don't "Twitter"?
>  > > > >
>  > > > > Can you clue me in?
>  > > > >
>  > > > > Rick
>  > > > >
>  > > > >
>  > > >
>  > >
>  > >
>  > >
>  > >
>  >
>


[jQuery] Re: [ANNOUNCE] New Twitter Account for jQuery & jQuery UI Projects

2008-04-30 Thread Jake McGraw

@jquery doc.jquery.com is down :-P

- jake

On Wed, Apr 30, 2008 at 9:27 AM, Rey Bango <[EMAIL PROTECTED]> wrote:
>
>  Jason described it perfectly and you won't be left out of the loop because
> you don't use Twitter. The mailing list is still the main point of
> communication for the jQuery project. You would be surprised, though, how
> many people do not subscribe to the mailing list but are on Twitter and
> other services. We need to reach those folks as well.
>
>  Going forward, we're going to use every means possible to get the word out
> about jQuery. Remember that part of the team is dedicated to evangelism
> efforts so we won't be thinning ourselves out.
>
>  Rey...
>
>
>
>  Rick Faircloth wrote:
>
> > Thanks, Jason... just wanted to make sure I wasn't getting "left out
> > of the loop" or had to subscribe to yet *another* source of info...
> >
> > Rick
> >
> >
> > > -Original Message-
> > > From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of Jason Huck
> > > Sent: Wednesday, April 30, 2008 8:31 AM
> > > To: jQuery (English)
> > > Subject: [jQuery] Re: [ANNOUNCE] New Twitter Account for jQuery & jQuery
> UI Projects
> > >
> > >
> > > Twitter posts (or "tweets") are limited to 140 characters, so they're
> > > not going to replace full-fledged announcements. Rather, most of the
> > > time, they'll just be headlines with a URL which points to...you
> > > guessed it...the plugin repository, the main site, this list, various
> > > blogs, etc.
> > >
> > > So, I wouldn't worry about news being distributed exclusively via
> > > Twitter. You just might find out about something a little bit sooner
> > > if you use the service. In fact, even if you don't have a Twitter
> > > account, you can still subscribe to an RSS or Atom feed of the updates
> > > via your favorite feed reader.
> > >
> > > I don't know how much automation is currently in place or planned, but
> > > it might be nice to set it up to auto-announce new additions to the
> > > plugin repository, new posts at planet.jquery.com, etc.
> > >
> > > - jason
> > >
> > >
> > >
> > >
> > >
> > > On Apr 30, 8:05 am, "Rick Faircloth" <[EMAIL PROTECTED]> wrote:
> > >
> > > > Hi, Rey...
> > > >
> > > > First, a disclaimer... I'm not a Twitter user, so I don't "get it", as
> I've
> > > > heard Twitter users say of no-users.  :o)
> > > >
> > > > That being said, I wanted to ask why another source of info, beyond
> the
> > > > jquery.com site, the ton of individual plug-in sites, doc sites, etc,
> is needed.
> > > >
> > > > It seems that we're spreading the sources of info even thinner, rather
> than deeper.
> > > >
> > > > I was surprised to see the Twitter accounts starting up.
> > > >
> > > > So, I'm hoping to understand the desired benefits of using Twitter.  I
> know you stated
> > > > below that you hope to "maximize the reach of announcements about
> upcoming jQuery &
> > > > jQuery UI updates and releases."  How does Twitter do that better than
> the mailing list?
> > > > And will the mailing list continue to be adequate for this of us who
> don't "Twitter"?
> > > >
> > > > Can you clue me in?
> > > >
> > > > Rick
> > > >
> > > >
> > >
> >
> >
> >
> >
>


[jQuery] Re: accessing the content of iframe

2008-04-29 Thread Jake McGraw

You'll need some method of determining if the iframe has been loaded,
check out the frameReady plugin:

http://jakemcgraw.com/javascript/jquery.frameready.js

- jake

On Tue, Apr 29, 2008 at 3:38 AM, Teonator <[EMAIL PROTECTED]> wrote:
>
>  Hi,
>
>  Let say I have page A with an iframe (# ifrmContent) where its src is
>  page B. The page B have a checkbox (# chkAgree). How am I going to
>  access the checkbox in page B using the selector from page A (parent)?
>  Could someone guide me a bit?
>
>
>  Cheers,
>  Teon
>


[jQuery] Re: Ext went GPL

2008-04-24 Thread Jake McGraw

> > Does it mean, that if I have PHP application, that uses javascript
> > under GPL3, I must release also PHP source?
> >
>
>  AFAIK if you bundle something GPL everything will become GPL. This includes
> your PHP source.

Just an FYI, this is only for non-commercial versions of ExtJS. I
suppose the logic here is that if you would like to use ExtJS without
paying for a commercial license and reap the rewards of an open source
application, you will have to make your software open source (quid pro
quo). You have a couple of options if you'd like to continue using
ExtJS:

1. Keep using versions prior to 2.1 without making any changes to your
existing code base.

2. Buy a commercial license, you won't need to make any changes to
your code base.

3. Use a GPL version of ExtJS, open source any of your code
(server/client) which directly references ExtJS, no changes to you
existing code base.

4. Use a GPL version of ExtJS, remove any direct references of ExtJS
from your code, develop an interface (a JSON message server?) which
doesn't directly reference ExtJS, use it as an intermediate with
ExtJS. Using this method, you wouldn't need to open source any of your
software because you aren't directly referencing ExtJS.

Granted, none of this is as convenient as an MIT or BSD or LGPL or CC
license, but then, the core team ExtJS has a right to license their
software anyway they'd like to keep the project up and running.

- jake


[jQuery] Re: event question

2008-04-22 Thread Jake McGraw

The default behavior:

$(".classname").click(function(){
  alert("Hello, world!");
});

$("body").append('Click Me!');

Clicking "Click Me!" would do nothing.

Using the liveQuery plugin (http://brandonaaron.net/docs/livequery/):

$(".classname").livequery("click", function(event) {
  alert("Hello, world!");
});

$("body").append('Click Me!');

Clicking "Click Me!" should now produce an alert window.

- jake


On Tue, Apr 22, 2008 at 4:45 PM, Brian Ronk <[EMAIL PROTECTED]> wrote:
>
>  I have a click even that I add to a certain class when the page is
>  created.  There is the possibility of dynamically adding another
>  element with that class, and I would like to have the same click even
>  added.  I'm just wondering what would happen if I registered the click
>  event for that class, would that work?  For instance:
>
>  At page creation, this is run:
>  $('.classname').click(function() {
>  ...
>  });
>
>  If I ran this after a new element with that class was created, would
>  that screw anything up.  I do have an id associated with the element,
>  so I could just add the event that way.  I just wasn't sure if there
>  might be a better way, or if I could add that to a function, and just
>  call it when needed.
>


[jQuery] Re: getScript is great to add scripts dynamically, but how might you remove scripts?

2008-04-22 Thread Jake McGraw

Which begs the question, Why would you want to remove scripts? Once a
script has been included, it should have executed, so what do you gain
by removing it?

- jake

On Mon, Apr 21, 2008 at 6:41 PM, cfdvlpr <[EMAIL PROTECTED]> wrote:
>
>  Is it possible to remove a script from a page dynamically?
>


[jQuery] Re: Expression for finding a displayed DIV?

2008-04-14 Thread Jake McGraw

var id = $("div.policy:visible").attr("id");

- jake

On Mon, Apr 14, 2008 at 11:57 AM, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
>
>  Hi,
>
>  I have a number of DIVS of class = "policy" on my page.  At any one
>  time, only one will be displayed, that is, have the CSS "display"
>  attribute set to "block".  How can I write a JQuery expression to find
>  the ID of such a DIV?
>
>  Thanks, - Dave
>


[jQuery] Re: Hover Problems

2008-04-13 Thread Jake McGraw

You have to scope the hover to the current image, otherwise all div
with class "item_info" will show up (because, by default $("selector")
operates on the entire document, like $("selector", document)), here
is how you do this:

Assuming an HTML structure like this:

 
   
 264 VIEWS
 
   
 

$('.item img').hover(function() {
 $(this).siblings(".item_info").animate({ opacity: 'show' }, 700);
  }, function() {
 $(this).siblings(".item_info").animate({ opacity: 'hide' }, 700);
});

Check out the documentation for how selectors work here:

http://docs.jquery.com/Core/jQuery#expressioncontext

and here:

http://docs.jquery.com/Selectors



- jake


On Sun, Apr 13, 2008 at 12:46 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>  I am creating my first site with jquery. (Its my first time with
>  javascript, and I love it)
>  I have most of it ready, one thing I am completely stuck on.
>
>  I have a bunch of images that when you hover over each one there
>  should be a div appearing. Right now when I hover over any image the
>  div appears on all images. I only want it to appear on the image that
>  you are hovering over and not on all instances of the image. I tried a
>  lot of things, I need some help.
>
>  my html:
>
>   
> 
>   264 VIEWS
>
> 
>   
>
>  ( the div that should be showing up is item_info which by default is
>  display:none; . )
>
>  $('.item img').hover(function() {
>   $(".item_info").animate({ opacity: 'show' }, 700);
>}, function() {
>   $(".item_info").animate({ opacity: 'hide' }, 700);
>  });
>
>
>  --
>  Right now there are about 30 of the same divs with class "image" and
>  img's in them. When I hover over any image I see all divs on all
>  images popping up. How do I target just that one single "image" div
>  that the mouse is over, so that I can have the div popup whenever the
>  mouse is only over the one image.
>
>  Thank you
>
>  - Lukas
>


[jQuery] Re: Using Jquery instance in an Iframe

2008-04-10 Thread Jake McGraw

I would suggest using the frameready plugin, but it appears the
authors site was been removed from the internet.

You can download it from here:

http://jakemcgraw.com/javascript/jquery.frameready.js

Usage instructions are included in the script comments.

- jake

On Thu, Apr 10, 2008 at 12:25 PM, Jeffrey Kretz <[EMAIL PROTECTED]> wrote:
>
>  I've successfully used jquery by referring to the parent frame.
>
>  Instead of "this", try "document"
>
>  alert($("#mycontent", document).html());
>
>  JK
>
>
> -Original Message-
>  From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
>  Behalf Of Frederic
>  Sent: Thursday, April 10, 2008 5:52 AM
>  To: jQuery (English)
>  Subject: [jQuery] Using Jquery instance in an Iframe
>
>
>  Hello,
>  To avoid the loading of multiple Jquery in my application using
>  Iframe, I would know if anybody has succeeded in using a single Jquery
>  instance (in the same domain name).
>
>  myexample.html
>  
>  
>  
>  
>  Hello world!
>  
>  
>  
>
>  myiframe.html
>  
>  
>  
>  
>  var $ = window.parent.$;
>  var jQuery = window.parent.jQuery;
>  $().ready(function() {
>alert('jquery loaded in iframe');
>alert($("#myparent", parent.document).html());
>alert($("#mycontent", this).html());
>  });
>  
>  Working in iframe !  html>
>
>
>  When executing myexample.html :
>  => alert box #1 : "jquery loaded in iframe"
>  => alert box #2 : "Hello world!"
>  => alert box #3 : null<=== must be "Working in iframe !"
>
>  Any idea on a solution ?
>  regards
>  Frederic
>
>


[jQuery] Re: Refresh Baltimore Tonight

2008-04-09 Thread Jake McGraw

Second the request for slides / any multimedia.

- jake

On Wed, Apr 9, 2008 at 4:18 PM, Richard D. Worth <[EMAIL PROTECTED]> wrote:
> Way to go, Benjamin! Wish I could be there. Will there be a recording?
> slides?
>
> - Richard
>
>
>
> On Wed, Apr 9, 2008 at 4:03 PM, Benjamin Sterling
> <[EMAIL PROTECTED]> wrote:
>
> > Hey all,
> > Just wanted to give a heads up that I will be giving a basic jQuery
> presentation at the Refresh Baltimore meeting tonight.  So if you are in the
> Baltimore area come check it out.
> >
> > http://www.refreshbmore.org/
> >
> > --
> > Benjamin Sterling
> > http://www.KenzoMedia.com
> > http://www.KenzoHosting.com
> > http://www.BenjaminSterling.com
>
>


[jQuery] Re: $(window).bind("load",function(){ vs onready

2008-04-08 Thread Jake McGraw

>From the comments on Yahoo Performance Rule # 5
http://developer.yahoo.net/blog/archives/2007/07/high_performanc_5.html:

:: snip ::

There are some cases where you wouldn't want your JS at the bottom.
For example, if you were using an "ondomready" event that many of the
js libraries supply, you would want the code to execute towards the
top. If you were to move all your JS to the bottom of the page, the
event would be rendered useless.

However, it's nice to know that having it at the top is a performance
hit so that I can weigh the positives with the negatives before moving
forward.

:: snip ::

So there is an instance where, using jQuery $(document).ready() or any
JavaScript library DOM ready functionality, it makes more sense to
keep your script tags in the document head.

In the end, it's up to the developer which method to use, as both can
be utilized successfully. I said in my original post that this is
mostly the territory of debate for "standardistas", therefore its
worth inside of real-world web application development is
questionable. Considerations of end user experience often override
whatever the W3C or ECMA specificies. I'm just providing an alternate
opinion so developers can make an informed consideration. Thankfully,
jquery-en provides a professional environment where we can have this
discussion.

- jake

On Tue, Apr 8, 2008 at 11:40 AM, Mika Tuupola <[EMAIL PROTECTED]> wrote:
>
>
>  On Apr 8, 2008, at 6:23 PM, Jake McGraw wrote:
>
>
> > Regardless of whether it validates, it's considered best practices to
> > keep all 

[jQuery] Re: Help

2008-04-08 Thread Jake McGraw

Spam?

On Tue, Apr 8, 2008 at 4:46 AM, Sarah Johns <[EMAIL PROTECTED]> wrote:
>
>  Hello guys, i need some serious help here. My dad made a site, this
>  http://www.videoriporter.hu . And he cant make it work. Can any of you
>  help me? Thank you Sarah
>


[jQuery] Re: $(window).bind("load",function(){ vs onready

2008-04-08 Thread Jake McGraw

Regardless of whether it validates, it's considered best practices to
keep all 

[jQuery] Re: $(window).bind("load",function(){ vs onready

2008-04-08 Thread Jake McGraw

Mixing content and logic, a no no for "standardistas". It really
depends on how much content you have on any given page. I'd suggest
using both the head and "footer" methods to determine what provides
the best end user experience Vs what keeps your pages standard
compliant.

- jake

On Tue, Apr 8, 2008 at 9:33 AM, Mika Tuupola <[EMAIL PROTECTED]> wrote:
>
>
>  On Apr 8, 2008, at 6:30 AM, coughlinsmyalias wrote:
>
>
> > I have heard about loading them at the end of the page, I would love
> > to see statistics on it as well. I understand this all now, I kept
> > seeing both and I was confused each of them.
> >
>
>
>  When possible JavaScript should be loaded in the end of the page. Browsers
> stop rendering while JavaScript file loads. Browsers download only one
> JavaScript file at the time blocking also any new parallel downloads of
> other elements.
>
>  Thus when moving all scripts just before closing body tag will make page
> finish rendering sooner.
>
>  --
>  Mika Tuupola
>  http://www.appelsiini.net/
>
>


[jQuery] Re: setinterval vs. settimeout

2008-04-07 Thread Jake McGraw

The following will pop up an alert dialog EVERY 20 (2 milliseconds) seconds:

window.setInterval(function(){alert('Hello!');},2);

The following will pop up an alert dialog ONCE, AFTER 20 (2 ms) seconds:

window.setTimeout(function(){alert('Hello!');},2);

To keep your site "updated" you would use setInterval, as it will be
called continuously.

- jake



On Mon, Apr 7, 2008 at 11:53 AM, coughlinsmyalias <[EMAIL PROTECTED]> wrote:
>
>  Hey, I found this article here:
>  
> http://www.evolt.org/article/Using_setInterval_to_Make_a_JavaScript_Listener/17/36035/
>  - to try to clear up my confusion with setInterval and setTimeout, but
>  still kind of confused, but this is what I got out of it so far:
>
>
>  setInterval: Does X every X ms
>
>  setTimeout: Delays X every X ms
>
>  Is that close or am I completely off? If someone has a more clear
>  example could you post it :)
>
>  Also, if I want to try to keep my site as "live" and "updated" as
>  possible, which would be better.
>
>  Thanks,
>
>  Ryan
>


[jQuery] Re: How do I write this jquery expression?

2008-04-03 Thread Jake McGraw

$("tr.rowData :text, tr.rowData textarea").blur(function(){
  /* Callback goes here */
});

On Thu, Apr 3, 2008 at 4:58 PM, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
>
>  Hi,
>
>  Within my TR of class "rowData", how do I write a jquery onblur
>  handler for every input field of type = "text" or every field that is
>  a TEXTAREA?
>
>  Thanks, - Dave
>


[jQuery] Looking New jQuery Logo

2008-03-28 Thread Jake McGraw

I remember seeing a streamlined, grey on grey logo, I think John R.
used in a presentation. Anyone have a high def version of this?

- jake


[jQuery] Re: [POLL] Online jQuery Training from John Resig

2008-03-06 Thread Jake McGraw

Any ideas on the fee?

- jake

On Thu, Mar 6, 2008 at 9:57 AM, Rey Bango <[EMAIL PROTECTED]> wrote:
>
>  For those that missed this email the first time:
>
>
>
>  The jQuery team is looking to gauge interest in jQuery training
>  delivered in a live, online format by jQuery project lead John Resig.
>
>  Nobody knows jQuery better than John and in terms of JavaScript, he's
>  considered one of the best in the world. So a training class delivered
>  by him would surely help anyone become more proficient in JavaScript and
>  jQuery.
>
>  So, if you could take a couple of minutes to participate in the
>  following poll, that would be a big help in determining how to proceed:
>
>  http://www.polldaddy.com/poll.aspx?p=388570
>
>  Thanks,
>
>  The jQuery Team
>
>


[jQuery] jQuery Tutorial at IBM

2008-03-04 Thread Jake McGraw

http://www.ibm.com/developerworks/web/library/wa-aj-overhaul1/index.html?ca=drs-

Developer Works drops jQuery Ajax + ThickBox tutorial. Part one posted today.

- jake


[jQuery] Re: Ajax Post URL

2008-02-25 Thread Jake McGraw

Try:

$.post("index.cfm", {"Action":"processajax"}, function(){/* Success
callback */});

On Mon, Feb 25, 2008 at 10:23 PM, MikeP <[EMAIL PROTECTED]> wrote:
>
>  Hello.
>
>  I'm using an Ajax Post. It works fine when I use the path in the
>  url...
>  url: "controllers/processajax.cfm",
>
>
>  However, If I want to use a url string like:
>  url: "index.cfm?Action=processajax",
>
>
>  Then I get the following error:
>  unterminated regular expression literal
>
>
>  It blows up in what appears to be the data results. However,
>  literally
>  the only difference is the URL string I use.
>
>
>  Any ideas?
>
>
>  Thanks,
>  Mike
>
>


[jQuery] Media Plugin Issue

2008-02-22 Thread Jake McGraw

I'm trying to use the Media Plugin as it appears to be a gift from god
in the way it handles multiple media types with the same code.
Unfortunately, I've got two problems:

1) I can't get it to acknowledge my custom flash video player. When I
do something like:

$(".mediabox").mediabox({
  "flvPlayer" : "http://www.foobar.com/fooplayer.swf
});

and then click on a link, say:

http://www.foobar.com/media/bar.flv";>Watch Now!

Firebug tells me I've requested the following URL:

mediaplayer.swf?file=http://www.foobar.com/media/bar.flv

2) I can't get it to acknowledge my custom flashvars, which are unique
for each video. I've tried using both the metadata plugin:

http://www.foobar.com/playlist?id=1234'}}"
href="http://www.foobar.com/media/1234.flv";>Watch Now!

and the pre-render callback:

$(".mediabox").mediabox({...}, function(e,o){
  o.flashvars = {
"playback_url": "http://www.foobar.com/playlist?id=1234";
  };
});

Using Firebug and looking at the HTML that was generated, I see the following:

http://www.foobar.com/media/1234.flv"; ... />

So, what am I doing wrong?

- jake


[jQuery] Re: ajax file uploads: getting strange error

2008-02-18 Thread Jake McGraw
Ah, I traced the issue to a PHP error, make sure your server scripts
aren't spitting out HTML errors!

- jake

On Feb 14, 2008 3:05 AM, Yılmaz Uğurlu <[EMAIL PROTECTED]> wrote:
> Can you try upload your file without upload plugin. Create simple file form
> and just post to data your uplaod action. Maybe your uplaod action returning
> invalid result. I got the similiar error when i first try. The problem was
> upload action in my project. Just check that.
>
> 2008/2/13, Jake McGraw <[EMAIL PROTECTED]>:
>
>
> >
> > Just started getting this issue with the Forms plugin!
> >
> > - jake
> >
> > On Feb 9, 2008 5:07 PM, [EMAIL PROTECTED]
> >
> > <[EMAIL PROTECTED]> wrote:
> > >
> > > Hi,
> > >
> > > I just downloaded the latest version of the ajax file upload plugin
> > > (http://www.phpletter.com/Demo/AjaxFileUpload-Demo/).  I have created
> > > a test page
> > >
> > > http://elearningrd.info/test.php
> > >
> > > but every time I upload a file, the error callback is invoked and the
> > > message "Syntax error: Invalid label" is displayed. My file does get
> > > uploaded to the proper directory, but the error is troubling me. What
> > > does it mean and any ideas how to resolve it?
> > >
> > > Thanks, - Dave
> > >
> >
>
>
>
> --
>  Yılmaz Uğurlu ~ jabber : [EMAIL PROTECTED]  ~ http://www.2nci.com ~ İzmir


[jQuery] Re: Jquery and function(json)

2008-02-15 Thread Jake McGraw

What are you using to encode your json server side? If you have PHP
5.2 and above, I'd suggest json_encode, which takes a PHP array and
converts it into json. To output a 1, you should be able to do the
following:

echo json_encode(array("error"=>"1"));

- jake

On Fri, Feb 15, 2008 at 3:48 PM, FrEaKmAn <[EMAIL PROTECTED]> wrote:
>
>  Hello,
>
>  so today I started with jquery and wow :D I have one question
>  regarding json. I found this topic (I'm sorry if linking isn't
>  allowed)
>
>  
> http://www.designerstalk.com/forums/programming/29651-jquery-ajax-question.html
>
>  I want something similar:
>  ...
>  success: function(json){
> if( json.success == "true" ) {
>
> } else {
> if(json.error == "1") {
>
> } 
>  but it's doesn't want to work with my script. Now is jquery.js
>  (latest) enough or must I include special addons? Or this works and my
>  php file isn't right; any info how to set error to be equal to 1?
>
>  Thanks for help!
>
>


[jQuery] Re: what editor do you use?

2008-02-13 Thread Jake McGraw

Zend Studio, before that TextMate

On Feb 13, 2008 3:15 PM, Kyle Browning <[EMAIL PROTECTED]> wrote:
>
> Zend Studio.
>
>
> On Feb 13, 2008, at 12:15 PM, Alexandre Plennevaux wrote:
>
> > aptana studio
> >
> > On Feb 13, 2008 8:49 PM, Mika Tuupola <[EMAIL PROTECTED]> wrote:
> >>
> >>
> >> On Feb 13, 2008, at 6:38 PM, Feijó wrote:
> >>
> >>> I changed my own a few weeks ago, now I'm using Editpad++ 
> >>> (http://sourceforge.net/projects/notepad-plus/
> >>> )
> >>> its freeware, nice resources, like macros, quick-text, highlighted
> >>> source, ..
> >>
> >> Textmate with jQuery bundle, of course :)
> >>
> >> http://macromates.com/
> >> http://www.learningjquery.com/2006/09/textmate-bundle-for-jquery
> >>
> >>
> >> --
> >> Mika Tuupola
> >> http://www.appelsiini.net/
> >>
> >>
> >
> >
> >
> > --
> > Alexandre Plennevaux
> > LAb[au]
> >
> > http://www.lab-au.com
>
>


[jQuery] Re: ajax file uploads: getting strange error

2008-02-13 Thread Jake McGraw

Just started getting this issue with the Forms plugin!

- jake

On Feb 9, 2008 5:07 PM, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I just downloaded the latest version of the ajax file upload plugin
> (http://www.phpletter.com/Demo/AjaxFileUpload-Demo/).  I have created
> a test page
>
> http://elearningrd.info/test.php
>
> but every time I upload a file, the error callback is invoked and the
> message "Syntax error: Invalid label" is displayed. My file does get
> uploaded to the proper directory, but the error is troubling me. What
> does it mean and any ideas how to resolve it?
>
> Thanks, - Dave
>


[jQuery] Re: getting the (computed) background-color

2008-02-11 Thread Jake McGraw

Ah, this issue bit me in the ass, using jQuery 1.2.3... is this a
browser/css quirk or is there a planned fix?

- jake

On Jun 17, 2007 7:31 AM, Fil <[EMAIL PROTECTED]> wrote:
>
> > I'am not sure, but this one may be faster:
> >
> > // get the background color
> > var current_p = $(this);
> > var bg = "transparent";
> > while(bg == "transparent") {
> > bg = current_p.parent().css('background-color');
> > current_p = current_p.parent();
> > }
>
> you have a parent() too many ;-)
>
> anyway this will fail if everything is transparent: you'll hit the
> document as $('html').parent() and get a js error when doing .css() on
> it.
>
> -- Fil
>


[jQuery] Re: Problems with "frames"

2008-02-09 Thread Jake McGraw

This is the page:

http://ideamill.synaptrixgroup.com/?page_id=18

So, you're doing your development off of a web server? Perhaps you
could install either an XAMPP or LAMP environment on your machine?

- jake

On Feb 8, 2008 4:06 AM, Androrion <[EMAIL PROTECTED]> wrote:
>
>
> Could you explain me why frames shouldn't be needed for what I described? As
> I don't have any web server, I cannot use simple divs and include my pages
> as I want, like i would do with php or jsp, isn't it? If you have another
> solution, I take it : I don't want to use frames, it's just I can't figure
> out how else I can do.
> About the url you gave me, the page doesn't seem to exist anymore :( Do you
> know where i could find this plugin?
>
> Thanks a lot for your help!
>
>
>
> Jake McGraw wrote:
> >
> >
> > If you're using frames (which shouldn't be needed for what you're
> > describing) try using the frameReady plugin,
> > http://ideamill.synaptrixgroup.com/?p=6. Pay attention to the load
> > option for including the accordian plugin in your target frame.
> >
> > - jake
> >
> > On Jan 25, 2008 8:55 AM, Androrion <[EMAIL PROTECTED]> wrote:
> >>
> >>
> >> Hi all,
> >>
> >> I'm currently working on a static website using some javascript effects.
> >> So
> >> far i'm very impressed by the possibilities offered by jQuery and that's
> >> why
> >> i chose this framework, but now i have a little problem.
> >> The web site i wanna create is very classic :  a header, a footer, a
> >> side-bar navigation menu and a main frame.
> >> Wanting to avoid the use of iframe, i tried some  with the jQuery
> >> load
> >> function. It seems to work but when i want to insert an accordion menu in
> >> the menu div, it doesn't work... The only solution i found was to write
> >> the
> >> menu code in my index page, which is quite... ugly...
> >>
> >> Does anybody know how i could fix that, and use jQuery in every "frame"?
> >>
> >>
> >>
> >> --
> >> View this message in context:
> >> http://www.nabble.com/Problems-with-%22frames%22-tp15087899s27240p15087899.html
> >> Sent from the jQuery General Discussion mailing list archive at
> >> Nabble.com.
> >>
> >>
> >
> >
>
> --
> View this message in context: 
> http://www.nabble.com/Problems-with-%22frames%22-tp15087899s27240p15351625.html
>
> Sent from the jQuery General Discussion mailing list archive at Nabble.com.
>
>


[jQuery] Re: Problems with "frames"

2008-02-07 Thread Jake McGraw

If you're using frames (which shouldn't be needed for what you're
describing) try using the frameReady plugin,
http://ideamill.synaptrixgroup.com/?p=6. Pay attention to the load
option for including the accordian plugin in your target frame.

- jake

On Jan 25, 2008 8:55 AM, Androrion <[EMAIL PROTECTED]> wrote:
>
>
> Hi all,
>
> I'm currently working on a static website using some javascript effects. So
> far i'm very impressed by the possibilities offered by jQuery and that's why
> i chose this framework, but now i have a little problem.
> The web site i wanna create is very classic :  a header, a footer, a
> side-bar navigation menu and a main frame.
> Wanting to avoid the use of iframe, i tried some  with the jQuery load
> function. It seems to work but when i want to insert an accordion menu in
> the menu div, it doesn't work... The only solution i found was to write the
> menu code in my index page, which is quite... ugly...
>
> Does anybody know how i could fix that, and use jQuery in every "frame"?
>
>
>
> --
> View this message in context: 
> http://www.nabble.com/Problems-with-%22frames%22-tp15087899s27240p15087899.html
> Sent from the jQuery General Discussion mailing list archive at Nabble.com.
>
>


[jQuery] frameReady plugin and reloading iframes

2008-02-07 Thread Jake McGraw

So, I've been using the brilliant frameReady plugin, and when I ran
across an issue:

I'd like to be able to reload an iframe (sometime after initial
loading) and have frameReady perform the exact same actions as it did
to begin with. I think this is a similar issue as re-binding of events
to DOM elements after they've been replaced using Ajax. Has anyone
else run across this situation?

- jake


[jQuery] Re: A working copy of jQuery UI?

2008-02-06 Thread Jake McGraw

Currently using the nightlies with no problem.

- jake

On Feb 6, 2008 10:14 AM, Rey Bango <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> A release candidate for UI should be VERY available soon that should
> resolve any issues.
>
> Rey
>
>
> [EMAIL PROTECTED] wrote:
> > So I downloaded jQuery 1.2.2 and UI from the site, and kept getting
> > errors (such as draggables throwing a "not a function" error.)  I
> > borrowed a copy of ui from some random website, which at least got
> > draggables to work, but not entirely - opacity isn't working.
> >
> > It seems like I can't depend on ui.jquery.com to get a functioning
> > copy of jquery ui - the dialog that downloads a minified copy of
> > different plugins isn't even working.
> >
> > Can someone direct me to a (preferably) minified copy of jquery ui
> > that works with 1.2.2?
> >
>


[jQuery] Re: JQuery takes 80% of my core2Duo proc on DOM element inserts

2008-02-04 Thread Jake McGraw

Perhaps you could set up a queue using window.setInterval() and limit
your appends to  40 or so rows every couple of seconds? Also, do you
have an example page where your script can be viewed?

- jake

On Feb 4, 2008 1:57 PM, Ashish <[EMAIL PROTECTED]> wrote:
>
> Hi ,
>
> I am very new to jquery. I am using jquery 1.2.2 . I use jquery
> tablesorter to insert around 400 rows to a table. The data is
> collected using an Ajax call.
>
> When new rows are inserted to the table the CPU utilization shoots up
> to 80%. All browsers freeze until the table is populated :(
>
> I tried to insert 400 divs to a single div and faced the same problem.
> This rules out a problem with tablesorter.
>
> Does jquery attach a lot of handlers to dom events that make appends
> very slow ?
>
> Any suggestions would be much appreciated.
>
> Thanks and regards,
>  - Ashish
>


[jQuery] Re: Opposite of .contains() ?

2008-01-11 Thread Jake McGraw

$("p").not($("p").contains("1"));

See:

visualjquery.com >> DOM >> Traversing >> not(elems)

On Jan 11, 2008 10:35 AM, Sean O <[EMAIL PROTECTED]> wrote:
>
>
> Hi,
>
> I'm trying to select elements that do not contain certain text.
> In effect, the opposite of .contains().
>
> e.g.
> 1: 1: 2: 3: 4:
>
> How can I select all s without a 1 in the text?
> like... $("p").doesNotContain("1")
>
> Various attempts with not: and filter() have failed...
>
>
> Thanks,
> SEAN
> 
> www.sean-o.com
> --
> View this message in context: 
> http://www.nabble.com/Opposite-of-.contains%28%29---tp14758914s27240p14758914.html
> Sent from the jQuery General Discussion mailing list archive at Nabble.com.
>
>


[jQuery] Re: How come when I put everything in like this, it will not be working?

2008-01-04 Thread Jake McGraw
Could you throw up an example page with the HTML document.

- jake

On Jan 4, 2008 1:58 AM, DeaR <[EMAIL PROTECTED]> wrote:

>
> 
> function disappear() {
>$("#response").fadeOut("slow")
> }
> $(document).ready(function() {
>$("#message_me").click(function() {
>$("#form").fadeIn("slow")
>})
>$("#send").click(function() {
>var str = $("#input_form").serialize()
>$.post("send-mail.php",str,function(data) {
>$("#response").html(data).fadeTo("slow", 0.7)
>setTimeout("disappear()", 3000)
>})
>})
>$.get("counter.php", function(data) {
>$("#counter").html(data).fadeIn("slow")
>})
> })
> 
> I saved the above script in a separate file, let's say "myscript.js".
> Then I imported it in my html file like this
> 
>
> Then, when I run this, it's not working. I've been trying to find the
> error. It says "missing } in XML expression at $("#send") but then
> I switched places between $("#send")... and $.get(..., then the error
> comes out like "missing } XML expression at $.get(... instead. So I
> don't know what's wrong, Is there any function that needs to be put in
> between somehow?
>
> Again, now I delete everything except for $.get( in myscript.js.
> And I put them in the html file manually like
> 
> function disappear() {
>$("#response").fadeOut("slow")
> }
> $(document).ready(function() {
>$("#message_me").click(function() {
>$("#form").fadeIn("slow")
>})
>$("#send").click(function() {
>var str = $("#input_form").serialize()
>$.post("send-mail.php",str,function(data) {
>$("#response").html(data).fadeTo("slow", 0.7)
>setTimeout("disappear()", 3000)
>})
>})
> })
> 
> Now then, it works fine.
>
> Can you tell me why it's not working in the uppermost one. cuz I want
> to put everything in one script file, and not to show any script in
> the html file.
>
> Thank you very much for any responses, really appreciate your time.
> DeaR
>


[jQuery] Re: BBC Redesign

2008-01-02 Thread Jake McGraw
Can't stand that clock in the right hand corner... why on earth is it there?

- jake

On Jan 2, 2008 9:43 AM, Andy Matthews <[EMAIL PROTECTED]> wrote:

>
> Very nice...well done
>
> -Original Message-
> From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of nathandh
> Sent: Monday, December 31, 2007 11:51 PM
> To: jQuery (English)
> Subject: [jQuery] BBC Redesign
>
>
> Looks like the long-overdue BBC redesign is using jQuery (and a metric ton
> of whitespace and internal CSS):
>
> http://www.bbc.co.uk/home/beta/
>
>
>


[jQuery] Re: creating own callback

2007-12-21 Thread Jake McGraw
I'm sure there's a more sophisticated way of doing this, but functions can
be passed around like any other variable type in JavaScript, so:

jQuery.extend({
   preloadImage: function(imagePath,callback) {
 jQuery("").attr("src", "gfx/"+imagePath);
 callback();
   }
});

Should do the trick.

- jake

On Dec 21, 2007 3:11 PM, Eric Teubert <[EMAIL PROTECTED]> wrote:

>
> Hi,
>
> I spend some time in browsing through the documentation but I didn't
> find anything about creating own functions with callback-
> functionality. How do I do this?
>
> What I want to do:
> Write a function that preloads an image and returns a callback when
> the image is loaded. It looks like
>
> jQuery.extend({
>preloadImage: function(imagePath) {
>jQuery("").attr("src", "gfx/"+imagePath);
>}
> });
>
> $.preloadImage("example.gif");
>
> But how have I to edit the first part when I want the second to look
> like the following?
>
> $.preloadImage("example.gif", function() { alert("Preloading
> finished"); });
>
> Thanks!
>


[jQuery] Re: Call Function From AJAX Loaded Page

2007-12-21 Thread Jake McGraw
Hmm, first thing that caught my eye:

http://www.w3.org/TR/html4/types.html#type-name

Secondly, make sure that your document has been loaded BEFORE binding
events, you can't simply do:




  $("a.twitter").click(function(){...});





Hello!

Because when $("a.twitter") runs, the entire document hasn't yet been
loaded, so no elements are found and no events are bound. Luckily, jQuery
has a very easy way to remedy this, wrap anything that interacts with
elements with $(document).ready(function(){...})




  $(document).ready(function(){
$("a.twitter").click(function(){...});
//  Other bindings, events, etc 
  });





Hello!

For more information on this, check out:

http://docs.jquery.com/Events/ready

- jake

On Dec 21, 2007 3:23 PM, Dave <[EMAIL PROTECTED]> wrote:

>
> I am trying to call a function from this link (  id="twitter_display">
> Alright! New office chair![next] div> )   I want this to activate on the click() of
> a.twitter   but $
> ("a.twitter").click(function() {... is not calling the function.
> What do I need to replace "a.twitter" with to get this function to
> call?  Thanks
>


[jQuery] Re: Announcing jQuery HowTo's

2007-12-21 Thread Jake McGraw
Very cool, I often write detailed responses for how to questions on this
list. From now on, I'll post to your website and send them a link.

- jake

On Dec 21, 2007 2:50 AM, Shawn <[EMAIL PROTECTED]> wrote:

>
> In a recent thread
> (
> http://groups.google.com/group/jquery-en/browse_thread/thread/acfe180142e9668a/0453acd9acf83754?lnk=gst&q=New+jQuery+release#0453acd9acf83754
> )
> the need for volunteer help with the documentation was discussed.  I
> posted a suggestion that maybe a "how-to" type of document may help
> those who do not like the reference style of the official docs.  I took
> a look at adding to the wiki, but don't know the syntax/formatting
> needed (yet).  But I wanted to do something about this idea while it was
> more or less fresh in my head.
>
> So, I slapped together a quick Drupal site under a sub-domain to my own
> domain, and started typing.  Actually, I had started typing first, but
> quickly realized that an approach was needed to allow the community to
> offer feedback and/or help out.  So, a Drupal site sounded perfect for
> this - for now at least.  So, the site is at
>
> http://jquery.open2space.com
>
> I have some basic items in there right now, and am planning on extending
> the how-to's as I have time.  But I'm only one person and the areas I
> think would be helpful may be only a small subset of what everyone else
> thinks is helpful.  So feel free to create an account and help out.
>
> The actual how-to's are at http://jquery.open2space.com/howto.  And if
> you'd like to contribute, I have some quick instructions and guidelines
> at http://jquery.open2space.com/node/2.
>
> Logged in users can also blog about their jQuery experiences if they'd
> like.
>
> This is a bit of an experiment for me (the community driven site that
> is).  I'd like to see the community grow this idea, and even better -
> make it so popular that it makes sense to roll back into the official
> jQuery site. :)  My thoughts right now is that this site become a jQuery
> learning center, with links to pertinent books and blogs, and other
> resources for learning jQuery.  (Yep I have the Learning jQuery blog in
> the feeds.. any others that should be there? :)
>
> Any suggestions on making the site better are much appreciated.  And
> thanks to everyone who helped me get as far in my own understanding of
> jQuery!
>
> Shawn Grover
>
>


[jQuery] Re: using AJAX with jQuery

2007-12-21 Thread Jake McGraw
As you can tell, the possibilities are endless with jQuery... best skimming
through the documents so you can get an idea of the tools out there.

- jake

On Dec 21, 2007 11:28 AM, Jake McGraw <[EMAIL PROTECTED]> wrote:

> JJShell:
>
> You can address both issues by using all inputs within a form
>
> var values = {};
>
> $("form").find("input:text").each(function(){
>   values[$(this).attr("name")] = $(this).val();
> });
>
> Now values will have the following structure for your second example,
> which PHP should automatically turn into an array within $_POST:
>
> {
>   "pagetitle[1]" : "test",
>   "pagetitle[2]" : "some title",
>   "pagetitle[3]" : "some other title"
> }
>
> - jake
>
>
> On Dec 21, 2007 3:00 AM, jjshell <[EMAIL PROTECTED] > wrote:
>
> >
> > First of all, thanks for your time and answers. I really appreciate
> > it. Having made a few tests, the $.ajax approach seems the one that
> > fits the most my application.
> >
> > Just a few questions:
> >
> > 1.
> > Can you avoid to explicitely name each field of your form?
> > data: "test=" + $("input[name=test]").val(),
> > What if a form is dynamically created server-side? Do you also have to
> > dynamically create a line for jQuery?
> >
> > 2.
> > How dows this approach reacts to array fields?
> >
> > 
> > 
> > 
> >
> > Thank you again for your time :)
> >
>
>


[jQuery] Re: using AJAX with jQuery

2007-12-21 Thread Jake McGraw
JJShell:

You can address both issues by using all inputs within a form

var values = {};

$("form").find("input:text").each(function(){
  values[$(this).attr("name")] = $(this).val();
});

Now values will have the following structure for your second example, which
PHP should automatically turn into an array within $_POST:

{
  "pagetitle[1]" : "test",
  "pagetitle[2]" : "some title",
  "pagetitle[3]" : "some other title"
}

- jake

On Dec 21, 2007 3:00 AM, jjshell <[EMAIL PROTECTED]> wrote:

>
> First of all, thanks for your time and answers. I really appreciate
> it. Having made a few tests, the $.ajax approach seems the one that
> fits the most my application.
>
> Just a few questions:
>
> 1.
> Can you avoid to explicitely name each field of your form?
> data: "test=" + $("input[name=test]").val(),
> What if a form is dynamically created server-side? Do you also have to
> dynamically create a line for jQuery?
>
> 2.
> How dows this approach reacts to array fields?
>
> 
> 
> 
>
> Thank you again for your time :)
>


[jQuery] Re: Updating input values before the submit.

2007-12-20 Thread Jake McGraw
Ah do you have a copy of the form, so I can see exactly what you're doing?

- jake

On Dec 18, 2007 7:29 PM, Jesse R. <[EMAIL PROTECTED]> wrote:

>
> The request is still failing.  Any other ideas?
>
> On Dec 18, 11:37 am, "Jake McGraw" <[EMAIL PROTECTED]> wrote:
> > The problem is that the form is actually submitting before you can get a
> > response, this is the nature of an asynchronous request (the first A in
> > AJAX). Perhaps you could bind the the submit to one of the callbacks:
> >
> > jQuery("#googleCheckout").submit(function() {
> > var $form = jQuery(this);
> > if (!$form.is(".okgo")) {
> > jQuery.ajax({
> > type: "POST",
> > dataType: "json",
> > url: "/json-checkout",
> > error: function(){
> > // Do nothing, "okgo" not added
> > },
> > success: function(json){
> > jQuery("input:first").val(json.gec);
> > jQuery("input:eq(1)").val(json.ges);
> > // This will prevent the AJAX message from being sent
> again
> > $form.addClass("okgo");
> > // Successful AJAX message, re-submit, this time for
> real
> > $form.submit();
> > }
> > });
> > return false;
> > }
> >
> > });
> >
> > On Dec 18, 2007 11:27 AM, Jesse R. <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> > > I have the following html code:
> >
> > > https://sandbox.google.com/checkout/
> > > cws/v2/Merchant/747474/checkout" method="post">
> > > 
> > > 
> > >  > > src="https://sandbox.google.com/checkout/buttons/checkout.gif?
> >
> > >
> merchant_id=747474&w=160&h=43&style=WHITE&variant=TEXT&loc=en_US
> > > "
> > > height="43" width="160" />
> > > 
> >
> > > I want to dynamically load those values with a json request
> > > immediately before the submit, but not any sooner.  I tried doing the
> > > following code:
> >
> > > jQuery("#googleCheckout").submit(function() {
> > > jQuery.ajax({
> > >   type: "POST",
> > >   dataType: "json",
> > >   url: "/json-checkout",
> > >   error: function(){return false;},
> > >   success: function(json){
> > >jQuery("input:first").attr({
> > >value: json.gec
> > >});
> > >jQuery("input:eq(1)").attr({
> > >value: json.ges
> > >});
> > >return true;
> > >}
> > >   });
> > > });
> >
> > > However, the ajax request fails according to Firebug and the submit
> > > contains the old data.  The requested URL is
> > >http://www.blueskyvineyard.com/json-checkout.
> > > Any suggestions would be greatly appreciated!
>


[jQuery] Re: using AJAX with jQuery

2007-12-20 Thread Jake McGraw
Replace // ? with:

$(function(){ // 1
  $("form").submit(function(){ // 2
var value = $(this).find("input[name=test]").val(); // 3
$.post("/test/ajax/record/",{"test":value},function(){ // 4
  alert("Message sent successfully!"); // 5
});
return false; // 6
  });
});

Notes for each line:

1. $(function(){}) is short hand for $(document).ready(function(){}), this
means your javascript won't run until the entire document is loaded, check
out:

http://docs.jquery.com/Events/ready

2. We bind a function to execute when our form is being submitted:

$("form") finds all of the  elements on the page (there is only one
right now)
$("form").submit() binds a function to the submit event of the form (what
takes place when you click the submit button), see:

http://docs.jquery.com/Events/submit#fn

3. When a function is bound to a select set ($("form") =>
$("form").submit()), the "this" keyword is automatically set to the element
we are currently with, so rather than writing $("form") again, we can simply
refer to $(this), see:

...the 'this' keyword points to the specific DOM element...

http://docs.jquery.com/Core/each

4. The $.post function has three parameters:
a. The URL target for the post
b. Variables to be sent to server: {"var":"value"} (Accessible in PHP using
$_POST['var'])
c. A callback function  to be executed when the AJAX message successfully
sends and receives a response, see:

http://docs.jquery.com/Ajax/jQuery.post#urldatacallback

5. A JavaScript popup for succesful completion.

6. return false to prevent the form from actually submitting, which would
take us away from the current page, see:

http://docs.jquery.com/Events_(Guide)#event.stopPropagation.28__.29

So, that, in a nutshell is how to do Ajax with jQuery without a plugin.
There is a lot of other stuff thrown in, so definitely check out the
resources before embarking on your AJAX trip and learn all the things jQuery
can do.

- jake






On Dec 20, 2007 1:49 PM, jjshell <[EMAIL PROTECTED]> wrote:

>
> Hello,
> I'm new to jQuery (and AJAX for that matter). Even if the library is
> really easy to use, I'm still having problems "ajaxing".
>
> I'd like to understand how to post the following simple form to the
> server, and send a message to the client depending on the submission
> process output (telling him if what he submitted is ok or not).
>
> Would someone be kind enough to guide me through the steps?
>
> Here's the HTML bit. I am going to use jQuery with the Zend Framework
> (PHP).
>
>  
>  
>
>
>
> //?
>
>
>
>  
>  
>
>  
>
>
>
>
>  
>
>  
>  
>


[jQuery] Re: Create unique class for links inside the tabs?

2007-12-19 Thread Jake McGraw
perhaps you could apply a class to any inserted anchors, something like:

JavaScript:
$("li.tab").append('A Link');

CSS:
a.reset {
  background:#FFF !important;
  // So on and so forth
}

- jake

On Dec 19, 2007 2:40 PM, Reuben <[EMAIL PROTECTED]> wrote:

>
> Hi Bernd:
>
> Thanks for your great work. I'm new to CSS and jQuery, so forgive me
> if there is an obvious answer to this. I'm trying to replace the
> inside contents of a tab section with individual links. However, as
> soon as I throw the  tags on something, the link inherits the class
> of the tab section (with the gray BG and all). How can I inhibit this
> with link content inside the tabs? Thanks!
>


[jQuery] Re: jQuery + call PHP function

2007-12-18 Thread Jake McGraw
Well, yes and no... you must echo the output of the function calls in order
for the AJAX call to get the information... you can do something like this
though, to hold off echoing until the end of the file. I've also included
the exit command, because you generally don't want any other information
outputted once your function has run:





On Dec 17, 2007 7:45 PM, uraz <[EMAIL PROTECTED]> wrote:

>
> I have just one more question. Is it possible to use "return" instead
> of "echo" in php function to pass some data back?
>


[jQuery] Re: Updating input values before the submit.

2007-12-18 Thread Jake McGraw
The problem is that the form is actually submitting before you can get a
response, this is the nature of an asynchronous request (the first A in
AJAX). Perhaps you could bind the the submit to one of the callbacks:

jQuery("#googleCheckout").submit(function() {
var $form = jQuery(this);
if (!$form.is(".okgo")) {
jQuery.ajax({
type: "POST",
dataType: "json",
url: "/json-checkout",
error: function(){
// Do nothing, "okgo" not added
},
success: function(json){
jQuery("input:first").val(json.gec);
jQuery("input:eq(1)").val(json.ges);
// This will prevent the AJAX message from being sent again
$form.addClass("okgo");
// Successful AJAX message, re-submit, this time for real
$form.submit();
}
});
return false;
}
});

On Dec 18, 2007 11:27 AM, Jesse R. <[EMAIL PROTECTED]> wrote:

>
> I have the following html code:
>
> https://sandbox.google.com/checkout/
> cws/v2/Merchant/747474/checkout" method="post">
> 
> 
>  src="https://sandbox.google.com/checkout/buttons/checkout.gif?
>
> merchant_id=747474&w=160&h=43&style=WHITE&variant=TEXT&loc=en_US
> "
> height="43" width="160" />
> 
>
> I want to dynamically load those values with a json request
> immediately before the submit, but not any sooner.  I tried doing the
> following code:
>
>
> jQuery("#googleCheckout").submit(function() {
> jQuery.ajax({
>   type: "POST",
>   dataType: "json",
>   url: "/json-checkout",
>   error: function(){return false;},
>   success: function(json){
>jQuery("input:first").attr({
>value: json.gec
>});
>jQuery("input:eq(1)").attr({
>value: json.ges
>});
>return true;
>}
>   });
> });
>
> However, the ajax request fails according to Firebug and the submit
> contains the old data.  The requested URL is
> http://www.blueskyvineyard.com/json-checkout.
> Any suggestions would be greatly appreciated!
>


[jQuery] Re: jQuery + call PHP function

2007-12-17 Thread Jake McGraw
Well, depending on how to implement it, you'd have to pass some kind of
argument:

PHP File, "myscript.php":



JavaScript:

$.get("myscript.php",{'func':'2'},function(data){
  // data now contains "Hello from 2"
});
$.get("myscript.php",{'func':'1'},function(data){
  // data now contains "Hello from 1"
});
$.get("myscript.php",{'func':'3'},function(data){
  // data now contains "Hello from 3"
});

I'd suggest setting up a switch statement as opposed to a call_user_func(),
for security purposes.

- jake


On Dec 17, 2007 10:52 AM, uraz <[EMAIL PROTECTED]> wrote:

>
> Ok but if You have for exaple 3 php functions ( function1(),
> function2(), function3() ) in the document and you want to call
> function2() what can you do?
>


[jQuery] Re: [SITE SUBMISSION] BigCarrot.com

2007-12-13 Thread Jake McGraw
Thanks for the feedback guys, Josh, Mike: thanks for "getting it", we figure
that's half the battle in getting people to use our site. It's incredibly
refreshing to get some positive feedback. I <3 the jQuery community.

- jake

On Dec 13, 2007 6:18 PM, Mike Alsup <[EMAIL PROTECTED]> wrote:

>
> Great site!  Love the idea, love the look.  Nice work, Jake!
>
>
> > I'd like to submit the site I've been working on for 5 months or so:
> >
> > www.bigcarrot.com
>


[jQuery] [SITE SUBMISSION] BigCarrot.com

2007-12-13 Thread Jake McGraw
Hey Everyone:

I'd like to submit the site I've been working on for 5 months or so:

www.bigcarrot.com

Think crowd-sourced inducement prizes (give yourself a high five if any of
that makes sense to you).

We're using jQuery (little Ajax, site wide fixes for IE forms) and jqModal
throughout the site.

For any TinyMCE users/developers out there, we're currently using TinyMCE
for content creation and it just so happens that a bug within the editor has
proven to be such a pain that we've started our own inducement prize to fix
it:

http://www.bigcarrot.com/prizes/zqyzafdgf

Critiques are welcome!

- jake


[jQuery] Re: jQuery + call PHP function

2007-12-13 Thread Jake McGraw
This would call the PHP script that originally produced the page (stored in
window.location.toString()) using AJAX:

$.get(window.location.toString(),{/* Put $_GET variables here
*/},function(data){
  /* Do something with "data" here */
});

- jake

On Dec 13, 2007 2:35 PM, uraz <[EMAIL PROTECTED]> wrote:

>
> I'm wondering how  can I asynchronously call the php function which is
> placed in the same file as the js code and html (just on the top of
> it, before the ). Something that 'xajax' do.
>
> Thanks for replies
>


[jQuery] Re: Code feedback... Callbacks for timing...

2007-12-07 Thread Jake McGraw
What are you trying to accomplish with load()? From the documentation:

http://docs.jquery.com/Events/load

I don't see any reference to the usage you're attempting.

- jake

On Dec 6, 2007 8:34 PM, Micky Hulse <[EMAIL PROTECTED]> wrote:

>
> Hi all, I hope my question is not too silly... I just wanted to get a
> little feedback -- basically wondering what I am doing wrong here:
>
> ..
> $('#' + what).fadeOut('slow', function() {
> $(this).load(this.href, {'targ': what}, function() {
> $(this).fadeIn('slow');
> });
> });
> ..
>
> Basically, I want to fade-out a div, then .load(), then fade the div
> back in... The above code is returning errors, but I am not sure what
> I am doing wrong.
>
> I can post more code if need be.
>
> Any help, tips, rtfm's, and/or links would be spectacular. :)
>
> Many TIA's.
> Cheers,
> Micky
>


[jQuery] Re: Can figure out the diference between input button and button

2007-12-06 Thread Jake McGraw
Perhaps try  instead of .

Haven't tested, but it looks like maybe your form is trying to submit before
the AJAX gets a chance to resolve.

- jake

On Dec 6, 2007 1:53 PM, Marcelo Wolfgang <[EMAIL PROTECTED]> wrote:

>
> Hi list
>
> Long time lurker, first time poster, so here it goes:
>
> I have a simple form that call a $.get, if I have a  type="button"> my code works but if I have a  it
> doesn't ... can anyone tell me what I'm doing wrong? here's the code:
>
>
>
>$(document).ready(function(){
>$("#btSubmit").click(function () {
>   var id = $("#user_id").val();
>   var number2 = $('#number2').attr('value');
>   $.get("a_edit.php", { userid: id, number2: number2 },
>   function(data){
>  alert("Data Loaded: " + data);
>  $("#edit_response").append(data);
>   });
>   });
>});
>
>
> and the html that works
>
>
>
>
>
>
>
> and the html that don't work:
>
>
>
> src="../../images/btAdicionar.gif" width="94" height="16" alt="subit
> form" />
>
>
>
> TIA
> Marcelo Wolfgang
>


[jQuery] Re: Geocoding with Google Maps while a page is loading

2007-12-01 Thread Jake McGraw
Are you getting any specific JavaScript errors (using Firebug)? Also could
you provide a link to the page you're trying to work on? I have some
experience using jQuery an Google Maps.

- jake

On Dec 1, 2007 4:26 PM, Mazso <[EMAIL PROTECTED]> wrote:

>
> For several hours I tried to get the Google Map GeoCoding Script of
> Blackpool Community Church Javascript Team working with jQuery but I
> failed. Loading the script from an external file is no problem. But I
> can´t get the  function showAddress() starting when the page is
> loaded. I tried $(window).load(function(showAddress), $
> (document).ready(function() - no one worked. The address is stored in
> a paragraph with the id "address" which one I can manipulate. When I
> put the JavaScript-Code inside the XHTML-Code an call showAdress with
>  everthing is working fine. But really -
> I don't like JavaScript and XHTML mixed up.
>
> So anyone has an advice for me?
>
> Thank you
>
> Mazso
>
> $(document).ready(function() {
>
>
>if (GBrowserIsCompatible()) {
>
>  var map = new GMap($("#map")[0]);
>  map.addControl(new GLargeMapControl());
>  map.addControl(new GMapTypeControl());
>  map.setCenter(new GLatLng(20,0),2);
>
>  // == Create a Client Geocoder ==
>  var geo = new GClientGeocoder();
>
>  // == Array for decoding the failure codes ==
>  var reasons=[];
>  reasons[G_GEO_SUCCESS]= "Success";
>  reasons[G_GEO_MISSING_ADDRESS]= "Missing Address: The
> address was either missing or had no value.";
>  reasons[G_GEO_UNKNOWN_ADDRESS]= "Unknown Address:  No
> corresponding geographic location could be found for the specified
> address.";
>  reasons[G_GEO_UNAVAILABLE_ADDRESS]= "Unavailable Address:
>  The
> geocode for the given address cannot be returned due to legal or
> contractual reasons.";
>  reasons[G_GEO_BAD_KEY]= "Bad Key: The API key is
> either invalid or does not match the domain for which it was given";
>  reasons[G_GEO_TOO_MANY_QUERIES]   = "Too Many Queries: The
> daily geocoding quota for this site has been exceeded.";
>  reasons[G_GEO_SERVER_ERROR]   = "Server error: The
> geocoding request could not be successfully processed.";
>
>  // == Geocoding ==
>  function showAddress() {
> var search = $("#address").text();
>//var search = document.getElementById("search").value;
>// == Perform the Geocoding ==
>geo.getLocations(search, function (result)
>  {
>// If that was successful
>if (result.Status.code == G_GEO_SUCCESS) {
>  // How many resuts were found
>  document.getElementById("message").innerHTML = "Found
> "
> +result.Placemark.length +" results";
>  // Loop through the results, placing markers
>  for (var i=0; ivar p = result.Placemark[i].Point.coordinates;
>var marker = new GMarker(new GLatLng(p[1],p[0]));
>document.getElementById("message").innerHTML +=
> ""+(i+1)+": "+ result.Placemark[i].address + marker.getPoint();
>map.addOverlay(marker);
>  }
>  // centre the map on the first result
>  var p = result.Placemark[0].Point.coordinates;
>  map.setCenter(new GLatLng(p[1],p[0]),14);
>}
>// == Decode the error status ==
>else {
>  var reason="Code "+result.Status.code;
>  if (reasons[result.Status.code]) {
>reason = reasons[result.Status.code]
>  }
>  alert('Could not find "'+search+ '" ' + reason);
>}
>  }
>);
>  }
>}
>
>// display a warning if the browser was not compatible
>else {
>  alert("Sorry, the Google Maps API is not compatible with this
> browser");
>}
>
> });
>


[jQuery] Re: list items and show comments? NEWBIE

2007-12-01 Thread Jake McGraw
No, jQuery automatically assigns events to the entire selector set:

$(function(){
  $("#Comments a").click(function(){
/* All anchors will perform this function when clicked */
$(this).next(" div.Comment:eq(0)").fadeIn("slow");
/* Note the use of the "this" keyword */
  });
});

Assuming your HTML document looks like this:


  View the first comment
  
Here is my first comment
  
  View the second comment
  
Here is my Second comment
  


That should work for you. For more information on how selectors and event
assignment works check out:

http://docs.jquery.com/Core/jQuery#expressioncontext
http://docs.jquery.com/Types#Element

- jake

On Dec 1, 2007 10:00 AM, msjoedin <[EMAIL PROTECTED]> wrote:

>
>
> Hi all!
>
> I am struggling to make my first jQuery implementation and I really would
> need some help. Here's my thing...
>
> I have a list of Click here to view comments and I then want to call the
> fadeIn("normal") on the comment div. Do I need to use the foreach for each
> object? Or is there any other smart way to do this?
>
> / Mats
>
> --
> View this message in context:
> http://www.nabble.com/list-items-and-show-comments--NEWBIE-tf4928469s27240.html#a14106081
> Sent from the jQuery General Discussion mailing list archive at Nabble.com
> .
>
>


[jQuery] Re: Replacing contents using an array

2007-12-01 Thread Jake McGraw
Here's a solution I think you'll find helpful:

JavaScript:
Trans = {
"t1":"New Text 1",
"t2":"New Text 2",
"t3":"New Text 3"
};
$(function(){
$("#newText, #oldText").click(function(){
if ($(this).is(".active")) {return;}
$("a").each(function(){
if (Trans[this.id]) {
var tmp = $(this).text();
$(this).text(Trans[this.id]);
Trans[this.id] = tmp;
}
});

$(this).addClass("active").siblings("input:button").not(this).removeClass("active");
});
});

HTML:



Old Text 1
Old Text 2
Old Text 3

This solution changes link text based on IDs, so if you don't have
everything translated yet you can still swap for those links you do have
translations for.

- jake

On Dec 1, 2007 5:50 PM, Mali <[EMAIL PROTECTED]> wrote:

>
> Hello Lee,
>
> It's work like a charm!! :) thank you very much for your help. I'll
> study this more. It's fun!
>
> Regards,
> Mali
>
> On Dec 1, 11:47 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
> wrote:
> > Hi Mali,
> >
> > Try this instead:
> > I'm still fairly new to jQuery (1 week), so I'm sure there must be an
> > even shorter way...
> >
> > $(function() {
> >
> > $("#newText").click(function(){
> >
> > $('#myList a').each(function(x){
> > if (!this.origText) {
> > this.origText = $(this).text();
> > }
> >
> > arr=["My new text A","My new text B","My new
> text C","My new text
> > D","My new text E","My new text F"];
> >
> > $(this).text(arr[x]);
> > });
> >
> > });
> >
> > $("#oldText").click(function(){
> >
> > $('#myList a').each(function(x){
> > $(this).text(this.origText);
> > //$('#dump').html(printProps(this, 'obj'));
> >
> > });
> >
> > });
> >
> > });
> >
> > Regards
> > Lee
> >
> > Mali wrote:
> > > Hello,
> > > I am a webdesigner who is new to javascript and this is my first week
> > > of learning jquery. I enjoy it very much.  I have a question about
> > > array.
> >
> > > What I am trying to do is to translate the text of each links into
> > > other language by using array.  I want the texts to be switched when
> > > clicking "Give me new texts/ Give me old texts" buttons.
> >
> > > What I did below is a straightforward way by selecting each  tag
> > > directly and replace it with the new texts. Also, I would like to
> > > 'clone' the original text so that I can switch it back.
> >
> > > I am sure that there is a better way of doing this using ".each",
> > > ".clone" and array technique.
> > > The problem is that I don't know how to combine all these in the
> > > logical way.
> >
> > > Can someone give me a good direction please. Your answer will be
> > > greatly appreciated
> >
> > > Here is my code
> >
> > > ---
> >
> > >  > > "http://www.w3.org/TR/html4/loose.dtd";>
> > > 
> > > 
> > > http://code.jquery.com/jquery-latest.js";>
> > > 
> >
> > > $(function() {
> > > arr=["My new text A","My new text B","My new text C","My new text
> > > D","My new text E","My new text F"];
> > > $("#newText").click(function(){
> > > $("#myList a:eq(0)").text(arr[0]);
> > > $("#myList a:eq(1)").text(arr[1]);
> > > $("#myList a:eq(2)").text(arr[2]);
> > > $("#myList a:eq(3)").text(arr[3]);
> > > $("#myList a:eq(4)").text(arr[4]);
> > > $("#myList a:eq(5)").text(arr[5]);
> > > });
> >
> > > });
> >
> > > 
> >
> > > 
> > > 
> >
> > > 
> > > 
> >
> > > 
> > >Text A
> > >Text B
> > >Text C
> > >Text D
> > >Text E
> > >Text F
> > > 
> >
> > > 
> > > 
> >
> > >
> -
>


[jQuery] [SITE SUBMISSION] songza.com

2007-11-19 Thread Jake McGraw
This is one of the first sites I saw and the following events took place:

1. "They've got to have some slick-ass library running underneath"...
2. Click "firebug"...
3. and what do you know jQuery.

Enjoy it while it's still legal.

- jake


[jQuery] Re: tinyMCE jquery equivalent

2007-11-19 Thread Jake McGraw
FYI tinyMCE w/ plugin based GZip, I was able to get the entire library down
to 46KB for the limited subset of functions I was using.

- jake

On Nov 19, 2007 11:23 AM, Gordon <[EMAIL PROTECTED]> wrote:

>
> There is WYMeditor, but last time I saw it in action it wasn't nearly
> as powerful as TinyMCE.  I don't think there's any particular reason
> why the two scripts wouldn't play nicely though, is there any
> particular reason you want a jQuery based editor?
>
> On Nov 19, 2:46 pm, FrankTudor <[EMAIL PROTECTED]> wrote:
> > Hi all I am looking for a tinyMCE jquery equivalent (if one exists)...
> >
> > Thanks,
> > Frank
>


[jQuery] Re: tinyMCE jquery equivalent

2007-11-19 Thread Jake McGraw
WYMeditor

- jake

On Nov 19, 2007 9:46 AM, FrankTudor <[EMAIL PROTECTED]> wrote:

>
> Hi all I am looking for a tinyMCE jquery equivalent (if one exists)...
>
> Thanks,
> Frank
>


[jQuery] Re: [OT] WYSIWYG for Safari

2007-11-15 Thread Jake McGraw
Thanks for getting back to me, after researching the issue, it appears all
JavaScript WYSIWYG editors for Safari 2.0.4 and lower can not properly
detect the "Tab" event. After some consideration, we've decided to drop
support for Safari 2.0.4 and lower. Thanks for the suggestion though.

- jake

On Nov 14, 2007 7:57 PM, <[EMAIL PROTECTED]> wrote:

>
> The YUI framework has a Rich Text Editor (RTE) that supports Safari,
> I'm not sure which version tho.
>
> On 11/13/07, Jake McGraw <[EMAIL PROTECTED]> wrote:
> >
> > Hey all, sorry for the off topic post, but I must be going insane.
> >
> > I read that TinyMCE and FCKeditor now support Safari, but when I
> > download the demos for both neither works when trying to use Safari
> > 2.0.4. I'm looking for a VERY limited selection of functionality,
> > specifically, Bold, Italic, Ordered List and Links. Can anyone
> > recommend a JavaScript WYSIWYG that will work in IE7, IE6, Firefox AND
> > Safari 2?
> >
> > - jake
> >
>
>
> --
> Joan Piedra  ||  Frontend web developer
> http://www.justaquit.com/  ||  http://www.joanpiedra.com/
>


[jQuery] [OT] WYSIWYG for Safari

2007-11-13 Thread Jake McGraw

Hey all, sorry for the off topic post, but I must be going insane.

I read that TinyMCE and FCKeditor now support Safari, but when I
download the demos for both neither works when trying to use Safari
2.0.4. I'm looking for a VERY limited selection of functionality,
specifically, Bold, Italic, Ordered List and Links. Can anyone
recommend a JavaScript WYSIWYG that will work in IE7, IE6, Firefox AND
Safari 2?

- jake


[jQuery] Re: ANNOUNCE: tinyEdit v.1.0 plugin for jQuery released

2007-11-13 Thread Jake McGraw

Any way to include detection for invalid inserts? I was able to do the
following:

Hello, world

to

Hello, world

Perhaps a recursive tag count on insert?

- jake



On Nov 13, 2007 11:41 AM, Andy Matthews <[EMAIL PROTECTED]> wrote:
>
> That plugin looks like exactly what I need for a project.
>
> -Original Message-
> From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of Karl Swedberg
> Sent: Tuesday, November 13, 2007 9:48 AM
> To: jquery-en@googlegroups.com
> Subject: [jQuery] Re: ANNOUNCE: tinyEdit v.1.0 plugin for jQuery released
>
>
>
>
> On Nov 13, 2007, at 9:34 AM, Guy Fraser wrote:
>
> >
> > Giant Jam Sandwich wrote:
> >> Any suggestions or issues, please let me know. Thanks!
> >>
> >
> > Sweet plugin, tiny codebase too! :D
> >
> > Is it possible to implement different types of tags - eg. bbcode or
> > wiki notation?
>
> Hi Guy,
>
> Not sure what Brian's plans are for implementing different types of tags,
> but if you need that functionality now, there is another excellent plugin
> called jTagEditor:
> http://www.jaysalvat.com/jquery/jtageditor/
>
> This page shows examples using HTML, BBCode, Wiki, and Textile:
> http://www.jaysalvat.com/jquery/jtageditor/_full/index.html
>
>
> --Karl
> _
> Karl Swedberg
> www.englishrules.com
> www.learningjquery.com
>
>
>
>


[jQuery] Re: [OT] RegEx (preg_replace) search in PHP

2007-11-09 Thread Jake McGraw

$string = 'TEXT [ GARBAGE ] TEXT [ GARBAGE ] TEXT';
$string = preg_replace('/\[[^\]]+\]/','',$string);
echo $string;

Should do the trick.


On Nov 9, 2007 11:50 AM, Olaf Bosch <[EMAIL PROTECTED]> wrote:
>
> Hi all,
> sorry for this OT, can you help me with this?
>
> I have this string "Text [ Trash ] Text [ Trash ] Text"
>
> I will have this "Text Text Text"
>
> What can i do? my stupid try:
>
> $news_desc = preg_replace ('![.+?]!is','',$news_desc);
>
>
> --
> Viele Grüße, Olaf
>
> ---
> [EMAIL PROTECTED]
> http://olaf-bosch.de
> www.akitafreund.de
> ---
>


[jQuery] Re: LiveQuery (Discuss Please)

2007-11-07 Thread Jake McGraw

I don't see what the disconnect for most users is, but I always
assumed that after destroying an element, no matter how it was
reconstructed, I would have to re-bind events using helper functions.
LiveQuery is a useful shortcut for bypassing a logical (IMHO) series
of events, and as such, should remain a plugin rather than added to
the core.

- jake

On Nov 7, 2007 12:09 PM, cjiang <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I had the same experience as Tane. In the beginning, because of the
> JQuery's bug that non-root level script cannnot be evaluated after
> Ajax call in 1.2 release, I used livequery a lot, and did find that
> the page was not very responsive. The performance is getting better
> after I removed some of them.
>
> Regards,
> Changsu
>
> On Nov 1, 1:33 am, "Tane Piper" <[EMAIL PROTECTED]>
> wrote:
> > Here's my 2p
> >
> > I've recently been using livequery a lot on my pastebin app - however
> > I've been taking it out again, and I really wonder if it should be
> > core?
> >
> > Don't get me wrong, it is a great plugin - however I think it breeds
> > bad (lazy) design in Ajax apps as it lacks
> >
> > and I wonder if it's really that fast?  Since taking a lot of
> > livequery out I've noticed speed improvments in my app.
> >
> > On 01/11/2007, Yehuda Katz <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> >
> >
> > > I would like to see livequery in the core, but John believes that its rate
> > > of adoption is too slow to justify getting it in the core. If that's the
> > > case, I want to know why, since it fundamentally improves on core jQuery
> > > concepts in (like I said above), what I believe to be the most innovative
> > > improvement to the jQuery paradigm since its inception.
> > > If you use it, please speak up! If not, why not?
> >
> > > -- Yehuda
> >
> > > On 10/31/07, Mike Alsup <[EMAIL PROTECTED]> wrote:
> >
> > > > What makes you think the adoption rate is slow?  I get the feeling
> > > > that a good number of people are using it.
> >
> > > > > So as far as I'm concerned, livequery is the biggest advance in jQuery
> > > > since
> > > > > its inception (no, I am not its author). I'm trying to understand why
> > > > it's
> > > > > having such a slow rate of adoption.
> >
> > > --
> > > Yehuda Katz
> > > Web Developer | Procore Technologies
> > > (ph)  718.877.1325
> >
> > --
> > Tane Piper
> > Blog -http://digitalspaghetti.me.uk
> > AJAX Pastebin -http://pastemonkey.org
> >
> > This email is: [ ] blogable [ x ] ask first [ ] private- Hide quoted text -
> >
> > - Show quoted text -
>
>


[jQuery] Re: PROBLEM: Adding hover to table rows on large tables

2007-11-06 Thread Jake McGraw

Why not try paging on scroll, similar to Google Reader? I think there
was a plugin for just that a while ago.

- jake

On Nov 6, 2007 5:01 PM, Josh Nathanson <[EMAIL PROTECTED]> wrote:
>
>
> I had to do just that (add mouse events directly to the html elements) in a
> similar situation.  Binding via jQuery was too slow when it got up to 1000
> or so bindings.  I was getting the "long running script" errors.  A
> necessary evil in that scenario I'm afraid.
>
> In my case users can select how much data they want to view.  Sometimes
> people like loading tons of data onto a page, as they prefer scrolling to
> paging.
>
> -- Josh
>
>
>
>
> - Original Message -
>
> From: Karl Swedberg
> To: jquery-en@googlegroups.com
>
>
> Sent: Tuesday, November 06, 2007 1:55 PM
> Subject: [jQuery] Re: PROBLEM: Adding hover to table rows on large tables
>
> You could add onmouseover and onmouseout directly to the s. It's ugly
> (don't tell anyone I suggested it), but it might avoid the overhead.
>
>
>
>
>
> --Karl
> _
> Karl Swedberg
> www.englishrules.com
> www.learningjquery.com
>
>
>
>
>
> On Nov 6, 2007, at 3:43 PM, fambizzari wrote:
>
>
>
>
> You guys are all right, but so many rows on one page are necessary
> here.
>
>
> I'll try to figure out an acceptable work-around.
>
>
> Thanks
>
>
>
>
>
>
> On Nov 6, 8:38 pm, "Andy Matthews" <[EMAIL PROTECTED]> wrote:
>
> I'd have to agree. I can't see any practical reason why you'd need to
> display that much data on one page. Aside from the download, and rendering
> time, the performance of the browser with that much data in memory would be
> horrible. Scrolling, copying, etc. would all be severely affected.
>
>
> andy
>
>
> -Original Message-
> From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
>
>
> Behalf Of Jeffrey Kretz
> Sent: Tuesday, November 06, 2007 9:21 AM
> To: jquery-en@googlegroups.com
> Subject: [jQuery] Re: PROBLEM: Adding hover to table rows on large tables
>
>
> Personally, I would recommend looking at a paging solution, rather than
> trying to deal with so many rows on a single HTML page.
>
>
> I tested a simple 10,000 row table with very little data in it clocked in at
> a 2mb download, requiring 4 seconds to download and render as a local file
> on FireFox (i.e. no network traffic, loading the .htm file out of my local
> file system).
>
>
> And the more DOM elements of the page the harder it is to manipulate with
> any kind of scripting.
>
>
> If paging your results doesn't work for you, then the tr:hover CSS-only
> solution would really be the best way to go.
>
>
> JK
> -Original Message-
> From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of fambizzari
> Sent: Tuesday, November 06, 2007 2:29 AM
> To: jQuery (English)
> Subject: [jQuery] Re: PROBLEM: Adding hover to table rows on large tables
>
>
> The solution i adopted was CSS (tr:hover) for non-IE6 and only allow small
> tables to have hover-over using a class name to identify them.
>
>
> Any better solutions?
>
>
> On Nov 6, 10:45 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
>
> The following code works fine on small tables:
>
>
>
> $("table tbody
>
>
> tr").mouseover(function(){$(this).addClass("over");}).mouseout(function(){$(
> this).removeClass("over");});
>
>
>
> But on tables with 5,000-10,000 rows, it throws the "A script on this
> page may be busy, or it may have stopped responding. You can stop the
> script now, open the script in the debugger, or let the script continue."
>
>
>
> Can anyone suggest a workaround?
>
>
>
> Thanks
>
>
>


[jQuery] Re: SITE SUBMISSION: pvponline.com

2007-11-05 Thread Jake McGraw

What I love is the bullocks (I've been watching too much Gordon
Ramsey's "Kitchen Nightmares") these guys have (http://thinslice.net/)
have, from their website:

> Crap. The stuff that so many web "experts" hurl at their clients without 
> mercy.
> They promise style, they promise substance. But underneath all the gloss,
> they've got nothing.

> Well we say it's time to cut the crap. To trim the fat that's weighing down 
> the
> web, with custom applications built to enhance and simplify.

So, if including 200KB of JavaScript Libraries on a page that only
utilizes ThickBox is considered "trim[ing] the fat", what does a fat
website look like? That particular page weighs in at 826KB, not
exactly lean by anyone's definition.

- jake

On Nov 5, 2007 9:09 AM, Andy Matthews <[EMAIL PROTECTED]> wrote:
>
> That's pretty funny. Whomever designed this site isn't really thinking that
> smart. They're using jQuery AND Prototype. Most likely just using jQuery to
> be able to use Thickbox. Why not just use Lightbox then and save yourself
> the load of jQuery?
>
>
> andy
>
>
> -Original Message-
> From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of Jake McGraw
> Sent: Sunday, November 04, 2007 1:38 AM
> To: jquery-en@googlegroups.com
> Subject: [jQuery] SITE SUBMISSION: pvponline.com
>
>
> Online comic, using ThickBox:
>
> http://www.pvponline.com/book
>
> - jake
>
>
>


[jQuery] SITE SUBMISSION: pvponline.com

2007-11-03 Thread Jake McGraw

Online comic, using ThickBox:

http://www.pvponline.com/book

- jake


[jQuery] Re: Sticky Footer

2007-10-31 Thread Jake McGraw

Ah, that isn't a true sticky footer, he's talking about a footer that
sticks to the bottom AND does not overlay the page content.

- jake

On Oct 31, 2007 5:21 PM, Andy Matthews <[EMAIL PROTECTED]> wrote:
>
> What code are you using for your CSS? There shouldn't need to be a
> "solution".
>
> CSS:
>
> #footer {
> position: absolute;
> height: 50px;
> width: 300px;
> bottom: 0px;
> left: 10px;
>
> }
>
> -Original Message-
> From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of cfdvlpr
> Sent: Wednesday, October 31, 2007 4:13 PM
> To: jQuery (English)
> Subject: [jQuery] Sticky Footer
>
>
> Is there a way to make a footer always show right at the bottom of the page
> using jQuery?  I've tried the CSS solution from Ryan Fait and it's not
> working for me.
>
>
>


[jQuery] Re: Sticky Footer

2007-10-31 Thread Jake McGraw

I also had a tough time getting Ryan's solution to work, but
eventually I got it to. My major mis-step was using 'px' instead of
'em' for the negative bottom-margin on the content and height for push
and footer. I think you have to use 'em'.

- jake

On Oct 31, 2007 5:12 PM, cfdvlpr <[EMAIL PROTECTED]> wrote:
>
> Is there a way to make a footer always show right at the bottom of the
> page using jQuery?  I've tried the CSS solution from Ryan Fait and
> it's not working for me.
>
>


[jQuery] Re: Prevent comment SPAM with jQuery

2007-10-24 Thread Jake McGraw

Recaptcha is an awesome idea, Google should get in on it.

- jake

On 10/23/07, Guy Fraser <[EMAIL PROTECTED]> wrote:
>
> Alexandre Plennevaux wrote:
> > a much more safe way is to use a very obvious "email" input field that you
> > hide via CSS. Then you check on the serverside, if that field has received a
> > value, then it's most probably a bot, because normal users won't see it,
> > thus not fill it in. of course, not perfect not either since screenreaders
> > will have it displayed. But i heard it's possible to control and hide stuff
> > for screenreaders.
> >
>
>
> Even that won't work - spammers will often post a comment manually and
> watch the HTTP traffic using something like Ethereal to see exactly what
> gets sent to the server. Then they just grab that and automate the
> process and voila, comment spam!
>
> You'd do much better to use something like re-captcha: http://recaptcha.net/
>
> Guy
>


[jQuery] Re: PHP variable into jQuery

2007-10-18 Thread Jake McGraw

Could you possibly give each checkbox the same class?





$(function(){
  $("input.checkMe).click(function(){
if (this.checked) {
  $("#eventItems").text(/([0-9]+)$/.exec(this.id)[1]);
} else {
  $("#eventItems").empty();
}
  });
});

On 10/18/07, choffman <[EMAIL PROTECTED]> wrote:
>
> Hello,
> I have a form where the values are pulled from MySQL and looped
> through using PHP. The name and id values are create dynamically.
>
> For example HTML:
> Item A 
> Item B 
>
> For example PHP:
> Item A  >
> Item B  >
>
> I'm using jQuery to count the boxes that get checked.  How can I get
> jQuery to see my PHP variable so it can count the number of boxes that
> get checked?  Thoughts?
>
> $(document).ready(function() {
> $("#eid_??").click(function() {
> if (this.checked == true) {
> var event_id = $("#eid_??").length;
> $("#eventItems").text(event_id);
> }
>
> if (this.checked == false) {
> $("#eventItems").empty();
> }
> });
> });
>
>


[jQuery] Re: [Site Submission]: nbc.com

2007-10-04 Thread Jake McGraw

On 10/4/07, Karl Swedberg <[EMAIL PROTECTED]> wrote:
> I wonder, Why do I feel like a proud papa every time I see jQuery in the
> wild? It's silly -- I haven't contributed a single line of code and yet I
> had a big grin on my face looking through the .js files on that site. I can
> only imagine how John feels. Must be a rush.

It's always fun being on the "winning" team :-)

- jake

>
>
> --Karl
> _
> Karl Swedberg
> www.englishrules.com
> www.learningjquery.com
>
>
>
>
>
>
>
> On Oct 4, 2007, at 8:36 AM, Sam Collett wrote:
>
>
> It's good that they are using it quite a bit. There are some site that
> use it, but only $(document).ready to call a function that manipulates
> the DOM the old fashioned way.
>
> On 4 Oct, 08:23, "John Resig" <[EMAIL PROTECTED]> wrote:
> Wow! Very awesome :-)
>
> It looks like they're getting a pretty good coverage of features, too.
> (DOM Manipulation, animations, events, etc.)
>
> --John
>
> On 10/4/07, Karl Swedberg <[EMAIL PROTECTED]> wrote:
>
>
> Looks like nbc.com is heavily into the jQuery love now, using 1.1.4.1 on
> their site. Looks like they're using Interface and Mike Alsup's Media
> plugin, and Klaus Hartl's cookie plugin. Also, pulling in some data with
> $.ajax, doing some accordion stuff, etc.. They could be using the
>
>
> This line appears in
> http://www.nbc.com/assets/js/global/nbc.com.jsright after
> all of the jQuery code:
>
>
> // Legacy crap ->
>
>
>  Pretty funny.
>
>
> Here's another file you might want to poke around in:
>
>
> http://www.nbc.com/assets/js/video/fun.js
>
>
> --Karl
> _
> Karl Swedberg
> www.englishrules.com
> www.learningjquery.com
>
>
>


[jQuery] Re: [Site Submission]: nbc.com

2007-10-04 Thread Jake McGraw

A function err'd on my visit, looks like an uncaught exception, when I
went to check it out, I found this comment:

// This is a hack for now. The zip->city map for the lookup service
// most likely doesn't match the zip->city in the WX XML file. We
// we're going to lookup the id in the lookup servcie for the city name so we
// have some consistancy.

Two issues: First, why they even have comments in production js is
mind boggling. Second, if you're going to take the time to add
comments to your code and let the whole world see them, why not run
over them with a quick check for spelling (servcie & consistancy) or
grammar (we're != were).

- jake

On 10/4/07, Sam Collett <[EMAIL PROTECTED]> wrote:
>
> It's good that they are using it quite a bit. There are some site that
> use it, but only $(document).ready to call a function that manipulates
> the DOM the old fashioned way.
>
> On 4 Oct, 08:23, "John Resig" <[EMAIL PROTECTED]> wrote:
> > Wow! Very awesome :-)
> >
> > It looks like they're getting a pretty good coverage of features, too.
> > (DOM Manipulation, animations, events, etc.)
> >
> > --John
> >
> > On 10/4/07, Karl Swedberg <[EMAIL PROTECTED]> wrote:
> >
> > > Looks like nbc.com is heavily into the jQuery love now, using 1.1.4.1 on
> > > their site. Looks like they're using Interface and Mike Alsup's Media
> > > plugin, and Klaus Hartl's cookie plugin. Also, pulling in some data with
> > > $.ajax, doing some accordion stuff, etc.. They could be using the
> >
> > > This line appears in
> > >http://www.nbc.com/assets/js/global/nbc.com.jsright after
> > > all of the jQuery code:
> >
> > > // Legacy crap ->
> >
> > >  Pretty funny.
> >
> > > Here's another file you might want to poke around in:
> >
> > >http://www.nbc.com/assets/js/video/fun.js
> >
> > > --Karl
> > > _
> > > Karl Swedberg
> > >www.englishrules.com
> > >www.learningjquery.com
>
>


[jQuery] Re: jquery + adobe air: getting started?

2007-10-02 Thread Jake McGraw

A free copy of AIR for JavaScript Developers is available here:

http://tinyurl.com/23uqqj [ajaxian.com]

As jQuery ajax functions work within Safari (Webkit), there should be
no major overhauls necessary for your app. Simply generate a static
HTML representation of your application and include it in a directory
with jquery.js, AIRAlias.js and your custom scripts/images. Create an
AIR configuration file (see book) and you should be good to go.

You may also want to check out the Flex Build IDE for Eclipse. It
includes a lot of built in functionality for developing AIR
Applications using either Flex/Flash or HTML/JavaScript.

- jake

On 10/2/07, Andy Matthews <[EMAIL PROTECTED]> wrote:
>
> If anyone sends you something offlist, please post it back here. I'm also
> VERY interested in learning this type of development.
>
> -Original Message-
> From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of Jack Killpatrick
> Sent: Tuesday, October 02, 2007 11:13 AM
> To: jquery-en@googlegroups.com
> Subject: [jQuery] jquery + adobe air: getting started?
>
>
> Hi All,
>
> Anyone know of some blog entries, tutorials, etc (other than the general
> stuff at Adobe Labs) that might help me get started "migrating" a
> jquery-based HTML app to the Adobe AIR runtime? I'm looking for
> jquery-specific tips, examples, etc.
>
> My app does a lot of ajax calls that send json data back and forth, so the
> bulk of it will live in the AIR sandbox, at least initially, so that has to
> be present in the how-to's. I'm using Aptana's AIR plugin for Eclipse for my
> IDE, FWIW.
>
> Thanks!
> - Jack
>
>
>


[jQuery] Re: Enterprise Javascript?

2007-09-28 Thread Jake McGraw

Well, then it sounds like a great platform to develop on. As I said, I
only have experience working with Adobe AIR, which I really like.
Perhaps now I'll take a look at XUL/Gecko.

- jake

On 9/28/07, Christof Donat <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> > after giving a cursory look at XUL here are some
> > of the things AIR does that XUL doesn't:
> >
> > * Built in support for Flex/Flash (Layout/Logic + Fancy Animation/Video)
>
> Of course you can use any Firefox Plugin - including the flash Player,
> Quicktime, Adobe Reader, etc. IIRC there is even going to be an OpenOffice
> Plugin.
>
> > * Many chrome options,
>
> XUL uses CSS for the chromes with mozilla extensions. What exactly is missing
> for you?
>
> > in window animation,
>
> You can mix XUL, HTML and SVG and even MathML as you like. You can have a
> canvas tag and of course you have JavaScript. Which types of Animations are
> missing for you? Ah yes, of course you can use the Flash Plugin as well.
>
> > incredibly fast rendering speed for windows,
>
> I have not had any XUL applications up to now where that would have been an
> issue. Can you tell me a use case, wher XUL is too slow, but AIR does the
> thing?
>
> > support for native OS features,
>
> What native OS features are you missing from the Mozilla Platform?
>
> > simple packaging scheme
>
> http://www.mozilla.org/projects/xpinstall/ is a good start for help with
> packaging XUL applications. I have not user it up to now, but AFAIK that is
> what Firefox and Thunderbird use.
>
> > * Hundreds of desktop application hooks available for your Javascript
>
> XPConnect gives you access to all XPCom components of the Mozilla Platform. Of
> course that is not available for online XUL applications, but for Desktop
> Applications you can of course access everything using JavaScript.
>
> > * Application signing for publishers
>
> At this point I have to admitt, that I have never needed to think about that
> up to now. At least I know that Firefox Extensions are signed so I guess that
> the Mozilla Platform does support it.
>
> > * Industry backing: Adobe, AOL, eBay, Salesforce.com, Akamai,
> > O'Reilly, Movable Type
>
> Are you shure, that the industry backing for the Mozilla platform is bad? From
> reading the news I don't get that impression.
>
> > * Documentation: Adobe Integrated Runtime (AIR) for JavaScript
> > Developers Pocket Guide
>
> The Mozilla Project is one of the best documented pieces of complex Software
> available. What exactly are you missing?
>
> > * IDEs: Flex Builder, Aptana, Eclipse AIR Plugin
>
> Have a look at http://wiki.mozilla.org/XUL:IDE
>
> Christof
>


[jQuery] Re: Enterprise Javascript?

2007-09-28 Thread Jake McGraw

Why no love for AIR? From what I've read, heard and seen, it's going
to be a very interesting platform to develop for and bridge the gap
for a lot of web developers that would like to code for the desktop.

What I'm looking for in developing web applications for the desktop is
the easiest, fastest and best supported platform that doesn't require
me to monkey around too much with my existing code base. While I've
only worked with AIR, after giving a cursory look at XUL here are some
of the things AIR does that XUL doesn't:

* Built in support for Flex/Flash (Layout/Logic + Fancy Animation/Video)
* Many chrome options, in window animation, incredibly fast rendering
speed for windows, support for native OS features, simple packaging
scheme
* Hundreds of desktop application hooks available for your Javascript
* Application signing for publishers
* Industry backing: Adobe, AOL, eBay, Salesforce.com, Akamai,
O'Reilly, Movable Type
* Documentation: Adobe Integrated Runtime (AIR) for JavaScript
Developers Pocket Guide
* IDEs: Flex Builder, Aptana, Eclipse AIR Plugin

- jake



On 9/26/07, Christof Donat <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> > Actually, if you'd like to use js to access a database, may I suggest
> > Adobe AIR?
>
> Have I already expressed my dislike of AIR?
>
> > Basically, in allows you to embed JS/HTML into an installable application,
>
> Wow, how new. Have you ever looked at XUL? Just create an installer that
> installs XULRunner and your XUL/XBL/HTML/JS/CSS-Application and you are done.
>
> I also remember to have seen simple Windows applications that only created a
> window, embedded the IE Engine and load a HTML page that has been copied to
> disk by the installer.
>
> Have you ever heared of .hta applications? They are a generic type of the
> above IE applications by only providing the HTML, images, scripts, etc. in an
> archive file.
>
> OK, the last two are not platform independant, but in many cases that is good
> enough. Use XULRunner otherwise.
>
> So what is so revolutionary new about AIR now that we have to hear all that
> fuzz? Is there anything that can not be done equally efficient with
> XULRunner?
>
> Christof
>


[jQuery] Re: Enterprise Javascript?

2007-09-26 Thread Jake McGraw

Actually, if you'd like to use js to access a database, may I suggest
Adobe AIR? Basically, in allows you to embed JS/HTML into an
installable application, which allows you to move away from the
browser security model and do all kinds of crazy stuff like cross site
scripting, off-line operation and direct database interaction.

I just attended the Adobe onAIR conference in NYC, there is a lot of
interest in this new technology and I think jQuery could play a major
role in desktop applications if this becomes popular.

www.adobe.com/go/air

- jake

On 9/26/07, Danjojo <[EMAIL PROTECTED]> wrote:
>
> We have Java, .NET, PHP, and CFM...
>
> As developers we can do pretty much any UI we want with javascript
> (jquery), css, and semantic markup...
>
> What can't we do?
>
> Interact with an Enterprise database...
>
> Unfortunately at the point we need a real RDBM database backend, we
> are forced to choose one of the server-side languages above in order
> to continue development.
>
> I have not missed a news flash anywhere where this is NOT the case
> have I?
>
> Thanks,
>
>


[jQuery] Re: post data and get data in one request?

2007-09-21 Thread Jake McGraw

Ah, I think you can do something like:


  
  
  


and then in "myapp.php":



The trick is manually inserting the GET variables as URL parameters in
the form action field.

- jake

On 9/20/07, Codex <[EMAIL PROTECTED]> wrote:
>
> Hello,
>
> this is probably something very simple, but I don't get it. I want to
> post data to a php file that send the posted data to the DB. Then I
> would like to return the last inserted ID and use that on the same
> page the request was made from. How is this done? I know how to post
> and how to get, but not in the same request. Do I have to use Ajax?
>
> Maybe it's a little clearer if I mention it's for writing tags to the
> DB Flickr style.
>
> Need help! ;-)
>
>


[jQuery] Re: Strip out HTML tags

2007-09-14 Thread Jake McGraw
Doesn't $().text(); automatically do this?

So:

var text = $(html).text();

Would solve your problem, I think.

- jake

On 9/14/07, Stosh <[EMAIL PROTECTED]> wrote:
>
>
> In Prototype there is a method called stripTags(), it's source looks
> like:
>
> stripTags: function() {
> return this.replace(/<\/?[^>]+>/gi, '');
> }
>
> To do it the jQuery way, I might consider doing something like this...
>
> jQuery.fn.stripTags = function() {
> return this.replaceWith( this.html().replace(/<\/?[^>]+>/gi, '')
> );
> };
>
> Hope this helps, Pax.
>
> - Stan
>
>
>
> On Sep 11, 11:08 am, AnandG <[EMAIL PROTECTED]> wrote:
> > I retrieve a lot of strings from a JSON file. These strings can contain
> HTML
> > tags.
> >
> > I would like to show the strings (for example a description of a
> product)
> > but with a limit on the number of characters.
> >
> > So I have to count the number of characters and I would like to set a
> limit
> > to 200 characters. But I want to exclude the
> > characters of the HTML tags. The easiest method seems to me to strip
> HTML
> > tags in the strings.
> >
> > I have searched in this forum and found some posts that deal with
> stripping
> > out HTML tags:
> >
> > http://www.nabble.com/Strip-a-href-links-from-a-div-tf4372556s15494.h...
> > Strip a href links from a div
> >
> > http://www.nabble.com/stripping-out-tags...-tf2583359s15494.html#a720...
> > Stripping out tags
> >
> > But they all require that you send a HTML tag as a parameter. But that's
> > difficult if i'm not sure which HTML tag is going to be used.
> >
> > --
> > View this message in context:
> http://www.nabble.com/Strip-out-HTML-tags-tf4421390s15494.html#a12611168
> > Sent from the JQuery mailing list archive at Nabble.com.
>
>


[jQuery] Re: What does === equate to?

2007-08-01 Thread Jake McGraw
The "triple equals" is a comparison without type conversion. The following
should fix your code so that fn.apply() never runs with fn is null:
if (fn&&fn.apply(...)) break;

The first part checks if fn is non-null, if it is null or false or 0 or Nan
the second part fn.apply will never run and you won't have that error.

- jake

On 8/1/07, Buzzterrier <[EMAIL PROTECTED]> wrote:
>
>
> I am getting a exception when jquery is processing a successful ajax
> call on line 339 of the most recent release:
>
> if ( fn.apply( obj[i], args || [i, obj[i]] ) === false ) break;
>
> The error is that fn is void, and the onreadystatchange function,
> catches the exception and changes the status from success to an
> error.
>
> I am trying to dissect why this is happening (the responseText is
> fine) and cannot figure how what the heck === is.
>
>


[jQuery] Re: problem with each() function

2007-07-12 Thread Jake McGraw

You have to wrap "this" with the jQuery $() object:

$(this).children.eq(0)...

- jake

On 7/12/07, Salvatore FUSTO <[EMAIL PROTECTED]> wrote:



Hi,
i've a table in which there are a number of cells, of class myCl: these
cells are not in all rows; in each of these cells i have one select and
one
input ;
i would retreive for each myCl-classed td the value of the first element,
then i think to write:

$("td.myCl").each(function(i){this.children().eq(0).val()});

but i've an error: this.children is not a function.

What is my mystake?
regards

salvatore




  1   2   >