[jQuery] NEW! jQuery CKEditor Plugin v0.10

2009-11-25 Thread Diego A.
NEW! jQuery CKEditor Plugin v0.10
http://www.fyneworks.com/jquery/CKEditor/

It's been a while but hey, I've finally done it. I've just released
the very first version of my new CKEditor plugin for jQuery.

I only started working on it today, but soon enough I hope to turn it
into a complete interface between jQuery and CKEditor's API methods.

The most important thing the plugin does is take care of ajax
submissions, reading the editor's output before the ajax call is made
AND clearing old editor objects from memory, in an environment when
editors are created and destroyed on the fly (my cms for example).

IMPORTANT:
Be notified of future updates via this Twitter account:
http://twitter.com/fyneworks


[jQuery] Re: Multifile Upload and Forms plugin

2009-05-07 Thread Diego A.

I don't understand the problem...
$(element.form).ajaxSubmit(); should do it.

On Apr 27, 10:05 pm, Haaf  wrote:
> Hi,
>
> I'm using 
> themultifileuploadplugin(http://jquery-multifile-plugin.googlecode.com/svn/trunk/index.html#)
>  and I would like to be
> able touploadan image on file select. I.e. when a user selects a
> file from his computer the file is automatically uploaded (for preview
> purposes).
>
> What I'm trying to do is:
>
> ...
> 
> 
>  ...
>
> 
> ...
> onFileSelect: function(element, value, master_element){
>   //send the form with jquery Formsplugin(http://malsup.com/jquery/
> form/#)},
>
> ...
> 
>
> But the Formspluginonly works when I send the form using a submit
> button.
>
> Is it possible what I'm trying to accomplish?
> If yes, could somebody help me please?


[jQuery] Re: NEW! jQuery Multiple File Upload Plugin v1.40

2009-04-07 Thread Diego A.

Hi Shaun,

Please double check your installation and make sure you are using the
latest version of the plugin.

Take a look here for a working example...
http://www.fyneworks.com/jquery/multiple-file-upload/test/

Cheers,
Diego A.

On Apr 7, 12:14 am, shaunramos  wrote:
> Diego A. wrote:
>
> >NEW! jQuery Multiple File Upload Plugin v1.40
> >http://www.fyneworks.com/jquery/multiple-file-upload/
>
> > New features:
> > 1. API method to reset control (remove all file selections) like this:
> > $('input:file').MultiFile('reset')
>
> > Improvements:
> > 1. Now entirely based in the $.fn.MultiFile namespace
> > 2. Now uses $.fn.data to store control settings
> > 3. The plugin will automatically disable the dummy additional input
> > element when the form is submitted conventionally or by using the form
> > plugin - this removes the extra empty file from the end of the array.
>
> > IMPORTANT:
> > Be notified of future updates via this Twitter account:
> >http://twitter.com/fyneworks
>
> --
> View this message in 
> context:http://www.nabble.com/NEW%21-jQuery-Multiple-File-Upload-Plugin-v1.40...
> Sent from the jQuery General Discussion mailing list archive at Nabble.com.


[jQuery] Re: NEW! jQuery Multiple File Upload Plugin v1.40

2009-04-02 Thread Diego A.
Hi Kuba,
You need to apply the method to a file element that has already been
initialized by the plugin, not the container...

Cheers,
Diego A.


2009/4/2 kuba 

>
> reseting wont work for me ;/
>
>
> On Apr 2, 12:32 pm, "Diego A."  wrote:
> > NEW! jQuery Multiple File Upload Plugin v1.40
> http://www.fyneworks.com/jquery/multiple-file-upload/
> >
> > New features:
> > 1. API method to reset control (remove all file selections) like this:
> > $('input:file').MultiFile('reset')
> >
> > Improvements:
> > 1. Now entirely based in the $.fn.MultiFile namespace
> > 2. Now uses $.fn.data to store control settings
> > 3. The plugin will automatically disable the dummy additional input
> > element when the form is submitted conventionally or by using the form
> > plugin - this removes the extra empty file from the end of the array.
> >
> > IMPORTANT:
> > Be notified of future updates via this Twitter account:
> http://twitter.com/fyneworks
>
> >
>


[jQuery] NEW! jQuery Multiple File Upload Plugin v1.40

2009-04-02 Thread Diego A.

NEW! jQuery Multiple File Upload Plugin v1.40
http://www.fyneworks.com/jquery/multiple-file-upload/

New features:
1. API method to reset control (remove all file selections) like this:
$('input:file').MultiFile('reset')

Improvements:
1. Now entirely based in the $.fn.MultiFile namespace
2. Now uses $.fn.data to store control settings
3. The plugin will automatically disable the dummy additional input
element when the form is submitted conventionally or by using the form
plugin - this removes the extra empty file from the end of the array.

IMPORTANT:
Be notified of future updates via this Twitter account:
http://twitter.com/fyneworks


[jQuery] Re: Star rating plugin problems

2009-04-01 Thread Diego A.
Hi Sergey,
I've just been to your site to take a look but it seems to be working fine
now.
Glad you worked it out.

Cheers,
Diego A.


2009/3/30 Sergey 

>
> Hello Diego,
>
> Have recently installed it on one my hobby site and I have a small
> problem on plugin and cant find what is wrong.
> it works perfectly in FF, IE but not in safari and chrome.
>
> Using split and it display all half parts of star.
> If you have a min to tell where should i look at will be greatly
> appreciated. ( site is: movie-collection.com )
>
> Regards
>
> >
>


[jQuery] Re: Star rating plugin problems

2009-03-18 Thread Diego A.

This issue has been resolved. Please download the latest version of
the plugin:
This is an old issue which has been resolved. Please download the
latest version of the plugin:
http://www.fyneworks.com/jquery/star-rating/

On Jan 29, 6:44 pm, "matthias.otto...@googlemail.com"
 wrote:
> Hi Philip,
>
> I have exactly the same problem. Browser independent. JQuery 1.3.1 and
> Star Rating 2.61 (as of January 23, 2009).
>
> Also does:
>
> 
> 
> 
> 
> 
>
> ... lead to: star-off, star-off, star-on, star-off, star-off - again
> happening in a container injected through AJAX.
>
> Thanks,
>
> Matt
>
> On Dec 7 2008, 9:23 pm, Philip Garrett 
> wrote:
>
> > Hi,
>
> > I'm using the latest available version of thestarratingplugin from
> > fyneworks (http://www.fyneworks.com/jquery/star-rating/) with jQuery
> > 1.2.6.
>
> > I'm having a few problems when using thestarratings with ajax.  My
> > ajax form actually replaces the div that contains the stars widget
> > with a fresh one that represents the changedrating.
>
> > After replacing the widget with $("#container").html(...), these
> > problems start:
> > 1. The cancel button disappears
> > 2. Mouseovers on the stars stop working until you click anotherstar
> > 3. Mouseovers get stuck (especially when mousing off rightwards)
> > 4. This error will eventually happen: 'elem.parentNode is
> > null' [jquery-1.2.6.js (line 1259)]
>
> > I've put together a quick example of the problems 
> > here:http://www.pgarrett.net/stars/
>
> > Any help you can offer is appreciated.
>
> > Thanks,
> > Philip


[jQuery] Re: Possible 1.3 bug

2009-01-17 Thread Diego A.
Hi Karl,
That seems to have worked perfectly. I was quite happy to wait for a new
version but thank you for attending to this so quickly!

Cheers,
Diego A.


2009/1/15 Karl Swedberg 

> Thanks, Balazs!
> Hi Diego,
> I took a quick look at the moreSelectors script and noticed that it uses
> the [...@attr] syntax in a few places. It also defines the pseudo-selectors as
> strings.
>
> I took the liberty of updating the script. I removed the :csv() selector
> and the extended filter() method, though, because they were causing problems
> that I couldn't fix quickly.
>
> Try this one out and see if it works for you:
>
> http://test.learningjquery.com/scripts/jquery.moreselectors.js
>
> --Karl
>
> 
> Karl Swedberg
> www.englishrules.com
> www.learningjquery.com
>
>
>
>
> On Jan 15, 2009, at 11:01 AM, Balazs Endresz wrote:
>
>
> In jquery.liveFilter.js a pseudo selector defined as a string, which
> was deprected since 1.2 if I remember right.
>
> jQuery.extend(
> jQuery.expr[':'], {
>  insContains : "jQuery(a).text().toUpperCase().indexOf(m
> [3].toUpperCase())>=0"
> });
>
> This should be a function instead:
>
> jQuery.expr[':'].insContains = function(a,i,m){
> return jQuery(a).text().toUpperCase().indexOf(m[3].toUpperCase())>=0
> }
>
> On Jan 15, 4:09 pm, tpb976  wrote:
>
> It seems the problem has to do with creating custom selectors.  I have
>
> a custom selector that I created and I am receiving this exact error.
>
> I am currently looking into the problem to see what I can figure out.
>
>
> On Jan 15, 9:05 am, Diego  wrote:
>
>
> Hi (me again), the problem was being caused by the moreSelectors
>
> plugin on this page:
> http://www.softwareunity.com/jquery/JQueryMoreSelectors/
>
>
> On Jan 15, 2:40 pm, Diego  wrote:
>
>
> FYI. I found my offending code. It's a combination of these selectors:
>
> :text, :password, :file, :select, :button
>
>
> I just can't figure out why!
>
>
> On Jan 15, 7:39 am, "emmj...@gmail.com"  wrote:
>
>
> I was checking all of my random plugins/scripts to make sure they all
>
> work with jQuery 1.3 and I found one that is having problems.
>
>
> An example of it is available at:http://digitalinferno.net/temp/
>
>
> If you enter some text into the input firebug will report that
>
> "filter is not a function"
>
> in  http://digitalinferno.net/temp/js/jquery.jsonline1961
>
>
> Anyone know if this is a bug or if I have to change something in my
>
> code for the new 1.3 release?
>
>
>
> >
>


[jQuery] Re: New Google Browser announced

2008-09-03 Thread Diego A.
I love it! No non-sense web browsing.
I'll still keep firefox for development of course, but I'll definitelly
recommend it for general use.

2008/9/2 Giovanni Battista Lenoci <[EMAIL PROTECTED]>

>
> Is out! :-)
>
> --
> gianiaz.net - web solutions
> p.le bertacchi 66, 23100 sondrio (so) - italy
> +39 347 7196482
>



-- 
Cheers,
Diego A.


[jQuery] Re: XML Parsing: Getting a node value

2008-08-23 Thread Diego A.
Here is a simple solution I've been using for a while and recently released
as a plugin:
http://www.fyneworks.com/jquery/xml-to-json/

But there's also a SOAP client plugin which seems to be a more robust
solution...*
*
2008/8/23 Arun Kumar <[EMAIL PROTECTED]>

>
> No solutions?
>
> On Aug 17, 2:12 pm, Arun Kumar <[EMAIL PROTECTED]>
> wrote:
> > Have a look at the sample code given below:
> >
> > http://www.w3.org/
> > TR/html4/strict.dtd">
> > 
> > 
> > 
> > XML Parsing
> > 
> > 
> >  > src="jQuery.js">
> > 
> > var strXML = "<?xml version='1.0'?>" +
> >
>  "<bodyTag><search:totalResults>3</search:totalResults></
> > bodyTag>";
> >
> > if (document.implementation &&
> > document.implementation.createDocument)
> > {
> > objDocument =
> document.implementation.createDocument("", "",
> > null);
> > }
> > else if (typeof ActiveXObject != 'undefined')
> > {
> > try
> > {
> > objDocument = new
> ActiveXObject('Microsoft.XMLDOM');
> > }
> > catch (e)
> > {
> > }
> > }
> >
> > objDocument.load(strXML);
> > alert(objDocument);
> > alert($("bodyTag", objDocument).find("search\
> > \:totalResults").text());
> >
> > 
> > 
> > 
> >
> > The above sample is tested in IE7, using jQuery 1.2.6
>



-- 
Cheers,
Diego A.


[jQuery] Re: Help with XML parsing/looping

2008-07-17 Thread Diego A.
Hi,

I made this plugin last week and it just seems that out of nowehere everyone
seems to be looking for it:

XML 2 JSON:
http://www.fyneworks.com/jquery/xml-to-json/

Hope it helps...

Cheers,
Diego A.

2008/7/16 linesandwaves <[EMAIL PROTECTED]>:

>
> Hi all,
>
> I realize this is a gigantic newbie question, but I am totally stuck
> and I want to do this the right way... figured I'd go to the experts.
>
> I'm trying to write a section of code in jquery that will read my XML
> sheet and then produce a set of unordered lists with individual list
> items in HTML.  I have it working, but the problem is that my code is
> finding every single instance of certain tags and then adding them to
> my lists.  So ultimately, every list that this code generates is
> perfectly formatted, but they all have the same information.. which is
> a problem.
>
> Here is my XML sheet:
>
> 
> 
>
>The Royal Breakfast
>
>Eggs and whatever
>$15.00
>
>
>A waffle with sprinkles on
> it
>$15.00
>
>
>Syrup-covered bacon bits
>$15.00
>
>
>
>The Gravy Train
>
>Gravy Boats
>$15.00
>
>
>Mush Plate
>$15.00
>
>
>Deep Fried
> Anything
>$15.00
>
>
> 
>
>
> And here is my jquery code:
>
> // Start function when DOM has completely loaded
> $(document).ready(function(){
>
>// Open the breakfast.xml file
>$.get("breakfast.xml",{},function(xml){
>
>// Build an HTML string
>myHTMLOutput = '';
>
>// Run the function for each dishset tag in the XML file
>$('dishset',xml).each(function(j){
>myHTMLOutput += '';
>setName = $(this).find("setname").text();
>if ((setName) != undefined){
>myHTMLOutput += ''+ setName +'';
>}
>
>// Run the function for each entreelisting tag in the XML
> file
>$('entreelisting',xml).each(function(i) {
>entreeName = $(this).find("entreename").text();
>price = $(this).find("price").text();
>dishAdditions =
> $(this).find("entreename").attr("type");
>// Build row HTML data and store in string
>mydata =
> BuildMenuHTML(entreeName,price,dishAdditions);
>myHTMLOutput = myHTMLOutput + mydata;
>});  //run entreelist
>myHTMLOutput += '';
>}); //run dishset function
>$("#menucontent").append(myHTMLOutput);
>}); //get xml file
> });  //document.ready function
>
>
>
>  function BuildMenuHTML(entreeName,price,dishAdditions){
>
>// Check to see if their is a "post" attribute in the name field
>if ((dishAdditions) != undefined){
>dishAdditionsHTML = ''+
> dishAdditions +' em>';
>entreeNameHTML = '';
>liClassHTML = '';
>}
>else
>{
>entreeNameHTML = ''+ entreeName
> +'';
>dishAdditionsHTML = '';
>    liClassHTML = '';
>}
>
>// Build HTML string and return
>output = '';
>output += liClassHTML;
>output += entreeNameHTML;
>output += dishAdditionsHTML;
>output += ''+ price +'';
>output += '';
>return output;
> }
>
>
> I know that this is probably an obvious or easy fix related to calling
> "each()" in the "entreelisting" function, but I just don't know what
> the proper ways to reference certain things are.  Any chance anyone
> out there could help??
>
> Thanks!
>
>


-- 
Cheers,
Diego A.


[jQuery] Re: yet again XML+jQuery+IE7

2008-07-17 Thread Diego A.
I'm not sure it's a bug... :-S
Personally, I think it's best practice to use something along the lines of
the text2html function I posted (below)

// Convert text to XML DOM
var text2xml = function(s) {
 var x, ie = /msie/i.test(navigator.userAgent);
 try{
  var p = ie? new ActiveXObject("Microsoft.XMLDOM") : new DOMParser();
  p.async = false;
 }catch(e){ throw new Error("XML Parser could not be instantiated") };
 try{
  if(ie) x = p.loadXML(s)? p : false;
  else x = p.parseFromString(s, "text/xml");
 }catch(e){ throw new Error("Error parsing XML string") };
 return x;
};


2008/7/16 Tzury <[EMAIL PROTECTED]>:

>
> > Yeah it's a kind of bug in jQuery ...
> >
> > I dealt with this issue one month ago and the solution was to convert
> > it into JSON
>
> the way I am planning to approach is by building in-memory DOM element
> and injecting the XML into it.
>
> example:
> var el = document.createElement('div');
> el.innerHTML = xml;
> alert(el.firstChild.innerHTML);
>
> utilizing jQuery facilities for DOM traversing is the next obvious
> step.
>
> hope someone will notice this and file a bug for the dears jQuery
> developers.
>



-- 
Cheers,
Diego A.


[jQuery] Re: Why does IE not cache images?

2008-07-16 Thread Diego A.
Hi Christian,

It seems this problem can only be fixed by changing your server's behaviour.

IIS: http://www.milonic.com/mfa/2005-February/ie6-not-caching-images.html

> In IIS under properties for the folder /images/menu HTTP HEADERS was set to
> "Enable Content Expiration". Turning this off now allows the images to be
> cached correctly.
>

Apache: http://ahinea.com/en/tech/ie-dhtml-image-caching.html

Other useful link:
http://blog.httpwatch.com/2008/02/27/image-caching-in-internet-explorer/

* Stupid IE6 *

2008/7/16 Chris <[EMAIL PROTECTED]>:

>
> Hi list,
> I recently started using jQuery after working with plain JavaScript
> for several years. The features of jQuery are amazing!
> Now I have found a problem regarding IE's handling of dynamically
> created images. It is not really jQuery related, but maybe you can
> help me anyway.
> I have the following code snippet:
>
> $(document).ready(function() {
>for (var i = 0; i < 100; i++)
>$('body').append(' title="Edit">');
> });
>
> As you can see, this code creates 100 *identical* images; however, IE
> loads each image separately. (I can see it in the log file of my web
> server and it also takes a considerable time until the page is fully
> loaded.) Is there any way to change this behavior?
> If I put all the images directly in my document (not generating them
> dynamically) the image is only loaded once, but this is not an option
> for me.
>
> Thanks a lot,
> Christian
>
> P.S.: I use IE 6.0.
>



-- 
Cheers,
Diego A.


[jQuery] Re: yet again XML+jQuery+IE7

2008-07-16 Thread Diego A.
This might sound strange but try using all caps:
alert($("TABLE1", xml).text());

...and if that works, then try this function to initialize your XML instead
of jQuery:
// Convert text to XML DOM
var text2xml = function(s) {
 var x, ie = /msie/i.test(navigator.userAgent);
 try{
  var p = ie? new ActiveXObject("Microsoft.XMLDOM") : new DOMParser();
  p.async = false;
 }catch(e){ throw new Error("XML Parser could not be instantiated") };
 try{
  if(ie) x = p.loadXML(s)? p : false;
  else x = p.parseFromString(s, "text/xml");
 }catch(e){ throw new Error("Error parsing XML string") };
 return x;
};


2008/7/16 Tzury <[EMAIL PROTECTED]>:

>
> > xml = $(' {xml goes here} ');
> >
>
> added "xml = $(xml);" (see below)
> still not working on IE7
>
> 
> 
> var xml = "<NewDataSet>"
>  + "<Table1>"
>  +  "<a>Hello</a>"
>  +  "<b>jQuery</b>"
>  + "</Table1>"
> + "</NewDataSet>";
>
> xml = $(xml);
>
> alert($("Table1", xml).text());
>
> 
>



-- 
Cheers,
Diego A.


[jQuery] Re: NEW: XML to JSON Plugin

2008-07-15 Thread Diego A.
Hi Chris,

AJAX:
> Yeah actually I think it's normally sufficient to let the user use jquery
> ajax as usual but just provide easy functions to unmarshal/marshal into the
> format they need where ever they need it.  It reduces the size of the plugin
> and I've sort of found most ajax-convenience functions in plugins aren't
> exactly what I need so I end up not using them anyway.  Not always true
> though and if you think there some benefit I really don't feel very strongly
> either way (just playing devils advocate.)


We need not re-invent the wheel. I think it would be fair to assume users of
this plugin will have a certain amount of experience and would be quite
capable (and would probably prefer) to write their own ajax calls, like
this...
$.get(url2xml, function(response){
 var json = $.xml2json(response);
 // do stuff
});

Having said that, it would be very easy to assume that an ajax call is
required when a function is sent in one of the parameters, for example:
$.xml2json(url2xml, function(json){
 // do stuff
});
... which doesn't really save (or cost) much time (or code) but it provides
a simple little hook for Ajax calls. :-D

FORMAT:
> Where it really became an issue in a production environment was that I
> always had to test every 'element' to see if i needed to treat it as an
> array or object.  And every time I started to rely on it being an {} or [],
> there was some corner case that came up gave me the other and the code
> broke.  This is especially true in templates.
>

OK, my current implementation allows you to choose between 2 formats:
simple - arrays when necessary
extended - always use arrays
...isn't that enough to solve the problem of not knowing what to expect? In
your case for example, just use extended mode and you're good to go. I just
can't see a scenario where the user of this plubing would insist of choosing
specific formatting options for different 'branches'... Am I being
un-reasonble?

Serialization/De-serialization:

I see what you're saying and it seems great. I'd have to figure out how to
make this work, but I have had an idea which might just do the job. In the
documentation, I wrote a script that goes through the json object and
represents it in HTML. That same script could be used to create a 'map' of
the json structure. This map could be an array OR maybe even better, a
simple string with the path ("reference") to every node in the structure.
Something like this:

Consider this XML:

 
  RED
  WHITE
  24 INCH
 
 
  BROWN
  50 INCH
 


Which would result in the following map...
JSON MAP: [
 "kitchen", "kitchen.dishwasher", "kitchen.fridge", "kitchen.telly",
  "lounge", "lounge.sofa", "lounge.telly"
]

That way we could come up with some xpath-like markup to search through
nodes just like you suggested...
json.find('dishwasher') // gives us array with nodes kitchen.dishwasher
json.find('dvd') // gives us an empty array
json.find('telly') // gives us array with nodes kitchen.telly and
lounge.telly.

$.each(json.find('telly'), function(i, node){
 // 1st - kitchen.telly node
 // 2nd - lounge.telly node
});

How does that sound???

Cheers,
Diego A.

2008/7/15 chris thatcher <[EMAIL PROTECTED]>:

>
>
> On Tue, Jul 15, 2008 at 10:18 AM, Diego <[EMAIL PROTECTED]> wrote:
>
>>
>> Hi Chris,
>>
>> I'd be glad to work on this with you. Unfortunately, I'm completely
>> tied up with a couple of other projects for the next few days. I won't
>> have a chance to work on the next version, but I'll let I know as soon
>> as I make some changes.
>>
> Same boat here so we can organize a little then push forward.
>
>
>>
>>
>> AJAX:
>> Although I released this as a jQuery plugin, it doesn't actually make
>> any use of jQuery functionality, other than the $.each function. But
>> as you suggested, it does make sense to integrate it with jQuery a bit
>> further and to include ajax.
>>
> Yeah actually I think it's normally sufficient to let the user use jquery
> ajax as usual but just provide easy functions to unmarshal/marshal into the
> format they need where ever they need it.  It reduces the size of the plugin
> and I've sort of found most ajax-convenience functions in plugins aren't
> exactly what I need so I end up not using them anyway.  Not always true
> though and if you think there some benefit I really don't feel very strongly
> either way (just playing devils advocate.)
>
>
>> FORMAT:
>> As far as formatting is concerned, I understand that you'd like the
>> output to follow a certain format, but is this really something that
&

[jQuery] Re: yet again XML+jQuery+IE7

2008-07-15 Thread Diego A.
Hi Tzury,

If that's the exact code you're using, then you should first convert the XML
string into a jQuery object, like this...

xml = $(' {xml goes here} ');

Hope that helps.

Diego A.

2008/7/15 Tzury <[EMAIL PROTECTED]>:

>
>
>
> On Jul 15, 5:53 pm, "John Resig" <[EMAIL PROTECTED]> wrote:
> > Hey - can you provide an example site? It's unclear what might be
> > wrong without seeing a response from the server. What is the value of
> > xml when it comes back?
> >
> > --John
> >
>
> below is a snippet which can be tested in FF and IE
>
> 
>
> 
>
> var xml = "<NewDataSet>"
>  + "<Table1>"
>  +  "<a>Hello</a>"
>  +  "<b>jQuery</b>"
>  + "</Table1>"
> + "</NewDataSet>";
>
> alert($("Table1", xml).text());
>
> 
>



-- 
Cheers,
Diego A.


[jQuery] Re: yet again XML+jQuery+IE7

2008-07-15 Thread Diego A.
Hi Tzury,

I've just released a plugin to work around XML parsing issues by converting
it to JSON. Tested in IE6/7, FF2/3. You might find it useful.

XML 2 JSON Plugin
http://www.fyneworks.com/jquery/xml-to-json/

Cheers,
Diego A.

2008/7/15 Tzury <[EMAIL PROTECTED]>:

>
> the following example  (taken from:
> http://docs.jquery.com/Tutorials:Getting_Started_with_jQuery)
> works fine in FF but not in IE7
>
> dose anyone find a way to make jQuery XML parsing facilities work on
> IE as well?
>
>
>  $(document).ready(function() {
>   // generate markup
>   $("#rating").append("Please rate: ");
>
>   for ( var i = 1; i <= 5; i++ )
> $("#rating").append("" + i + " ");
>
>   // add markup to container and apply click handlers to anchors
>   $("#rating a").click(function(e){
> // stop normal link click
> e.preventDefault();
>
> // send request
> $.post("rate.php", {rating: $(this).html()}, function(xml) {
>   // format and output result
>   $("#rating").html(
> "Thanks for rating, current average: " +
> $("average", xml).text() +
> ", number of votes: " +
> $("count", xml).text()
>   );
> });
>   });
>  });
>



-- 
Cheers,
Diego A.


[jQuery] Re: PLUGIN: Select Multiple Control

2008-07-15 Thread Diego A.
Hi Ryan,

Thank you for this. Great work!

Cheers,
Diego A.

2008/7/13 Rey Bango <[EMAIL PROTECTED]>:

>
> Ryan Cramer released this new plugin:
>
> http://www.ryancramer.com/journal/entries/select_multiple/
>
> Code:
>
> http://code.google.com/p/jquery-asmselect/
>
> Demo:
> http://www.ryancramer.com/projects/asmselect/examples/example1.html
>
> Rey...
>
>
>


-- 
Cheers,
Diego A.


[jQuery] Re: Replacing html in ajax success callback?

2008-07-15 Thread Diego A.
Hi,

Assuming the link is directly within the td (ie.: the td tag is the a tag's
parent), you can do this: $(this).parent().htm(results);

Cheers,
Diego A.

NB.: That is, obviously, instead of "$(this).replaceWith(results);"

2008/7/14 s.ross <[EMAIL PROTECTED]>:

>
> Hello--
>
> I have what seems a simple problem, but it's somehow not working out.
> Here's the problem:
>
>   $(".pastebinLink a").livequery(function(){
> $(this).bind('click', function(el){
>   $.ajax({
> url:  this.href,
> type: 'post',
> success: function(results, status) {
>   $(this).replaceWith(results);
> }
> });
>   return false;
> });
>   });
>
> The (X)HTML looks like this:
>
> 
>  
> alt="Spacer"/>
>  
> 
>
> And the stuff returned from the Ajax post looks like:
>
>  class="viewButton" src="/images/spacer.gif?1210022683" />
>
> What I expect is that on success everything inside the  should be
> replaced with the new stuff from the server. What am I missing?
>
> Thanks (he says missing something obvious :)
>



-- 
Cheers,
Diego A.


[jQuery] Re: Star rating plugin + rails

2008-07-12 Thread Diego A.
Hi JB,

Thank you for spotting this problem and posting back with the solution.
I've added this fix to the plugin and will publish it on Monday (when I have
FTP access).

Cheers,
Diego A.

2008/7/9 JB <[EMAIL PROTECTED]>:

>
> I figured this out, just in case anyone else has the same problem.
> The issue revolves around brackets [ ] not being allowed in css class
> names.
>
> The plugin takes the name of the field and uses it to generate a class
> name of the form "star_group_yourfieldnamehere" so with a rails form
> field, you'd end up with a class name like:
>
> star_group_mymodel[myfield]
>
> which is an illegal css class name.  I fixed this by changing the
> following code:
>
> var n = this.name;
>
> to this:
>
> var n = this.name.replace(/^(.*?)\[(.*?)\]$/, "$1_$2");
> var real_n = this.name;
>
> this removes the brackets and makes rails form names appear like
> mymodel_myfield instead of mymodel[myfield].  I defined real_n so that
> it can still be used for the hidden field.  Works like a charm now!
>
> On Jul 9, 9:58 am, JB <[EMAIL PROTECTED]> wrote:
> > Hi -
> >
> > I'm trying to use the excellent star rating plugin from fyneworks
> > (http://www.fyneworks.com/jquery/star-rating) with a rails project I'm
> > working on.  I'm running into a bit of an issue that I wonder if
> > anyone else has seen.
> >
> > Typical names of form fields in a rails app look something like this:
> >
> > mymodel[myfield]
> >
> > which I suspect is causing an issue with this plugin.  If I leave the
> > form as generated by rails, with names like above, then the mouseout
> > and click events don't behave properly.  mouseout doesn't remove the
> > stars the way it should, and clicking on a star only highlights the
> > star you clicked on, instead of all the stars before it also.
> >
> > If I manually hack the form names to be regular names, like "myfield"
> > instead of "mymodel[myfield]" then it works perfectly, but of course
> > then rails won't process my form correctly because the names aren't
> > right.
> >
> > Has anyone else run into this kind of problem?  Any solutions anyone
> > can think of?  I tried going through the plugin code, but I'm afraid
> > my jQuery-fu isn't where it needs to be to spot the problem.
> >
> > Any help is greatly appreciated.thanks!
>



-- 
Cheers,
Diego A.


[jQuery] Re: Parsing XML using jQuery

2008-07-12 Thread Diego A.
Hi there,

This plugin might be useful:

XML to JSON plugin v1.0
http://www.fyneworks.com/jquery/xml-to-json/

Cheers,
Diego A.

2008/7/9 Wallonman <[EMAIL PROTECTED]>:

>
> It seems that the DOM parsed 'on the fly' isn't ready for querying.
>
> When doing something weird like:
>
> var xml = $('Hello World!Bye World!');
> $(xml).appendTo("body");
>
> then the
>
> alert($("p").text());  // without context
>
> works !
>
>
>
>
>


-- 
Cheers,
Diego A.


[jQuery] Re: Similar Plugins

2008-07-12 Thread Diego A.
Hi all,

I also think it's a great idea, but how would it actually work? Will someone
over-see the plugin directory and set the relationship between plugins, or
will the authors do it themselves?

Cheers,
Diego A.

2008/7/8 Jörn Zaefferer <[EMAIL PROTECTED]>:

>
> Thanks for sharing the idea.
>
> I've mentioned it to Mike, who maintains the plugin repository, he
> agreed that its a good idea. Expect to see something soon!
>
> Jörn
>
> On Mon, Jul 7, 2008 at 8:51 AM, Mahbub <[EMAIL PROTECTED]> wrote:
> >
> > I think JQUERY site should have a reporting system where users can
> > post similar plugins. Like for accordion there are more than one
> > plugin but users dont know that there might be a better one than the
> > one s/he is visiting. So in the plugin page there should be a block or
> > section where it should say similar plugins. That would be really
> > great if implemented.
> >
> > Thanks.
> >
>



-- 
Cheers,
Diego A.


[jQuery] Re: XML Parsing: Getting a node value

2008-07-12 Thread Diego A.
I just release a new plugin last week that might help you do this...

XML to JSON plugin v1.0
http://www.fyneworks.com/jquery/xml-to-json/

Assume the XML in your example was store as a string in variable 'str', you
could do this:

var json = $.xml2json(str);
var tagB = json.B;
var tagTest = json['os:TestTag'];

2008/7/12 Arun Kumar <[EMAIL PROTECTED]>:

>
> I have the following XML File:
>
> 
>10
>JSHDHSKJAD
> 
>
> I want to get the tag os:TestTag value. I am using the following query
> (This XML is in xmlDoc variable).
>
> $("A", xmlDoc).find("os:TestTag").text();
>
> The above query is not working, So I tried the below one:
> $("A", xmlDoc).find("TestTag").text();
>
> But no use.
> How can I get that node value?
>



-- 
Cheers,
Diego A.


[jQuery] Re: selecting div's with dynamic id's

2008-07-04 Thread Diego A.
Hi Karl,

Of course, you're right. Javascript should be kept separate from the HTML.

Cheers,
Diego A.

2008/7/4 Karl Swedberg <[EMAIL PROTECTED]>:

>
> Hi Kris,
>
> I'd give the "show description" links a common class -- for example,
> "show-description"  That way you can use a basic selector to apply to all of
> those links.
>
> Then, I'd use the "this" keyword to find the appropriate description
> relative to the clicked link.
>
> Adding "return false" will prevent the link's default event from being
> triggered.
>
> So, given your markup, it might look like this:
>
> $('a.show-description').click(functino() {
>$(this).parent().next().show();
>return false;
> });
>
>
> --Karl
> 
> Karl Swedberg
> www.englishrules.com
> www.learningjquery.com
>
>
>
>
>
> On Jul 4, 2008, at 10:36 AM, Kris wrote:
>
>
>> Whats the best way to provide functionality (eg. toggle an 'additional
>> information' div) when dealing with records with unique id's.
>>
>> For example lets say we are dealing with product records each one has
>> a unique id which is a number, so the HTML might look something like
>> this:
>>
>> 
>>  
>>   Name: Red Widget
>>   Price: 22.00
>>   Show description
>>   sadasdasdasdasd
>>  
>>
>>  
>>   Name: Blue Widget
>>   Price: 24.00
>>   Show description
>>   sadasdasdasdasd
>>  
>>
>> etc. etc.
>> 
>>
>> I want to place unobtrusive jquery that will allow the 'show
>> description' link to display the correct description div...
>>
>> Many thanks, K.
>>
>>
>>
>


-- 
Cheers,
Diego A.


[jQuery] Re: selecting div's with dynamic id's

2008-07-04 Thread Diego A.
Hi Kris,

The best way is to not use an ID, or to use a class.

Based on the HTML you posted, you could just use this:
$(this).parent().next().show().end().remove();
... which will show the description and remove the "show description" link

EXAMPLE:

 
   Name: Red Widget
   Price: 22.00
   Show
description
   sadasdas
dasdasd
 

Cheers,
Diego A.


2008/7/4 Kris <[EMAIL PROTECTED]>:

>
> Whats the best way to provide functionality (eg. toggle an 'additional
> information' div) when dealing with records with unique id's.
>
> For example lets say we are dealing with product records each one has
> a unique id which is a number, so the HTML might look something like
> this:
>
> 
>  
>Name: Red Widget
>Price: 22.00
>Show description
>sadasdasdasdasd
>  
>
>  
>Name: Blue Widget
>Price: 24.00
>Show description
>sadasdasdasdasd
>  
>
> etc. etc.
> 
>
> I want to place unobtrusive jquery that will allow the 'show
> description' link to display the correct description div...
>
> Many thanks, K.
>
>
>


-- 
Cheers,
Diego A.


[jQuery] Re: Why (function($){ ...})(jQuery) instead of (function(){var $ = jQuery; ...})()?

2008-07-04 Thread Diego A.
> That will fail if jQuery isn't included, you can do either:
>  if( window.jQuery )
> or
> if( typeof jQuery != 'undefined'  )

Oops! :-O
Fixed the problem. Thanks for pointing it out...

2008/7/4 Ariel Flesler <[EMAIL PROTECTED]>:

>
> > I've actually ellaborated on the idea and come up with my own version:
> > ;if(jQuery) (function($){
> >  ...
> >
> > })(jQuery);
> >
> > ...which:
> > - encloses local vars
> > - silently ignores the code if jQuery is unavailable
> > - avoid colisions when files are merged (; at the start)
>
> That will fail if jQuery isn't included, you can do either:
>   if( window.jQuery )
> or
>  if( typeof jQuery != 'undefined'  )
>
>
> Note that the
>  (function($){ ... })(jQuery);
> approach is 6 bytes shorter than
>  (function(){ var $ = jQuery; })();
>
> It also looks cooler ;)
>
> --
> Ariel Flesler
> http://flesler.blogspot.com
>



-- 
Cheers,
Diego A.


[jQuery] Re: Why (function($){ ...})(jQuery) instead of (function(){var $ = jQuery; ...})()?

2008-07-04 Thread Diego A.
Hi Mike,

You are right, I meant to say "enclosures of either kind"... ;-)

We are on the same page with this. You don't *have* to do with unless
noConflict() is on, but it's "safer" to do it anyway, specially when you
share your code (ie.: plugin developers). But like yourself, I do it all the
time to avoid accidentally messing around with global vars. It's "good
practice"...

Anyway, I'm glad to meet the guy who started it all :-)
I've actually ellaborated on the idea and come up with my own version:
;if(jQuery) (function($){
 ...
})(jQuery);

...which:
- encloses local vars
- silently ignores the code if jQuery is unavailable
- avoid colisions when files are merged (; at the start)

Cheers,
Diego A.

2008/7/4 Michael Geary <[EMAIL PROTECTED]>:

>  Sorry, Diego, but you may have made things *more* confusing! :-)
>
> If you change "enclosures of *that* kind" to "enclosures of *either* kind"
> it will probably be more clear.
>
> As you said, there isn't any real reason for plugin developers to prefer
> one of these two forms over the other. It's just a matter of historical
> accident. I posted a message in this group a couple of years ago that
> mentioned the (function($){...})(jQuery); approach, and everybody liked it
> and started using it in their plugins. It could have just as easily been the
> (function(){var $=jQuery;...})(); version.
>
> Regarding the comment that there may not be any need to do this other than
> the noConflict thing - actually I do it all the time just to get a local
> scope for some variables. I don't want to put variables into the global
> namespace when I can avoid it.
>
> -Mike
>
>  --
> *From:* jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] *On
> Behalf Of *Diego A.
> *Sent:* Thursday, July 03, 2008 6:44 PM
> *To:* jquery-en@googlegroups.com
> *Subject:* [jQuery] Re: Why (function($){ ...})(jQuery) instead of
> (function(){var $ = jQuery; ...})()?
>
> Hi there,
>
> No, there's no difference. They both have the exact same effect.
>
> But there's a reason why plugin developers use enclosures of that kind.
> They do it to make sure they can use $ instead of jQuery even when the user
> is using jQuery.noConflict().
>
> Perhaps you want to isolate your own variables within an anonymous
> function, but unless you're using jQuery.noConflict(), you don't actually
> need to do this at all.
>
> I hope that clears up any confusion...
>
> Diego
>
> 2008/7/3 jfine <[EMAIL PROTECTED]>:
>
>>
>>
>> On 3 Jul, 21:35, "Michael Geary" <[EMAIL PROTECTED]> wrote:
>> > Yes, either one will do exactly the same thing. It's purely a matter of
>> > taste.
>>
>> Thank you both for this.  I think Michael right, but perhaps Diego
>> would like to response - he thinks there is a difference.
>>
>> Thank you also Michael for the semicolon warning.  I'm now using js2-
>> mode.el with Emacs.  It warns me about such errors.
>>
>> --
>> Jonathan
>>
>
>
>
> --
> Cheers,
> Diego A.
>
>


-- 
Cheers,
Diego A.


[jQuery] Re: Validation and Tabs plugins compatibility

2008-07-03 Thread Diego A.
Hi,

This is just an idea (which I haven't checked) but since you have JS
experience I'm just gonna throw it at you.

The validation plugin adds an 'error' class to all problem fields. You could
very quickly loop through each tab, look for an error and (if found), change
the focus to that tab. something like...

$('#my-tabs > div').each(function(i){
 if($('.error', this).length>0)
  $(this).tabs('activate', i);
});

I'm not sure that 'activate' is the right action for the tabs plugin, you'll
have to check the documentation...

Cheers,
Diego A.

2008/7/3 peace4theapes <[EMAIL PROTECTED]>:

>
> Hello all,
>
> I am just switching to JQuery from prototype and am trying to use the
> Validation and Tabs plugins for JQuery. Here's my problem:
>
> I have one form tag in which I have my tabs container. Using a dynamic
> language I am creating multiple tabs for user chosen data, say states.
> So if the user has chosen 5 states, there are five tabs with the same
> form fields with the "_statename" appended to the end of the field
> name.
>
> So, if the user enters data, validates the form and click on continue
> nothing happens as the user has not touched the other tabs. But, the
> user doesn't know about this and it is a confusion. Is there a way to
> select the right tab depending on which tab the validator throws an
> error in?
>
> Any help would be greatly appreciated.
>
> I am using the following code:
>
>
>
> 
> $(function() {
>
> $('##tabs_container > ul').tabs({ fx: { opacity:
> 'toggle' } });
> });
> 
>
> 
>
> $().ready(function() {
>
> $("##general").validate({
> rules: {
><cfloop list="#stateslist#" index="sta">
><cfset sta = ReplaceNoCase(sta,' ','','All')>
>products_#sta#: "required"
>osda_#sta#: "required",
></cfloop>
>
> },
> messages: {
><cfloop list="#stateslist#" index="sta">
><cfset sta = ReplaceNoCase(sta,' ','','All')>
>products_#sta#: "Choose product";
>osda_#sta#: " Please choose YES OR NO."
></cfloop>
>
> }
> });
>
>
> });
>
> 
>
>
> Thanks
> -P
>



-- 
Cheers,
Diego A.


[jQuery] Re: jQuery not setting X-Requested-With XMLHttpRequest

2008-07-03 Thread Diego A.
Use this:

$.ajaxSetup({
  headers: {"X-Requested-With":"Ajax"}
});

Diego

2008/7/3 duck! <[EMAIL PROTECTED]>:

>
>
> Does setting the "contentType" work?
> http://docs.jquery.com/Ajax/jQuery.ajax#options
>
>
> Chris Bailey-4 wrote:
> >
> >
> > I'm using jQuery 1.2.6, and I can't seem to get jQuery to set the X-
> > Requested-With when it makes AJAX calls.  I saw somewhere that this
> > may have to do with cross-site issues if the host is specified in the
> > URL.  I've tried skirting around that by just passing a relative URL,
> > but with no success.  I'm wondering what I might be doing wrong, or if
> > someone can point me in the right direction.  Here's what my jQuery
> > code looks like:
> >
> >   $.ajax({
> >   type: "POST",
> >   url: '/votes/43',
> >   dataType: "html",
> >   data: "method=delete",
> >   success: function(data) {
> >
> $(this).parents('div.vote_box').after(data).remove();
> >   }
> >   });
> >
> > I've tried it also by adding a beforeSend, of:
> >
> >   beforeSend: function(xhr) {
> >   xhr.setRequestHeader("X-Requested-With",
> "XMLHttpRequest");
> >   },
> >
> > I've inspected the request headers with Firebug and with a separate
> > HTTP tracing tool, and the X-Requested-With header is never present.
> > The host, when I'm debugging like this is "http://localhost:3000";, or
> > I've also tried with "http://localhost"; (i.e. just running on 80).
> > I've tried this in both Firefox 3 and Safari.
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/jQuery-not-setting-X-Requested-With-XMLHttpRequest-tp18264663s27240p18268977.html
> Sent from the jQuery General Discussion mailing list archive at Nabble.com.
>
>


-- 
Cheers,
Diego A.


[jQuery] Re: Why (function($){ ...})(jQuery) instead of (function(){var $ = jQuery; ...})()?

2008-07-03 Thread Diego A.
Hi there,

No, there's no difference. They both have the exact same effect.

But there's a reason why plugin developers use enclosures of that kind. They
do it to make sure they can use $ instead of jQuery even when the user is
using jQuery.noConflict().

Perhaps you want to isolate your own variables within an anonymous function,
but unless you're using jQuery.noConflict(), you don't actually need to do
this at all.

I hope that clears up any confusion...

Diego

2008/7/3 jfine <[EMAIL PROTECTED]>:

>
>
> On 3 Jul, 21:35, "Michael Geary" <[EMAIL PROTECTED]> wrote:
> > Yes, either one will do exactly the same thing. It's purely a matter of
> > taste.
>
> Thank you both for this.  I think Michael right, but perhaps Diego
> would like to response - he thinks there is a difference.
>
> Thank you also Michael for the semicolon warning.  I'm now using js2-
> mode.el with Emacs.  It warns me about such errors.
>
> --
> Jonathan
>



-- 
Cheers,
Diego A.


[jQuery] Re: Why (function($){ ...})(jQuery) instead of (function(){var $ = jQuery; ...})()?

2008-07-03 Thread Diego A.
Hi Jonathan,

I think they would both qork exactly the same, BUT this notation...
  (function($){
   ...
   })(jQuery)

Is usually used in plugin authoring to isolate the $ variable in case the
user has decided to use jQuery.noConflict(); - which disables access to
jQuery via $.

So this code is for your personal use (ie.: you're not going to share it
with anyone) and you're not using jQuery.noConflict();, then you don't need
to declare the $ variable at all.

Hope this helps.
Diego

2008/7/3 jfine <[EMAIL PROTECTED]>:

>
> The (rather long) subject line says it all.
>
> This idiom is widely used to avoid having to assume $ == jQuery and at
> the same time avoiding writing jQuery all the time.
>   (function($){
>...
>})(jQuery)
>
> I'm wondering if instead this would work.
>  (function(){
>  var $ = jQuery;
>   ...
> })()
>
> The reason I ask is that I'd like to shorthand several things in this
> way.  The first method requires me to go down to the end of a (long)
> function body to find out what, say '_' and 'C' really mean (private
> and Constants, say), whereas the second method tells me up front.
>
> I know enough JavaScript to think of this alternative approach, but
> not enough to be sure that it will work in all relevant circumstances.
>
> --
> Jonathan
>



-- 
Cheers,
Diego A.


[jQuery] Re: Multiple File Upload Update

2008-07-02 Thread Diego A.

Thanks for pointing that out.

Silly me thought it would be OK to test using the "Simulate IE7"
feature in IE8.
Turns out not even that works in IE...

Anyway, lesson learnt, all fixed now!

DE JA VU!

On Jul 2, 5:37 am, "C.Everson" <[EMAIL PROTECTED]> wrote:
> On Tue, 1 Jul 2008 10:52:22 -0700 (PDT), Diego A. wrote:
> >http://www.fyneworks.com/jquery/multiple-file-upload/
>
> Diego,
>
> Also the navigation menu on that page does not work in IE7.
>
> There is no way to reach the actual download link.
>
> I guess your using some alternate browser, but for public websites you
> always need to at least TEST to make sure it works in IE...
>
> ;-)
>
> Chuck


[jQuery] Re: Star Rating Plugin

2008-07-02 Thread Diego A.

Thanks for pointing that out.

Silly me thought it would be OK to test using the "Simulate IE7"
feature in IE8.
Turns out not even that works in IE...

Anyway, lesson learnt, all fixed now!

On Jul 2, 5:41 am, "C.Everson" <[EMAIL PROTECTED]> wrote:
> On Tue, 1 Jul 2008 10:53:00 -0700 (PDT), Diego A. wrote:
> > Oops, forgot to post a link:
> >http://www.fyneworks.com/jquery/star-rating/
>
> Thanks for these updates Diego,
>
> But it appears these pages do not work at all in IE7 either.
>
> You may be fine with that, but it does make the rest of us wonder if
> your plug-in's even work with IE7...
>
> ;-)
>
> Chuck


[jQuery] Re: Star Rating Plugin

2008-07-01 Thread Diego A.

Oops, forgot to post a link:
http://www.fyneworks.com/jquery/star-rating/

On Jul 1, 6:50 pm, "Diego A." <[EMAIL PROTECTED]> wrote:
> Announcement to anyone using this plugin:
>
> - MAJOR BUG FIXES:
>  - - split stars did not work in hidden layers
>  - - now works without dimensions plugin
>
> - New documentation
> - Documentation can be downloaded (works off-line just as it does
> online)


[jQuery] Re: Multiple File Upload Update

2008-07-01 Thread Diego A.

Oops, forgot to post the link:
http://www.fyneworks.com/jquery/multiple-file-upload/

On Jul 1, 6:48 pm, "Diego A." <[EMAIL PROTECTED]> wrote:
> Annoucement to anyone using this plugin:
> - MAJOR BUG FIX
> - New documentation website
> - Documentation available to download (works off-line just as it does
> online)


[jQuery] Star Rating Plugin

2008-07-01 Thread Diego A.

Announcement to anyone using this plugin:

- MAJOR BUG FIXES:
 - - split stars did not work in hidden layers
 - - now works without dimensions plugin

- New documentation
- Documentation can be downloaded (works off-line just as it does
online)


[jQuery] Multiple File Upload Update

2008-07-01 Thread Diego A.

Annoucement to anyone using this plugin:
- MAJOR BUG FIX
- New documentation website
- Documentation available to download (works off-line just as it does
online)


[jQuery] Bug Fix: Multiple File Upload Plugin

2008-05-20 Thread Diego A.

Hi All,

All users of this plugin should download the latest version to fix a
fatal bug in IE7.

SEE: http://www.fyneworks.com/jquery/multiple-file-upload/

Cheers,
Diego A.


[jQuery] Re: Ajax Replacing HTML Using JSON

2008-04-24 Thread Diego A.

Glad to know you solved it.

On Apr 23, 4:59 pm, "s.ross" <[EMAIL PROTECTED]> wrote:
> On Apr 23, 2008, at 1:27 AM, Diego A. wrote:
>
>
>
> > Is the new link by any chance being inserted within the trigger
> > itself? (doesn't seem like it would work because the code takes the
> > href attribute from the trigger itself, not the link within it, but it
> > could cause something weird to happen).
>
> Diego, you're pretty much on target here. I posted a follow-up 
> at:http://groups.google.com/group/jquery-en/browse_thread/thread/2cb9e3e...
>   that explains what the problem was. What I wound up using was event
> bubbling so I could replace something inside the span without
> affecting the binding between the handler and the element.
>
> > Other than that, are use using event delegation or live query or some
> > other way of binding events that is automatically executing the
> > ajaxBind function on the new link when it is inserted?
>
> > On Apr 22, 9:51 pm, "s.ross" <[EMAIL PROTECTED]> wrote:
> >> I'm having a strange problem using $.ajax. Better to illustrate with
> >> the code:
>
> >> function ajaxBind(trigger) {
> >>  trigger.click(function(){
> >>$.ajax({
> >>  type: "POST",
> >>  url:  $(this).attr('href'),
> >>  data: {
> >>'authenticity_token': $
> >> ('input[name=authenticity_token]').val()
> >>  },
> >>  dataType: 'json',
> >>  beforeSend: function(xhr) {
> >>xhr.setRequestHeader("Accept", "application/json");
> >>  },
> >>  // json contains id and partial keys
> >>  success: function(json) {
> >>$('#task' + json['task']).html(json['partial']);
> >>  }
> >>});
> >>return false;
> >>  });
>
> >> }
>
> >> When the DOM element "trigger" is clicked, a request to the server is
> >> issued and the JSON response comes back. Hokey, dokey. The response
> >> is
> >> an html link. Something along the lines of:
>
> >> partial: "link in html that google would strip out anyway"
>
> >> This gets inserted using the html() function, as you see in the
> >> success: part of the $.ajax call, and all is well until I click on
> >> the
> >> new link. Then the link is interpreted as a request to open a
> >> document
> >> of type application/json. Firebug doesn't reveal anything unusual
> >> about the inserted HTML. Does anyone see the problem here?
>
> >> Thanks


[jQuery] Re: Why is form submit action not being invoked?

2008-04-23 Thread Diego A.

Works fine for me in Firefox

But you have this line at the start of the validation function that I
assume can only be for testing purposes:
alert(document.getElementById('Email').value);

On Apr 22, 10:57 pm, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> Hi,
>
> When I submit the contact form
>
> http://elearningrd.info/jrl/contact.php
>
> I would like to validate the email address and possibly check non-
> empty values for the other fields.  I'm using this code to try and
> check things upon form submission:
>
> $(document).ready(function() {
> $('#msgForm').submit(function() {
> var email = $('#Email').val();
> if (!validateForm(email)) {
> alert("Invalid email format.");
> return false;
> }
> return true;
> });
> });
>
> but the form validation doesn't seem to be invoked.  Any ideas why?
>
> Thanks, - Dave


[jQuery] Re: Ajax Replacing HTML Using JSON

2008-04-23 Thread Diego A.

Is the new link by any chance being inserted within the trigger
itself? (doesn't seem like it would work because the code takes the
href attribute from the trigger itself, not the link within it, but it
could cause something weird to happen).

Other than that, are use using event delegation or live query or some
other way of binding events that is automatically executing the
ajaxBind function on the new link when it is inserted?

On Apr 22, 9:51 pm, "s.ross" <[EMAIL PROTECTED]> wrote:
> I'm having a strange problem using $.ajax. Better to illustrate with
> the code:
>
> function ajaxBind(trigger) {
>   trigger.click(function(){
> $.ajax({
>   type: "POST",
>   url:  $(this).attr('href'),
>   data: {
> 'authenticity_token': $
> ('input[name=authenticity_token]').val()
>   },
>   dataType: 'json',
>   beforeSend: function(xhr) {
> xhr.setRequestHeader("Accept", "application/json");
>   },
>   // json contains id and partial keys
>   success: function(json) {
> $('#task' + json['task']).html(json['partial']);
>   }
> });
> return false;
>   });
>
> }
>
> When the DOM element "trigger" is clicked, a request to the server is
> issued and the JSON response comes back. Hokey, dokey. The response is
> an html link. Something along the lines of:
>
> partial: "link in html that google would strip out anyway"
>
> This gets inserted using the html() function, as you see in the
> success: part of the $.ajax call, and all is well until I click on the
> new link. Then the link is interpreted as a request to open a document
> of type application/json. Firebug doesn't reveal anything unusual
> about the inserted HTML. Does anyone see the problem here?
>
> Thanks


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

2008-04-23 Thread Diego A.

that's a point, but as Jake and Yansky have pointed out, once the
script is downloaded and executed it will have "done stuff" and
"stored stuff in memory". Removing a script doesn't change anything.

Perhaps the question needs rephrasing...
...which will beg another question: what exactly does the script do/
store and what do you want to remove?


On Apr 23, 7:53 am, Shawn <[EMAIL PROTECTED]> wrote:
> If your script happend to be loading a specific object, you can just set
>   that object to an empty string or use the delete() function in native JS.
>
> Just a thought.
>
> Shawn
>
> Yansky wrote:
>
> > What would be the point? The script would have already loaded.
>
> > cfdvlpr wrote:
>
> >> Is it possible to remove a script from a page dynamically?


[jQuery] Re: Jquery cycle plugin and images included dynamically

2008-04-12 Thread Diego A.

I am finding it hard to understand your problem, but I'm guessing it
may be because when the image is hidden, the cycle plugin cannot find
its dimensions (hidden elements have dimensions 0x0).

Instead of display:none, have you considered off-screen positioning or
visibility:hidden instead?

Diego

On Apr 12, 1:20 am, jawosis <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I am using the jquery cycle plugin for slide effects of images being
> included dynamically to the website. Unfortunately, the images in the
> hidden divs will not show in their original size once being showed
> from the cycle script - just a icon size image is visible.
>
> How can i change this to maintain the real image size in all (also
> hidden) divs?


[jQuery] Re: Star Rating v2 and Half-Star (NEED FEEDBACK)

2008-04-07 Thread Diego A.

that should not affect the image because it is in the background (not
affected by text-indent).
it seems to be working for me. do you have a link I can look at?

On Apr 4, 11:08 pm, AsymF <[EMAIL PROTECTED]> wrote:
> It seems that in IE 7 the DIVs for the stars are in fact being created
> from the radio buttons as expected but the text-indent CSS is set to
> -999em.
>
> On Apr 4, 8:34 am, AsymF <[EMAIL PROTECTED]> wrote:
>
> > Yeah, I had thought about doing that. Even overlapping them. Was just
> > wondering if I had somehow missed a simpler way of doing it. :)
>
> > One other thing. I can't get this version to work at all in IE 7 when
> > the stars are split. The stars don't show up. Even the radio buttons
> > won't show up.
>
> > On Apr 4, 4:24 am, "Diego A." <[EMAIL PROTECTED]> wrote:
>
> > > Erm.. no.
> > > What you can do is have 2 controls.
>
> > > 1. Dummy control to display value (split).
> > > 2. Actual control that takes an input (not split).
>
> > > Show/hide at your disclosure and voila!
>
> > > On Apr 3, 10:29 pm, AsymF <[EMAIL PROTECTED]> wrote:
>
> > > > Sorry, nevermind about the metadata. I just noticed it is optional.
>
> > > > New questionis it possible to display the current value with split
> > > > stars but only allow whole star voting? In other words, show 3 and
> > > > 3/4ths stars highlighted and the remainder portion grayed out but on
> > > > mouseover show a full star for each one?
>
> > > > On Apr 3, 4:10 pm, AsymF <[EMAIL PROTECTED]> wrote:
>
> > > > > Any way to get around the need for the metadata plugin? I am trying to
> > > > > keep included scripts light.
>
> > > > > On Mar 20, 3:23 pm, "Diego A." <[EMAIL PROTECTED]> wrote:
>
> > > > > > For reference: The issue was relative positioning in IE.
> > > > > > I worked around it with a negative margin.
>
> > > > > > On Mar 20, 6:29 pm, "Diego A." <[EMAIL PROTECTED]> wrote:
>
> > > > > > > I had tried that but it didn't work reliably in IE. It was a CSS
> > > > > > > issue. But hey, I think I've fixed it, in which case the only 
> > > > > > > issue
> > > > > > > with prototype B will be resolved.
>
> > > > > > > Check it out:http://www.fyneworks.com/jquery/star-rating/
>
> > > > > > > On Mar 19, 10:08 pm, AsymF <[EMAIL PROTECTED]> wrote:
>
> > > > > > > > Why can't the background-color value just be set to transparent?
>
> > > > > > > > On Mar 16, 5:28 pm, timothytoe <[EMAIL PROTECTED]> wrote:
>
> > > > > > > > > B is the more interesting path for development--that's for 
> > > > > > > > > sure. You
> > > > > > > > > could always do both. Do B as far as you can take it, then 
> > > > > > > > > maybe some
> > > > > > > > > clever solution will occur to you to get the same 
> > > > > > > > > functionality over
> > > > > > > > > any background.
>
> > > > > > > > > On Mar 16, 11:10 am, "Diego A." <[EMAIL PROTECTED]> wrote:
>
> > > > > > > > > > Hi Timothy, thanks for the feedback. THAT is exactly the 
> > > > > > > > > > issue.
>
> > > > > > > > > > Prototype A would work on ANY background, gradient or not, 
> > > > > > > > > > without any
> > > > > > > > > > further requirements - other than 2 separate images that is.
>
> > > > > > > > > > Prototype B does not require any other images, but you must 
> > > > > > > > > > define the
> > > > > > > > > > background. So, if the background was a gradient, you'd 
> > > > > > > > > > have to define
> > > > > > > > > > the same background image for the rating control in order 
> > > > > > > > > > for it to
> > > > > > > > > > match the background it sits on (ie.: the page background).
>
> > > > > > > > > > What sways me toward prototype B is that it allows for 
> > > > > > >

[jQuery] Re: Star Rating v2 and Half-Star (NEED FEEDBACK)

2008-04-04 Thread Diego A.

Erm.. no.
What you can do is have 2 controls.

1. Dummy control to display value (split).
2. Actual control that takes an input (not split).

Show/hide at your disclosure and voila!

On Apr 3, 10:29 pm, AsymF <[EMAIL PROTECTED]> wrote:
> Sorry, nevermind about the metadata. I just noticed it is optional.
>
> New questionis it possible to display the current value with split
> stars but only allow whole star voting? In other words, show 3 and
> 3/4ths stars highlighted and the remainder portion grayed out but on
> mouseover show a full star for each one?
>
> On Apr 3, 4:10 pm, AsymF <[EMAIL PROTECTED]> wrote:
>
> > Any way to get around the need for the metadata plugin? I am trying to
> > keep included scripts light.
>
> > On Mar 20, 3:23 pm, "Diego A." <[EMAIL PROTECTED]> wrote:
>
> > > For reference: The issue was relative positioning in IE.
> > > I worked around it with a negative margin.
>
> > > On Mar 20, 6:29 pm, "Diego A." <[EMAIL PROTECTED]> wrote:
>
> > > > I had tried that but it didn't work reliably in IE. It was a CSS
> > > > issue. But hey, I think I've fixed it, in which case the only issue
> > > > with prototype B will be resolved.
>
> > > > Check it out:http://www.fyneworks.com/jquery/star-rating/
>
> > > > On Mar 19, 10:08 pm, AsymF <[EMAIL PROTECTED]> wrote:
>
> > > > > Why can't the background-color value just be set to transparent?
>
> > > > > On Mar 16, 5:28 pm, timothytoe <[EMAIL PROTECTED]> wrote:
>
> > > > > > B is the more interesting path for development--that's for sure. You
> > > > > > could always do both. Do B as far as you can take it, then maybe 
> > > > > > some
> > > > > > clever solution will occur to you to get the same functionality over
> > > > > > any background.
>
> > > > > > On Mar 16, 11:10 am, "Diego A." <[EMAIL PROTECTED]> wrote:
>
> > > > > > > Hi Timothy, thanks for the feedback. THAT is exactly the issue.
>
> > > > > > > Prototype A would work on ANY background, gradient or not, 
> > > > > > > without any
> > > > > > > further requirements - other than 2 separate images that is.
>
> > > > > > > Prototype B does not require any other images, but you must 
> > > > > > > define the
> > > > > > > background. So, if the background was a gradient, you'd have to 
> > > > > > > define
> > > > > > > the same background image for the rating control in order for it 
> > > > > > > to
> > > > > > > match the background it sits on (ie.: the page background).
>
> > > > > > > What sways me toward prototype B is that it allows for future
> > > > > > > development. Stars can be easily split into sections, different 
> > > > > > > images
> > > > > > > used, star domensions can be re-defined.
>
> > > > > > > Prototype A is easier to use (you don't need to think about the
> > > > > > > background it will sit on), but it puts serious constraints on 
> > > > > > > future
> > > > > > > development and customization.
>
> > > > > > > On Mar 15, 6:42 pm, timothytoe <[EMAIL PROTECTED]> wrote:
>
> > > > > > > > Would prototype A work on a gradient background? If so, that 
> > > > > > > > would be
> > > > > > > > useful. If not, B makes more sense to me.
>
> > > > > > > > On Mar 15, 10:11 am, "Diego A." <[EMAIL PROTECTED]> wrote:
>
> > > > > > > > > To anyone else who might be interested, feel free to send your
> > > > > > > > > feedback. I'm going to go ahead with prototype B for now so 
> > > > > > > > > the plugin
> > > > > > > > > will require a background colour.
>
> > > > > > > > > On Mar 13, 8:45 pm, "Diego A." <[EMAIL PROTECTED]> wrote:
>
> > > > > > > > > > Two things.
>
> > > > > > > > > > 1. v2 now available 
> > > > > > > > > > here:http://www.fyneworks.com/jquery/star-rating/
> > > > > > > > > > - NEW: option to disable the cancel button,
> > > > > > > > > > - NEW: option to make the plugin readOnly
> > > > > > > > > > - NEW: ability to accept any value (anything at all)
>
> > > > > > > > > > 2. half-star prototypes now available
> > > > > > > > > > There are 2 ways of doing it, I need your feedback.
>
> > > > > > > > > > Prototype A: Using 2 new half-star images (star-left and 
> > > > > > > > > > star-right)http://www.fyneworks.com/jquery/star-rating/half-star-A/
> > > > > > > > > > PROS: works on any background
> > > > > > > > > > CONS: needs extra images
>
> > > > > > > > > > Prototype B: Uses CSS to slide part of the star out of view 
> > > > > > > > > > (no extra
> > > > > > > > > > images)http://www.fyneworks.com/jquery/star-rating/half-star-B/
> > > > > > > > > > PROS: can be easily divided into smaller pieces with CSS
> > > > > > > > > > CONS: needs background colour
>
> > > > > > > > > > So, which one should we use?


[jQuery] Re: cycle plugin problem

2008-03-04 Thread Diego A.

AH! I'll be able to sort it out from here...
THANK YOU!

On Mar 4, 3:11 pm, "Mike Alsup" <[EMAIL PROTECTED]> wrote:
> It looks like you've got competing versions of the metadata plugin
> loaded.  The current one, and then later in the file some sort of
> ancient one under the comment:
>
> // MODIFIER FOR METADATA PLUGIN
>
> Cycle is borking because the call to retrieve metadata is returning a
> full jQuery object.
>
> Mike
>
> On Tue, Mar 4, 2008 at 9:49 AM, Diego A. <[EMAIL PROTECTED]> wrote:
>
> >  Hi Mike,
>
> >  Thank you so much for your prompt reply. Here is the link:
> >  http://thewayfarers.com.temp.ourhelmcp.com/
>
> >  The site is in its earliest stages of development so please ignore the
> >  mess. The slideshow in question is on the bottomr right hand corner of
> >  the frontpage and here is the code I used to start it:
>
> >  // Cycle
> >  $('#slideshow').cycle({ fx: 'fade' });
>
> >  PS.: If you're wondering, the rather large @.js file is a compilation
> >  of jQuery + plugins + my own code, uncompressed and with all comments,
> >  which I use during development. I had the same problem with the
> >  'packed' version...
>
> >  PPS.: Using jQuery 1.2.3 Rev 4663
>
> >  PPPS.: There's no hurry so don't put yourself out...
>
> >  On Mar 4, 2:19 pm, "Mike Alsup" <[EMAIL PROTECTED]> wrote:
> >  > Diego, can you post a link?
>
> >  > >  I have not been able to use the cycle plugin and it's driving me
> >  > >  insane.
>
> >  > >  The error message (in firebug):
> >  > >  this.domManip is not a function


[jQuery] Re: Half star rating plugin won't work with jQuery 1.2.3

2008-03-04 Thread Diego A.

I have an idea to make this work (for display purposes only), and I
will do my best to implement it in the next couple of days (weeks
tops). I'm sorry I can't do it right now - hope that's OK.

I'll post back here... (and in the official project page in the jQuery
plugins website)

On Mar 4, 5:32 pm, AsymF <[EMAIL PROTECTED]> wrote:
> I am really just looking for way to display the data, not to worry
> about graceful degradation without JavaScript enabled. I had a serious
> issue with people using proxies to submit thousands of votes for
> irrelevant ratings so now all ratings have to fetch a key in advance
> using an AJAX callback to the server (based in part on another
> tutorial I found on the jQuery site). If JavaScript is gone I just
> show a list of stars so that visitors can see the rating even if they
> can't vote.
>
> However, I would like to be able to display incremental stars such
> that if I have a rating of 3.75, then 3 stars and 75% of a 4th star
> will be shown with the rest grayed out.
>
> On Mar 4, 9:27 am, "Diego A." <[EMAIL PROTECTED]> wrote:
>
> > I have been thinking about this for a few days now, but I haven't had
> > the time to do it.
>
> > The problem with what you're trying to achieve is that you're looking
> > for something to *display* the data, whereas my implementation of the
> > plugin focuses on semantic form integration.
>
> > Perhaps the way forward is to add the ability to display decimal
> > points and accept the input of whole numbers (and at a push, .5s).
>
> > How are you going to use this?
>
> > On Mar 1, 5:46 pm, AsymF <[EMAIL PROTECTED]> wrote:
>
> > > I am now working on the jQuery Star Rating Plugin v1.1 by Diego 
> > > A.,http://www.fyneworks.com, [EMAIL PROTECTED]
>
> > > I have gotten it working and added the ability to remove the cancel
> > > button by adding the following before the line "for(n in groups){":
> > > if (settings.nocancel) {
> > > $("div.cancel:has(a[title='" + settings.cancel + "'])").remove();
>
> > > }
>
> > > I also added "nocancel: false" to the settings at the beginning of the
> > > script.
>
> > > Now if I could figure out how to get it to show incremental stars for
> > > ratings such as 3.2 or 4.6 it would be perfect for my purposes. Any
> > > ideas on implementing this? Like I said, I can see it done in the
> > > plugin ratings on the jQuery site but don't know which segment of code
> > > does that feature.
>
> > > On Feb 29, 5:52 pm, AsymF <[EMAIL PROTECTED]> wrote:
>
> > > > I would just use the one on the jQuery site if it weren't for the fact
> > > > that it relies on a form. The position on the page I want to show the
> > > > star rating already has another form so to use that one would mean
> > > > putting a form inside a form which causes problems.
>
> > > > On Feb 29, 3:19 pm, chrismarx <[EMAIL PROTECTED]> wrote:
>
> > > > > is that the same on as here:  
> > > > > http://examples.learningjquery.com/rating/
> > > > > ?
> > > > > i remember making several changes, let me know if thats the same one-
>
> > > > > On Feb 29, 1:16 pm, AsymF <[EMAIL PROTECTED]> wrote:
>
> > > > > > I got this one to work:
> > > > > > Star Rating Plugin v1.1 
> > > > > > ->http://www.fyneworks.com/jquery/star-rating/
>
> > > > > > But the half star plugin won't work with 
> > > > > > 1.2.3:http://www.learningjquery.com/2007/05/half-star-rating-plugin
>
> > > > > > Does anyone know a fix? The stars all appear grayed out and hover 
> > > > > > also
> > > > > > doesn't work.


[jQuery] Re: cycle plugin problem

2008-03-04 Thread Diego A.

Hi Mike,

Thank you so much for your prompt reply. Here is the link:
http://thewayfarers.com.temp.ourhelmcp.com/

The site is in its earliest stages of development so please ignore the
mess. The slideshow in question is on the bottomr right hand corner of
the frontpage and here is the code I used to start it:

// Cycle
$('#slideshow').cycle({ fx: 'fade' });

PS.: If you're wondering, the rather large @.js file is a compilation
of jQuery + plugins + my own code, uncompressed and with all comments,
which I use during development. I had the same problem with the
'packed' version...

PPS.: Using jQuery 1.2.3 Rev 4663

PPPS.: There's no hurry so don't put yourself out...

On Mar 4, 2:19 pm, "Mike Alsup" <[EMAIL PROTECTED]> wrote:
> Diego, can you post a link?
>
>
>
>
>
> >  I have not been able to use the cycle plugin and it's driving me
> >  insane.
>
> >  The error message (in firebug):
> >  this.domManip is not a function


[jQuery] Re: Half star rating plugin won't work with jQuery 1.2.3

2008-03-04 Thread Diego A.

I have been thinking about this for a few days now, but I haven't had
the time to do it.

The problem with what you're trying to achieve is that you're looking
for something to *display* the data, whereas my implementation of the
plugin focuses on semantic form integration.

Perhaps the way forward is to add the ability to display decimal
points and accept the input of whole numbers (and at a push, .5s).

How are you going to use this?

On Mar 1, 5:46 pm, AsymF <[EMAIL PROTECTED]> wrote:
> I am now working on the jQuery Star Rating Plugin v1.1 by Diego 
> A.,http://www.fyneworks.com, [EMAIL PROTECTED]
>
> I have gotten it working and added the ability to remove the cancel
> button by adding the following before the line "for(n in groups){":
> if (settings.nocancel) {
> $("div.cancel:has(a[title='" + settings.cancel + "'])").remove();
>
> }
>
> I also added "nocancel: false" to the settings at the beginning of the
> script.
>
> Now if I could figure out how to get it to show incremental stars for
> ratings such as 3.2 or 4.6 it would be perfect for my purposes. Any
> ideas on implementing this? Like I said, I can see it done in the
> plugin ratings on the jQuery site but don't know which segment of code
> does that feature.
>
> On Feb 29, 5:52 pm, AsymF <[EMAIL PROTECTED]> wrote:
>
> > I would just use the one on the jQuery site if it weren't for the fact
> > that it relies on a form. The position on the page I want to show the
> > star rating already has another form so to use that one would mean
> > putting a form inside a form which causes problems.
>
> > On Feb 29, 3:19 pm, chrismarx <[EMAIL PROTECTED]> wrote:
>
> > > is that the same on as here:  http://examples.learningjquery.com/rating/
> > > ?
> > > i remember making several changes, let me know if thats the same one-
>
> > > On Feb 29, 1:16 pm, AsymF <[EMAIL PROTECTED]> wrote:
>
> > > > I got this one to work:
> > > > Star Rating Plugin v1.1 ->http://www.fyneworks.com/jquery/star-rating/
>
> > > > But the half star plugin won't work with 
> > > > 1.2.3:http://www.learningjquery.com/2007/05/half-star-rating-plugin
>
> > > > Does anyone know a fix? The stars all appear grayed out and hover also
> > > > doesn't work.


[jQuery] Re: Half star rating plugin won't work with jQuery 1.2.3

2008-03-04 Thread Diego A.

That's because the .lt and .gt methods were removed in jQuery 1.2.
See:
http://www.learningjquery.com/2007/09/upgrading-to-jquery-12
http://docs.jquery.com/Release:jQuery_1.2

On Feb 29, 10:41 pm, AsymF <[EMAIL PROTECTED]> wrote:
> I tried using that one, too. Doesn't work at all. All the stars are
> grayed out after the code executes no matter what I set curvalute to
> and clicking them does absolutely nothing. I even inserted alerts()
> into the code to see when the click fired. Nothing showed up.
>
> On Feb 29, 3:19 pm, chrismarx <[EMAIL PROTECTED]> wrote:
>
> > is that the same on as here:  http://examples.learningjquery.com/rating/
> > ?
> > i remember making several changes, let me know if thats the same one-
>
> > On Feb 29, 1:16 pm, AsymF <[EMAIL PROTECTED]> wrote:
>
> > > I got this one to work:
> > > Star Rating Plugin v1.1 ->http://www.fyneworks.com/jquery/star-rating/
>
> > > But the half star plugin won't work with 
> > > 1.2.3:http://www.learningjquery.com/2007/05/half-star-rating-plugin
>
> > > Does anyone know a fix? The stars all appear grayed out and hover also
> > > doesn't work.


[jQuery] cycle plugin problem

2008-03-04 Thread Diego A.

Hi all, (and Hopefully Mike Alsup)

I have not been able to use the cycle plugin and it's driving me
insane.

The error message (in firebug):
this.domManip is not a function

I know the error originates from this line on the cycle plugin...
opts.before[0].apply(e0, [e0, e0, opts, true]);
I have checked that:
- e0 is the first element in the $slides array.
- opts.before is an array with 2 functions

The error actually happens on this line in jQuery:
return this.domManip(arguments, false, false, function(elem){
...within the fn.before(...) method.

Can anyone help / clarify what might be wrong?

Thanks in advance!
Diego A.


[jQuery] Re: how to get the size of the image file before user upload it.

2008-03-04 Thread Diego A.

Good point Shawn, BUT that won't (or at least shouldn't) work on
modern browsers due to security reasons, so it's not a reliable
solution.

The only *real way* is with a Java Applet (and maybe Flash).

On Mar 4, 1:58 pm, Shawn <[EMAIL PROTECTED]> wrote:
> I don't know of any reliable way to do so.
>
> But if I were to speculate a bit
>
> If you were to use JS to create an img object and set it's src to the
> local path to the image file.  Then use the .ready() method on that
> object, you *might* be able to extract the height/width, put those into
>   form elements, then submit your form (thereby uploading the file AND
> the dimensions).
>
> But that is pure speculation.  I haven't done it.  Yet I don't see any
> reason that wouldn't work (then again I haven't gone to be yet since
> this time yesterday morning sighs).
>
> HTH
>
> Shawn
>
> Xinhao Zheng wrote:
> > hi all,
>
> > is there a way to do this that can work both under ie and FF.thanks
> > in advance.
>
> > George


[jQuery] Re: Suggestions for the validation plugin

2008-02-16 Thread Diego A.

I've created them here...

#1: Ignore fields without a method specified
http://plugins.jquery.com/node/1601

#2: Accept custom messages from rules option
http://plugins.jquery.com/node/1602

...but I wasn't able to assign them to you (no permission I believe).

Thanks,
Diego

On Feb 15, 5:48 pm, Jörn Zaefferer <[EMAIL PROTECTED]> wrote:
> Diego A. schrieb:> What do you think?
>
> Could you file tickets for those? Just put [validate] into the title,
> label it as an enhancement and assign it to "joern". Thanks!
>
> Jörn


[jQuery] Re: Plugin updated: FCKEditor, Codepress, Multiple File Upload & Star Rating

2008-02-15 Thread Diego A.

LOL, I was going to say "comnig from you", but I don't know where
"you" went... I should hopefully have sometime to work on the star
rating plugin next week... I'll post developments

On Jan 14, 10:06 pm, Karl Swedberg <[EMAIL PROTECTED]> wrote:
> On Jan 14, 2008, at 4:48 PM, Diego A. wrote:
>
>
>
> > Thanks Karl, I really appreciate your feedback - specially coming
> > from .
>
> Not a problem. I can only guess what you were going to call me,
> though, since there nothing showed up in that sentence after "from".
> Hope it was nice.
>   :-D
>
> > I had planned (if you don't mind) to use your work on the half-
> > star rating plugin as the basis for the new features... I hope that's
> > OK.
>
> Of course it's okay. Take whatever you want. I'd be honored.
>
> > PS.: learningjquery.com seems to be down at the moment (just in case
> > you hadn't noticed)
> >http://www.learningjquery.com/2007/05/half-star-rating-plugin
>
> Thanks for telling me. I hadn't noticed. Ugh.
>
> --Karl
>
> > On Jan 14, 9:41 pm, Karl Swedberg <[EMAIL PROTECTED]> wrote:
> >> Fantastic, Diego! That's really exciting news. I was about to start
> >> work on a semantically-correct half-star rating plugin myself, but
> >> I'm
> >> happy to be able to scratch it off my list now. Actually, I only
> >> converted Ritesh's plugin to half-star in the first place because
> >> someone asked for that one specifically to have the added feature.
> >> It's not a bad plugin, but I much prefer writing JS that gracefully
> >> degrades.
>
> >> Thanks a lot for putting the time into this!
>
> >> --Karl
> >> _
> >> Karl Swedbergwww.englishrules.comwww.learningjquery.com
>
> >> On Jan 14, 2008, at 4:34 PM, Diego A. wrote:
>
> >>> Hi Karl,
>
> >>> I came across the star rating plugin because I needed one myself.
>
> >>> There were many variations, but I narrowed the list down to 2. One
> >>> was
> >>> the Half-Star rating control and the other was PHPLetter's
> >>> downgrade-
> >>> able star rating control. I decided to build upon the 'semantically
> >>> correct' version and then work towards the other advanced features
> >>> such as half-ratings, custom images, on/off toggle, etc...
>
> >>> I will develop all those features in the coming weeks and post the
> >>> updates here for anyone who's interested...
>
> >>> Thanks guys,
> >>> Diego
>
> >>> On Jan 14, 5:49 pm, Karl Swedberg <[EMAIL PROTECTED]> wrote:
> >>>> hey Diego,
>
> >>>> I love what you've done with the Star Rating Plugin! Excellent
> >>>> work.
> >>>> One question: can it be used with 1/2 star values? If so, I think
> >>>> it
> >>>> would be great for people to see an example of that on the demo
> >>>> page
> >>>> (if there is such an example, please forgive my oversight).
>
> >>>> thanks,
>
> >>>> --Karl
> >>>> _
> >>>> Karl Swedbergwww.englishrules.comwww.learningjquery.com
>
> >>>> On Jan 14, 2008, at 9:42 AM, Diego A. wrote:
>
> >>>>> Hey everyone,
>
> >>>>> Quick note to all those using any of my plugins, they've all been
> >>>>> updated this week and had a few (*cough*) bugs fixed. I recommend
> >>>>> you
> >>>>> download the latest versions...
>
> >>>>> FCKEditor Plugin:http://www.fyneworks.com/jquery/FCKEditor/
> >>>>> Codepress Plugin:http://www.fyneworks.com/jquery/Codepress/
> >>>>> Multiple File Upload 
> >>>>> Plugin:http://www.fyneworks.com/jquery/multiple-file-upload/
> >>>>> Star Rating Plugin:http://www.fyneworks.com/jquery/star-rating/
>
> >>>>> Cheers,
> >>>>> Diego


[jQuery] Re: OT: TinyMCE help

2008-02-15 Thread Diego A.

I don't have any TinyMCE experience, but I do have FCKEditor
experience and it offers MANY image selection, upload and manipulation
plugins...

www.fckeditor.net

On Feb 15, 3:34 pm, Gordon <[EMAIL PROTECTED]> wrote:
> I know this is OT but I couldn't find muchuseful on the TinyMCE home
> page and there doesn't seem to be a support forum at all.
>
> I'm building a CMS and am using jQuery and TinyMCE together for the
> user interface.
>
> I wanted to have an image picker, where you just pick an image from
> the list of images uploaded to the CMS and it gets inserted, but I
> can't figure out how to do it with any degree of sophistication.  I
> managed to hack something with execCommand ('insertimage') together
> but it doesn't let you do anything like specify alt text, or width or
> height or anything like that.
>
> What I'd really like to do is trigger fhe image insert plugin from a
> script, but have it preconfigured with the selected image.
>
> I've gone looking for help but like I said the support forum seems to
> be gone, it looks like it's been closed down in favour of a support
> system for which you must pay to use.
>
> Have any of you got TinyMCE experience, or know any place where I can
> get TinyMCE support?


[jQuery] Suggestions for the validation plugin

2008-02-15 Thread Diego A.

Hi Jorn, (hoping that you will get this)

firstly, I'd like to suggest a simple change to the validation plugin
that might save everyone a bit of time. Line 413 of the current
release goes:
413  var result = jQuery.validator.methods[rule.method].call(...
...which throws an error when you haven't defined any rules for that
field. I know it's inside a try/catch block, but Firefox still shows
an error when you validate for the 2nd time (even if debug option is
false).

So my suggestion is to add "if(rule.method)" to line 412, making it:
412 if(rule.method) try {
413  var result = jQuery.validator.methods[rule.method].call(...

My second suggestion would be to send something more useful in the
rules options, instead of just booleans. We could for example send the
error message, instead of having 2 separate options. Like this:
$('form').validate({
 rules{
  name: { required: 'I need your name' },
  email: { required: 'I need your email address', required: 'That is
not a valid email address'}
 }
});

What do you think?


[jQuery] Re: Choosing an Autocompletion solution

2008-02-13 Thread Diego A.

I use:
http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/

I made this decision a few months ago, but I remember going through 4
or 5 options (I even considered writing my own), but in the end I
chose the option that I thought was most likely to see future
development and support.

On Feb 13, 6:47 pm, timothytoe <[EMAIL PROTECTED]> wrote:
> I searched google for "jquery autocompletion" and was overwhelmed by
> the choices. Looks like people have been borrowing heavily back and
> forth to get the best solution.
>
> Has anyone gone through the choices recently and selected one? If so,
> which did you choose and why?
>
> I'd like to use it for both local and Ajax server data.


[jQuery] Re: What am I missing with jQuery Forms ajaxSubmit?

2008-02-13 Thread Diego A.

FF is behaving according to industry standards, it's IE that is in the
wrong by allowing this to happen.

IE is so crap that:
- things that SHOULD work DON'T...
- things that SHOULDN'T work DO...

All hail to Microsoft!

On Feb 6, 4:05 pm, JohnC <[EMAIL PROTECTED]> wrote:
> The form being submitted does have a file being uploaded.
>
> I've removed the ContentType from the .net code and now that works
> just fine.
>
> Can anyone explain why this behaviour occurred? It worked fine in IE -
> but not FF. Normally I'd expect things the other way around!
>
> Thanks for the advice.
>
> John
>
> On Feb 6, 3:55 pm, "Mike Alsup" <[EMAIL PROTECTED]> wrote:
>
> > > Mike, does the form plugin ever use hidden iFrames, perhaps in upload
> > > forms?
>
> > Yes, good point, Diego. This probably would happen if there is a file being
> > uploaded.  Removing the ContentType header would solve the problem.


[jQuery] Re: What am I missing with jQuery Forms ajaxSubmit?

2008-02-06 Thread Diego A.

Sounds like wrong content-type or headers.

Mike, does the form plugin ever use hidden iFrames, perhaps in upload
forms?

On Feb 6, 3:32 pm, "Mike Alsup" <[EMAIL PROTECTED]> wrote:
> > Just to make sure, can you visit the target resource manually in
> > Firefox and not get the External dialog?
>
> That's what I *would* expect if you navigated directly to that page.  FF
> will want to download it, not display it.  But that won't happen with ajax,
> which is why I think there is a script error.
>
> Mike


[jQuery] Re: jquploader 2 alpha 1 - rich file upload dialog plugin - please test and help

2008-01-31 Thread Diego A.

It looks great and works for me (FF2, WinXP SP2).
I can't really help with the plugin because I know nothing about Flash/
ActionScript,
but you should read this:
http://docs.jquery.com/Plugins/Authoring

On Jan 31, 11:36 am, "Alexandre Plennevaux" <[EMAIL PROTECTED]>
wrote:
> Hello friends,
>
> I am working on the new version of jqUploader, a plugin that allows to
> replace the file inputs in a form  for a more user-friendly file upload
> dialog via the use of an invisible flash object.
> The new version allows for full customization via CSS and html, instead of
> having to tweak the flash file.
>
> I've pretty much finished a working prototype (still need to implement all
> the customizable options). It works well on WinXP FF2.
>
> WARNING: THIS IS ALPHA STUFF NOT TO BE USED IN PRODUCTION YET 
>
> demo is here:http://www.pixeline.be/experiments/jqUploader/v2/
>
> I have 2 requests:
> query.jquploader2.js
>
> 1/ can you test on your side and (especially mac users) let me know if the
> test works or not for you.
> 2/ for plugin experts: if you look at the code i use functions that i would
> like that the user be able to modify, but i don't know exactly how to do
> that. For the moment, the js functions called by flash are sitting outside
> of the plugin loop.
> What would be the good way to allow users to modify what these function do?
> Basically their task is to update the html according to the flash events.
> The code is here:
>
> Thank you for your time,
>
> Alexandre
>
> --
> Alexandre Plennevaux
> LAb[au]
>
> http://www.lab-au.com


[jQuery] Re: Overriding form submissions in a way that deals with this.form.submit()

2008-01-31 Thread Diego A.

This should do it:
$('form').each(function(){
 this.onsubmit = function(){
  // do stuff
 }
};

On Jan 31, 12:07 pm, the_woodsman <[EMAIL PROTECTED]> wrote:
> Hi everyone,
>
> I'm using Jquery to override form submits, i.e:
>
> var tabsForms=$('#'+el.id+' form');
> tabsForms.submit(function(){...
>
> Pressing submit works fine with this approach, but there's existing
> code in the form inputs, such as onclick=this.form.submit.
>
> When the form is submitted this way, it seems that the submit() event
> I created via JQuery is ignored, and the form submits normally.
>
> I can't change the zillion examples of this in my existing pages - so
> how can I make this.form.submit() submit just like pressing the submit
> button now does?
>
> Thanks in advance!


[jQuery] Re: File inputs

2008-01-31 Thread Diego A.

Actually, this method seems good enough to me:
http://www.quirksmode.org/dom/inputfile.html
...specially with the forced IE6 updated coming soon.

On Jan 31, 8:52 am, "Diego A." <[EMAIL PROTECTED]> wrote:
> I've tried for a long time to do this and as far as I know: it just
> can't be done. Perhaps the next generation of browsers will allow us
> developers to call the file seclection box like this
> "window.chooseFile", just like we can use "window.prompt"...
>
> If this does turn out to be possible, eventually, then I'll add it to
> my multiple file upload plugin...
>
> On Jan 30, 4:11 am, "Steffan A. Cline" <[EMAIL PROTECTED]> wrote:
>
> > on 1/29/08 7:58 PM, Hamish Campbell at [EMAIL PROTECTED] wrote:
>
> > > Some code would be useful - you've said that .click() doesn't work in
> > > FF, but it probably isn't the .click() bit that isn't working.
>
> > > One suggestion (untested) is that you include both the normal button
> > > and the new image, but hide the image with CSS by default. This means
> > > that if JS is disabled, the user can still click the normal button.
>
> > > Then with jQuery, hide the button and show the image on
> > > document.ready. Then apply a trigger to the image that fires the
> > > normal button action. It means you shouldn't need to code anything
> > > special - just piggy-back on the usual action of the button.
>
> > > Eg:
>
> > > $("#myImage").click(function () {
> > >   $("#fileButton").trigger('click');
> > > });
>
> > > On Jan 30, 8:01 am, "Steffan A. Cline" <[EMAIL PROTECTED]> wrote:
> > >> on 1/29/08 11:57 AM, Mika Tuupola at [EMAIL PROTECTED] wrote:
>
> > >>> On Jan 29, 2008, at 7:08 PM, Steffan A. Cline wrote:
>
> > >>>> I know there is a plug-in for styling file inputs but what about
> > >>>> using a
> > >>>> custom image instead? I need to do something where I have an ADD and a
> > >>>> DELETE button side by side. I tried this using .click() and it worked
> > >>>> flawlessly but alas FF does not support it! How stupid!.
>
> > >>> What are you trying to achieve? What does ADD and DELETE buttons do?
>
> > >>> --
> > >>> Mika Tuupola
> > >>>http://www.appelsiini.net/
>
> > >> The add button would simply pop up the file selector as clicking on the
> > >> actual file button would do. The delete button would set a hidden flag to
> > >> remove the stored file.
>
> > >> See the previous thread ".click()" This described the previous method 
> > >> which
> > >> I gave up on.
>
> > >> Thanks
>
> > >> Steffan
>
> > Well, I tried many variations of .click() with FF and according to this
> > link:
>
> >http://www.quirksmode.org/dom/inputfile.html
>
> > reads:
>
> > "The click() method allows you to simulate a click on a form field.
> > Checkboxes get toggled, radios selected, and so on. Unfortunately Mozilla
> > and Opera haven't added this method to file upload fields. I wonder why,
> > adding it is not really a security risk since the worst that can happen is
> > that the file selection window pops up.
>
> > So unfortunately we cannot use this simple solution."
>
> > I hadn't tried your "trigger" method. Did you test it in FF? I just did and
> > unfortunately as said on quirksmode that does not work :( but it does on
> > everything else.
>
> > What else do you suggest?
>
> > Thanks
>
> > Steffan
>
> > ---
> > T E L  6 0 2 . 7 9 3 . 0 0 1 4 | F A X  6 0 2 . 9 7 1 . 1 6 9 4
> > Steffan A. Cline
> > [EMAIL PROTECTED] Phoenix, 
> > Azhttp://www.ExecuChoice.netUSA
> > AIM : SteffanC  ICQ : 57234309
> > YAHOO : Steffan_Cline   MSN : [EMAIL PROTECTED]
> > GOOGLE: Steffan.Cline Lasso Partner Alliance Member
> > ---


[jQuery] Re: File inputs

2008-01-31 Thread Diego A.

I've tried for a long time to do this and as far as I know: it just
can't be done. Perhaps the next generation of browsers will allow us
developers to call the file seclection box like this
"window.chooseFile", just like we can use "window.prompt"...

If this does turn out to be possible, eventually, then I'll add it to
my multiple file upload plugin...

On Jan 30, 4:11 am, "Steffan A. Cline" <[EMAIL PROTECTED]> wrote:
> on 1/29/08 7:58 PM, Hamish Campbell at [EMAIL PROTECTED] wrote:
>
>
>
>
>
> > Some code would be useful - you've said that .click() doesn't work in
> > FF, but it probably isn't the .click() bit that isn't working.
>
> > One suggestion (untested) is that you include both the normal button
> > and the new image, but hide the image with CSS by default. This means
> > that if JS is disabled, the user can still click the normal button.
>
> > Then with jQuery, hide the button and show the image on
> > document.ready. Then apply a trigger to the image that fires the
> > normal button action. It means you shouldn't need to code anything
> > special - just piggy-back on the usual action of the button.
>
> > Eg:
>
> > $("#myImage").click(function () {
> >   $("#fileButton").trigger('click');
> > });
>
> > On Jan 30, 8:01 am, "Steffan A. Cline" <[EMAIL PROTECTED]> wrote:
> >> on 1/29/08 11:57 AM, Mika Tuupola at [EMAIL PROTECTED] wrote:
>
> >>> On Jan 29, 2008, at 7:08 PM, Steffan A. Cline wrote:
>
>  I know there is a plug-in for styling file inputs but what about
>  using a
>  custom image instead? I need to do something where I have an ADD and a
>  DELETE button side by side. I tried this using .click() and it worked
>  flawlessly but alas FF does not support it! How stupid!.
>
> >>> What are you trying to achieve? What does ADD and DELETE buttons do?
>
> >>> --
> >>> Mika Tuupola
> >>>http://www.appelsiini.net/
>
> >> The add button would simply pop up the file selector as clicking on the
> >> actual file button would do. The delete button would set a hidden flag to
> >> remove the stored file.
>
> >> See the previous thread ".click()" This described the previous method which
> >> I gave up on.
>
> >> Thanks
>
> >> Steffan
>
> Well, I tried many variations of .click() with FF and according to this
> link:
>
> http://www.quirksmode.org/dom/inputfile.html
>
> reads:
>
> "The click() method allows you to simulate a click on a form field.
> Checkboxes get toggled, radios selected, and so on. Unfortunately Mozilla
> and Opera haven't added this method to file upload fields. I wonder why,
> adding it is not really a security risk since the worst that can happen is
> that the file selection window pops up.
>
> So unfortunately we cannot use this simple solution."
>
> I hadn't tried your "trigger" method. Did you test it in FF? I just did and
> unfortunately as said on quirksmode that does not work :( but it does on
> everything else.
>
> What else do you suggest?
>
> Thanks
>
> Steffan
>
> ---
> T E L  6 0 2 . 7 9 3 . 0 0 1 4 | F A X  6 0 2 . 9 7 1 . 1 6 9 4
> Steffan A. Cline
> [EMAIL PROTECTED] Phoenix, 
> Azhttp://www.ExecuChoice.net USA
> AIM : SteffanC  ICQ : 57234309
> YAHOO : Steffan_Cline   MSN : [EMAIL PROTECTED]
> GOOGLE: Steffan.Cline Lasso Partner Alliance Member
> ---


[jQuery] Re: How do I stop the form control (but not the label) itself receiving the "error" class

2008-01-24 Thread Diego A.

Seems like everything you need is right here:
http://docs.jquery.com/Plugins/Validation#Error_messages

QUOTE:
Error messages
An error message displays a hint for the user about invalid elements,
and what is wrong. There are three ways to provide error messages. Via
the title attribute of the input element to validate, via error labels
and via plugin settings (option messages).


On Jan 24, 12:05 pm, Dave Stewart <[EMAIL PROTECTED]>
wrote:
> SORRY - the word [jQuery Validation Plugin] was supposed to appear in
> the title, but didn't.
>
> To restate the problem:
>
> When I validate a form using the jQuery Validation Plugin, when it
> comes across a form element that doesn't validat, it does 2 things:
>
> 1. Adds, or shows the corresponding error  tag, and
> 2. Adds the "error" class to the form element.
>
> I only want to do the first action, and I don't want the form element
> to be altered.
>
> Is this possible?
> Thanks,
> Dave


[jQuery] Re: Autocomplete with ComboBox

2008-01-24 Thread Diego A.

There's no need for a new plugin. This is all down to your
implementation.

1. Create the state autocomplete field.
2. Use the callback function to create the city autocomplete field
(pointing to the list of cities of the selected state).

Done :-)

On Jan 24, 4:33 pm, Feijó <[EMAIL PROTECTED]> wrote:
> I've been seen people trying to do that
> A combo with State, after selected one, the Edit field sould autocomplete 
> with cities from within that state, not all of them.
> How can this be done?  There is any page about that on jquery docs?  If not 
> why don't we do that?
> I voluntere, with group help off course :)-- regards Feijó


[jQuery] Re: How to add vars to my data object

2008-01-24 Thread Diego A.

var myDatavar = {x:1, y: 10, g:2}
$.extend(myDatavar,
 {a:1, b:20, c:3},
 {f:1, g:56, h:8}
 // and so on...
);

RESULT:
myDatavar = {
 a:1, b:20, c:3, f:1, g:56, h:8, x:1, y:10
};

Hope that helps...

On Jan 24, 10:17 am, Woutse <[EMAIL PROTECTED]> wrote:
> I've been searching but couldn't find how to add variables to my data
> object.
>
> I want to make an ajax requst with $.ajax, but before i do that, i
> want to 'build'  the myDatavar.
> That looks something like this:
>
> ---
> var myDatavar = { name:'woutse', age:'91'} ;
>
> var obj = document.getElementsByName('country');
> for(i=0;i {
>  if (obj[i].type=='text')
>  {
>  if (obj[i].value!=obj[(i-1)].value)
>  {
>   /// U can see what im trying to de here,
> but this doesnt work
>  var t = { 'ctr['+obj[i].alt+'] tr' : obj[i].value };
> $.merge(myDatavar , t);
> }
>   }
>
> }
>
> $.ajax({
>   type: 'POST',
>   url:'http://www.tinpay.nl/textadmin/save/',
>   data: myDatavar,
>   dataType: 'text',
>   success: function(data) { refreshData();  },
>   error: function () {  alert('error'); }
> });
>
> So, how to add data to a object-variable?
>
> thanks in advance,
> woutse


[jQuery] Re: using a different tag than for error messages

2008-01-24 Thread Diego A.

CODE?

And why have you posted this twice?

On Jan 24, 10:00 am, Dave Stewart <[EMAIL PROTECTED]>
wrote:
> Hello,
> I'd rather not use  tags for my error messages, as I think
> s are less semantically ambiguous.
> Is there any way I can change the default functionality?
> At the moment I'm placing my own error s manually, but I can't
> get them to show unless I change them to s
>
> Help!
>
> And thanks very much.
> Cheers,
> Dave


[jQuery] Re: How do I stop the form control (but not the label) itself receiving the "error" class

2008-01-24 Thread Diego A.

Depends entirely on your code?
What gives the input the 'error' class in the first place?

On Jan 24, 9:58 am, Dave Stewart <[EMAIL PROTECTED]>
wrote:
> Pretty much sums it up really.
> I only want the error label (of class "error") to be displayed, but
> not the class of the text box or such like to have it's class updated.
> Thanks,
> Dave


[jQuery] Re: xml parsing - what am i doing wrong?

2008-01-21 Thread Diego A.

Where do you define "datascape.anchors"?
You use it as the context for this line, but you don't seem to have
defined it anywhere.
var thisDS = $('scape[title="'+UI.section+'"]', datascape.anchors);

Also, your jquery call is returning the jQuery version of the XML to
nowhere.

All you need to do is put the processing within the ajax call:

datascape.getAllAnchors = function(){
$.get("projects/datascapes.xml",function(){
datascape.anchors = $(data);
var thisDS = $('scape[title="'+UI.section+'"]',
datascape.anchors);
var dsAnchorVar = $('item[title="' + $proj +
'"]',thisDS).parents('col').attr('title');
$.log("anchor "+$proj+"= "+ dsAnchorVar );

});

}


On Jan 21, 2:41 pm, "Alexandre Plennevaux" <[EMAIL PROTECTED]>
wrote:
> Hello,
>
> i'm loading a bit of xml and i'm trying to use the loaded data, but i 'm 
> unsuccessful traversing it so far. Can you tell me what i'm doing wrong?
>
> here is the loading code:
>
> datascape.getAllAnchors = function(){
> $.get("projects/datascapes.xml",function(data){
> return $(data);
> });
>
> }
>
> then further down, i need to retrieve an item's parent  col element "title" 
> attribute.
>
> jQuery(function($){
>
> ...
>
> var thisDS = $('scape[title="'+UI.section+'"]', datascape.anchors);
> var dsAnchorVar = $('item[title="' + $proj + 
> '"]',thisDS).parents('col').attr('title');
> $.log("anchor "+$proj+"= "+ dsAnchorVar );
>
> });
>
> the console keeps on showing dsAnchorVar as "undefined"
>
> the xml file:
>
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>
> 
> 
>
> Thanks for any help,
>
> Alexandre


[jQuery] Re: Is there a way to hide the script

2008-01-21 Thread Diego A.

You need to help people help you. Why did it not work? did you get any
error messages?

Have you read some basic tutorials on how to do it?
http://www.google.co.uk/search?q=external+js+file+tutorial


On Jan 21, 3:52 pm, DeaR <[EMAIL PROTECTED]> wrote:
> I've tried already putting all the scripts in a file, and imported it into
> the html file like  and it didn't work
> as supposed to..
>
>
>
> Fabien Meghazi-2 wrote:
>
> >> If I make a long jQuery script, and when the webpage is loaded, when we
> >> look
> >> at the source code, then everyone will be able to see the jQuery script.
> >> Are
> >> there any ways to get this hidden. I wanna hide these scripts for SEO
> >> reason
> >> as well...
>
> > Why don't you put your code in a .js file that you include in your
> > html with the 

[jQuery] Re: Plugin updated: FCKEditor, Codepress, Multiple File Upload & Star Rating

2008-01-21 Thread Diego A.
Hi,

I only keep the English language files on my website.
But the jQuery Plugin will still work fine with your installation of FCK
(and your language files).

Thanks,
Diego A.

On 21/01/2008, Miguelito <[EMAIL PROTECTED]> wrote:
>
>
>
> HI, demo not working:
>
> FCKLang is not defined
> http://www.fyneworks.com/fwx/inc/fck/editor/js/fckeditorcode_gecko.js
> Line 99
>
> IE7 Spanish and FF Spanish.
>
> Thanks.
>
>
> Diego A. wrote:
> >
> >
> > Hey everyone,
> >
> > Quick note to all those using any of my plugins, they've all been
> > updated this week and had a few (*cough*) bugs fixed. I recommend you
> > download the latest versions...
> >
> > FCKEditor Plugin: http://www.fyneworks.com/jquery/FCKEditor/
> > Codepress Plugin: http://www.fyneworks.com/jquery/Codepress/
> > Multiple File Upload Plugin:
> > http://www.fyneworks.com/jquery/multiple-file-upload/
> > Star Rating Plugin: http://www.fyneworks.com/jquery/star-rating/
> >
> > Cheers,
> > Diego
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Plugin-updated%3A-FCKEditor%2C-Codepress%2C-Multiple-File-Upload---Star--Rating-tp14803348s27240p14994717.html
> Sent from the jQuery General Discussion mailing list archive at Nabble.com
> .
>
>
> >
>


[jQuery] Re: Weird bahaviour of validation plugin in a textarea used by fckeditor

2008-01-17 Thread Diego A.
Good stuff! Case closed! ;-)

On 16/01/2008, psy* <[EMAIL PROTECTED]> wrote:
>
>
> Thanks :) Got some other help from the author:
>
> An additional filter method:
>
> $.validator.addMethod("strippedminlength", function(value, element, param)
> {
>   return $(value).text().length >= param
> }, $.format("Please enter at least {0} characters"));
>
> and a class using this method:
>
> class="{required:true,strippedminlength:5}"
>
> That works great :)
>
>
> Diego A. schrieb:
> > That depends on how the validation is being performed.
> > Just find the line in the code that says:
> > if(s.length<5){ ...
> > and change it to:
> > if(s.replace(/\<[\s\S]+\>/gi,'').length<5){ ...
> >
> > this code:
> > .replace(/\<[\s\S]+\>/gi,'')
> > ...will remove anything within < and >, then you can check if the
> > actual text is longer than 5 chars, without any code
> >
> > On Jan 16, 10:47 am, psy* <[EMAIL PROTECTED]> wrote:
> >> Ok thanks, I got it to work properly with fckeditor now (with
> >> initialization and check)! Thanks again for your nice and fast help!
> >>
> >> But I have one more question: Do you know if it's possible to strip
> html
> >> tags when checking for the length of the typed in content because when
> I
> >> type in let's say 2 chars, than fckeditor will add the "" and ""
> >> tag around it and so the check won't cause the error to type in at
> least
> >> 5 chars ... Do you know how to fix that?
> >>
> >> Thanks!
> >>
> >> Diego A. schrieb:
> >>
> >>> OH, I see. FCKEditor doesn't update when you click the submit button.
> >>> You have to add an onclick event to the submit button to make sure
> >>> FCKEditor has updated the textarea.
> >>> Download the FCKEditor plugin, use it to initialize the FCKEditor then
> >>> use the $.fck.update() method.
> >>> ie.:  >>> On Jan 16, 10:28 am, "Diego A." <[EMAIL PROTECTED]> wrote:
> >>>> Are you the same person with 2 different logins?
> >>>> I don't get a javascript error, I get a validation error:
> >>>> "Bitte gebe einen Inhalt ein (mindestens 5 Zeichen)"
> >>>> ...which according to Google translate means:
> >>>> "Please give a content (at least 5 characters)"
> >>>> So what exactly is the problem?
> >>>> On Jan 15, 7:21 pm, psy* <[EMAIL PROTECTED]> wrote:
> >>>>> Hello,
> >>>>> why not just try it out. For that I did a test page and the
> "tutorial"
> >>>>> how to behave to see what I mean ...
> >>>>> 1) insert sth into the textarea from fckeditor
> >>>>> 2) click on submit button -> the error occurs that you haven't
> entered
> >>>>> at least 5 chars even though I/you have ...
> >>>>> 3) focus the textarea and than again click the submit button ->
> error
> >>>>> goes away and it works as it should ...
> >>>>> and no, I have no ajax submit!
> >>>>> I dunno what's the problem ... it's weird :(
> >>>>> thanks!
> >>>>> Diego A. schrieb:
> >>>>>> You say "the error occurs". What is "the error"?
> >>>>>> That's probably why people haven't replied to help.
> >>>>>> When you need help, it "helps" to be as clear and concise as
> possible.
> >>>>>> Anyway, I assume the problem is that you're trying to submit the
> >>>>>> contents of FCKEditor via ajax. This is not possible without
> >>>>>> explicitly updating the value of the textarea with the contents of
> the
> >>>>>> FCKEditor instance it points to.
> >>>>>> I think you need this:
> >>>>>> http://www.fyneworks.com/jquery/FCKEditor/
> >>>>>> NOTE:
> >>>>>> the jQuery FCKEditor Plugin intercepts the ajaxSubmit function of
> the
> >>>>>> form plugin and explicitly updates the value of the textarea to be
> >>>>>> submitted.
> >>>>>> On Jan 15, 1:05 pm, KnoxBaby <[EMAIL PROTECTED]> wrote:
> >>>>>>> Can anybody help me out? Thanks!
> >>>>>>> On 7 Jan., 14:01, KnoxBaby <[EMAIL PROTECTED]> wrote:
> >>>>>>>> Hello,
> >>>>>>>> look at this page:
> >>>>>>>> http://www.jahlabs.de/jquery/test2/
> >>>>>>>> I'm using validaiton plugin to validate the form, but there is
> the
> >>>>>>>> following weird behaviour:
> >>>>>>>> When I write something to the textbox and click on submit, the
> error
> >>>>>>>> occurs that I have to insert at least 5 characters (even though I
> have
> >>>>>>>> written more than this). Then I click in the textbox and without
> doin
> >>>>>>>> anything there, I click directly again the submit button and it
> works
> >>>>>>>> without any error message...
> >>>>>>>> What's wrong with it?
> >>>>>>>> thanks!
> > >
> >
>
> >
>


[jQuery] Re: Weird bahaviour of validation plugin in a textarea used by fckeditor

2008-01-16 Thread Diego A.

That depends on how the validation is being performed.
Just find the line in the code that says:
if(s.length<5){ ...
and change it to:
if(s.replace(/\<[\s\S]+\>/gi,'').length<5){ ...

this code:
.replace(/\<[\s\S]+\>/gi,'')
...will remove anything within < and >, then you can check if the
actual text is longer than 5 chars, without any code

On Jan 16, 10:47 am, psy* <[EMAIL PROTECTED]> wrote:
> Ok thanks, I got it to work properly with fckeditor now (with
> initialization and check)! Thanks again for your nice and fast help!
>
> But I have one more question: Do you know if it's possible to strip html
> tags when checking for the length of the typed in content because when I
> type in let's say 2 chars, than fckeditor will add the "" and ""
> tag around it and so the check won't cause the error to type in at least
> 5 chars ... Do you know how to fix that?
>
> Thanks!
>
> Diego A. schrieb:
>
> > OH, I see. FCKEditor doesn't update when you click the submit button.
> > You have to add an onclick event to the submit button to make sure
> > FCKEditor has updated the textarea.
>
> > Download the FCKEditor plugin, use it to initialize the FCKEditor then
> > use the $.fck.update() method.
>
> > ie.: 
> > On Jan 16, 10:28 am, "Diego A." <[EMAIL PROTECTED]> wrote:
> >> Are you the same person with 2 different logins?
>
> >> I don't get a javascript error, I get a validation error:
> >> "Bitte gebe einen Inhalt ein (mindestens 5 Zeichen)"
>
> >> ...which according to Google translate means:
> >> "Please give a content (at least 5 characters)"
>
> >> So what exactly is the problem?
>
> >> On Jan 15, 7:21 pm, psy* <[EMAIL PROTECTED]> wrote:
>
> >>> Hello,
> >>> why not just try it out. For that I did a test page and the "tutorial"
> >>> how to behave to see what I mean ...
> >>> 1) insert sth into the textarea from fckeditor
> >>> 2) click on submit button -> the error occurs that you haven't entered
> >>> at least 5 chars even though I/you have ...
> >>> 3) focus the textarea and than again click the submit button -> error
> >>> goes away and it works as it should ...
> >>> and no, I have no ajax submit!
> >>> I dunno what's the problem ... it's weird :(
> >>> thanks!
> >>> Diego A. schrieb:
> >>>> You say "the error occurs". What is "the error"?
> >>>> That's probably why people haven't replied to help.
> >>>> When you need help, it "helps" to be as clear and concise as possible.
> >>>> Anyway, I assume the problem is that you're trying to submit the
> >>>> contents of FCKEditor via ajax. This is not possible without
> >>>> explicitly updating the value of the textarea with the contents of the
> >>>> FCKEditor instance it points to.
> >>>> I think you need this:
> >>>>http://www.fyneworks.com/jquery/FCKEditor/
> >>>> NOTE:
> >>>> the jQuery FCKEditor Plugin intercepts the ajaxSubmit function of the
> >>>> form plugin and explicitly updates the value of the textarea to be
> >>>> submitted.
> >>>> On Jan 15, 1:05 pm, KnoxBaby <[EMAIL PROTECTED]> wrote:
> >>>>> Can anybody help me out? Thanks!
> >>>>> On 7 Jan., 14:01, KnoxBaby <[EMAIL PROTECTED]> wrote:
> >>>>>> Hello,
> >>>>>> look at this page:
> >>>>>>http://www.jahlabs.de/jquery/test2/
> >>>>>> I'm using validaiton plugin to validate the form, but there is the
> >>>>>> following weird behaviour:
> >>>>>> When I write something to the textbox and click on submit, the error
> >>>>>> occurs that I have to insert at least 5 characters (even though I have
> >>>>>> written more than this). Then I click in the textbox and without doin
> >>>>>> anything there, I click directly again the submit button and it works
> >>>>>> without any error message...
> >>>>>> What's wrong with it?
> >>>>>> thanks!


[jQuery] Re: Weird bahaviour of validation plugin in a textarea used by fckeditor

2008-01-16 Thread Diego A.

OH, I see. FCKEditor doesn't update when you click the submit button.
You have to add an onclick event to the submit button to make sure
FCKEditor has updated the textarea.

Download the FCKEditor plugin, use it to initialize the FCKEditor then
use the $.fck.update() method.

ie.:  wrote:
> Are you the same person with 2 different logins?
>
> I don't get a javascript error, I get a validation error:
> "Bitte gebe einen Inhalt ein (mindestens 5 Zeichen)"
>
> ...which according to Google translate means:
> "Please give a content (at least 5 characters)"
>
> So what exactly is the problem?
>
> On Jan 15, 7:21 pm, psy* <[EMAIL PROTECTED]> wrote:
>
> > Hello,
>
> > why not just try it out. For that I did a test page and the "tutorial"
> > how to behave to see what I mean ...
>
> > 1) insert sth into the textarea from fckeditor
> > 2) click on submit button -> the error occurs that you haven't entered
> > at least 5 chars even though I/you have ...
> > 3) focus the textarea and than again click the submit button -> error
> > goes away and it works as it should ...
>
> > and no, I have no ajax submit!
>
> > I dunno what's the problem ... it's weird :(
>
> > thanks!
>
> > Diego A. schrieb:
>
> > > You say "the error occurs". What is "the error"?
> > > That's probably why people haven't replied to help.
>
> > > When you need help, it "helps" to be as clear and concise as possible.
>
> > > Anyway, I assume the problem is that you're trying to submit the
> > > contents of FCKEditor via ajax. This is not possible without
> > > explicitly updating the value of the textarea with the contents of the
> > > FCKEditor instance it points to.
>
> > > I think you need this:
> > >http://www.fyneworks.com/jquery/FCKEditor/
>
> > > NOTE:
> > > the jQuery FCKEditor Plugin intercepts the ajaxSubmit function of the
> > > form plugin and explicitly updates the value of the textarea to be
> > > submitted.
>
> > > On Jan 15, 1:05 pm, KnoxBaby <[EMAIL PROTECTED]> wrote:
> > >> Can anybody help me out? Thanks!
>
> > >> On 7 Jan., 14:01, KnoxBaby <[EMAIL PROTECTED]> wrote:
>
> > >>> Hello,
> > >>> look at this page:
> > >>>http://www.jahlabs.de/jquery/test2/
> > >>> I'm using validaiton plugin to validate the form, but there is the
> > >>> following weird behaviour:
> > >>> When I write something to the textbox and click on submit, the error
> > >>> occurs that I have to insert at least 5 characters (even though I have
> > >>> written more than this). Then I click in the textbox and without doin
> > >>> anything there, I click directly again the submit button and it works
> > >>> without any error message...
> > >>> What's wrong with it?
> > >>> thanks!


[jQuery] Re: Weird bahaviour of validation plugin in a textarea used by fckeditor

2008-01-16 Thread Diego A.

Are you the same person with 2 different logins?

I don't get a javascript error, I get a validation error:
"Bitte gebe einen Inhalt ein (mindestens 5 Zeichen)"

...which according to Google translate means:
"Please give a content (at least 5 characters)"

So what exactly is the problem?

On Jan 15, 7:21 pm, psy* <[EMAIL PROTECTED]> wrote:
> Hello,
>
> why not just try it out. For that I did a test page and the "tutorial"
> how to behave to see what I mean ...
>
> 1) insert sth into the textarea from fckeditor
> 2) click on submit button -> the error occurs that you haven't entered
> at least 5 chars even though I/you have ...
> 3) focus the textarea and than again click the submit button -> error
> goes away and it works as it should ...
>
> and no, I have no ajax submit!
>
> I dunno what's the problem ... it's weird :(
>
> thanks!
>
> Diego A. schrieb:
>
> > You say "the error occurs". What is "the error"?
> > That's probably why people haven't replied to help.
>
> > When you need help, it "helps" to be as clear and concise as possible.
>
> > Anyway, I assume the problem is that you're trying to submit the
> > contents of FCKEditor via ajax. This is not possible without
> > explicitly updating the value of the textarea with the contents of the
> > FCKEditor instance it points to.
>
> > I think you need this:
> >http://www.fyneworks.com/jquery/FCKEditor/
>
> > NOTE:
> > the jQuery FCKEditor Plugin intercepts the ajaxSubmit function of the
> > form plugin and explicitly updates the value of the textarea to be
> > submitted.
>
> > On Jan 15, 1:05 pm, KnoxBaby <[EMAIL PROTECTED]> wrote:
> >> Can anybody help me out? Thanks!
>
> >> On 7 Jan., 14:01, KnoxBaby <[EMAIL PROTECTED]> wrote:
>
> >>> Hello,
> >>> look at this page:
> >>>http://www.jahlabs.de/jquery/test2/
> >>> I'm using validaiton plugin to validate the form, but there is the
> >>> following weird behaviour:
> >>> When I write something to the textbox and click on submit, the error
> >>> occurs that I have to insert at least 5 characters (even though I have
> >>> written more than this). Then I click in the textbox and without doin
> >>> anything there, I click directly again the submit button and it works
> >>> without any error message...
> >>> What's wrong with it?
> >>> thanks!


[jQuery] Re: Weird bahaviour of validation plugin in a textarea used by fckeditor

2008-01-15 Thread Diego A.

You say "the error occurs". What is "the error"?
That's probably why people haven't replied to help.

When you need help, it "helps" to be as clear and concise as possible.

Anyway, I assume the problem is that you're trying to submit the
contents of FCKEditor via ajax. This is not possible without
explicitly updating the value of the textarea with the contents of the
FCKEditor instance it points to.

I think you need this:
http://www.fyneworks.com/jquery/FCKEditor/

NOTE:
the jQuery FCKEditor Plugin intercepts the ajaxSubmit function of the
form plugin and explicitly updates the value of the textarea to be
submitted.

On Jan 15, 1:05 pm, KnoxBaby <[EMAIL PROTECTED]> wrote:
> Can anybody help me out? Thanks!
>
> On 7 Jan., 14:01, KnoxBaby <[EMAIL PROTECTED]> wrote:
>
> > Hello,
>
> > look at this page:
>
> >http://www.jahlabs.de/jquery/test2/
>
> > I'm using validaiton plugin to validate the form, but there is the
> > following weird behaviour:
>
> > When I write something to the textbox and click on submit, the error
> > occurs that I have to insert at least 5 characters (even though I have
> > written more than this). Then I click in the textbox and without doin
> > anything there, I click directly again the submit button and it works
> > without any error message...
>
> > What's wrong with it?
>
> > thanks!


[jQuery] Re: jQuery Form Plugin, and ajax submit without submit button

2008-01-15 Thread Diego A.

You haven't installed the plugin properly, or you haven't specified
the "action" attribute of the form.

double check everything and make sure you READ the jQuery Form plugin
documentation:
http://www.malsup.com/jquery/form/

On Jan 15, 1:14 pm, Giovanni Battista Lenoci <[EMAIL PROTECTED]>
wrote:
> Diego A. ha scritto:> Use the ajaxSubmit method:
> > $('#form_id').ajaxSubmit()
>
> I've tried your way, but still have errors when I call
> $('#form_id').ajaxSubmit():
>
> options.url.indexOf is not a function
>  options.url += (options.url.indexOf('?') >= 0 ? '&' : '?') + q;
>
> jquery.form.js (line 209)
>
> If I submit the form with the submit button anything works..
>
> Thank you.


[jQuery] Re: simple ajax question

2008-01-15 Thread Diego A.

What you actually need is to do whatever someFunc does inside the
success function. If it depends on the result of the ajax call, then
forget someFunc and someVar.

Why can't you just do it like this?
$.ajax({
  type: "GET",
  url: requestURL,
  success: function(msg){
// do the thing someFunc does with someVar
 }
});

On Jan 15, 8:26 am, Ilkinho <[EMAIL PROTECTED]> wrote:
> I have a small ajax issue here:
> function someFunc(){
> var someVar = true;
>
> $.ajax({
>   type: "GET",
>   url: requestURL,
>   success: function(msg){
>   
>  }
> });
>
> }
>
> I have 2 problems:
> 1. I want someFunc to return a value according to the result of the ajax
> request - e.g. if msg is empty to return true, otherwise false. But if I
> attempt to return something, actually the function(msg) returns it somewhere
> and I don't get any result, which is logical since I'm inside an anonymous
> function like function(msg). So i try to assign this variable someVar and
> then return it like:
>
> url: requestURL,
> success: function(msg){
> someVar = false;
>
> }
> });
>
> return someVar;
>
> but it returns true... i suppose someVar is returned before the request is
> completed... so I don't know what to do? Any suggestions?
>
> --
> View this message in 
> context:http://www.nabble.com/simple-ajax-question-tp14833721s27240p14833721
> Sent from the jQuery General Discussion mailing list archive at Nabble.com.


[jQuery] Re: Method to convert dimenions value to ColdFusion variable?

2008-01-15 Thread Diego A.

Hi,

That's what I meant when I said:
1. post it back to the server OR 2. set a cookie that can be read by
the server-side script.

I prefer to just set a cookie. If the cookie isn't set, I send the
client a little script that will set it.

But Ajax sounds like the best option in your case:
1. Load the the page without the "dimension-sensitive" content
2. Send dimensions to server via Ajax
3. The response is the HTML based on the dimensions sent
4. Insert the "dimension-sensitive" content
Voila!

(Warning: this would be terrible for SEO)

On Jan 14, 10:28 pm, "Rick Faircloth" <[EMAIL PROTECTED]>
wrote:
> Hi, Diego... and thanks for the reply.
>
> I know that I can use the Dimensions plug-in to get
> exactly the data that I need, I'm just not sure how to
> get it back to the server.
>
> Ajax?  Or I guess I could set a cookie and ColdFusion read it.
> An ajax method might seem to be more practical.
>
> Thoughts?
>
> Rick
>
> > -Original Message-
> > From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of 
> > Diego A.
> > Sent: Monday, January 14, 2008 4:44 PM
> > To: jQuery (English)
> > Subject: [jQuery] Re: Method to convert dimenions value to ColdFusion 
> > variable?
>
> > There are components you can use, but usually, the only way is to use
> > javascript on the client to calculate the dimensions and then
> > 1. post it back to the server
> > OR
> > 2. set a cookie that can be read by the server-side script
>
> > On Jan 14, 7:34 pm, "Rick Faircloth" <[EMAIL PROTECTED]> wrote:
> > > Hi, all.
>
> > > I guess this would be aimed at those of us who use
> > > jQuery and ColdFusion, but.
>
> > > Is there a way to convert the dimensions of the browser window
> > > to a variables that ColdFusion can use?
>
> > > I'd like to try to get the browser window size of a user,
> > > and create an image on-the-fly using the new image handling tags
> > > in CF8 that would create the largest image possible for the browser
> > > window.
>
> > > To prevent the images based on browser window size from taking too
> > > long to display, I may create a variety of image sizes when the image
> > > is first uploaded and then just call the most appropriate image size
> > > for the browser window.  (That would, however, take up a *lot* of
> > > disk space)
>
> > > Anyone know if this possible or has anyone done it?
>
> > > Thanks,
>
> > > Rick


[jQuery] Re: Autocomplete does not trigger onchange javascript code in input element.

2008-01-14 Thread Diego A.

I work around the same issues with several other plugins as well...
I'll explain how I solve it, maybe that will help others with the same
problem.

* I add my own 'layer' to the initialization of the plugin. *

Instead of...
$('input.autocomplete').autocomplete({ /* options */ });

I do this...
$('input.autocomplete').each(function(){
 var x = this, X = $(this);
 // do stuff...
 X.autocomplete({
  callback: function(event, data, formatted){
   // do stuff...
   X.change();
  }
 });
});

My 'layer' gets a little more complicated because I implement my own
integration methods using the metadata plugin, but this should give
you an idea of how to get started...

On Jan 14, 6:24 pm, dustyt <[EMAIL PROTECTED]> wrote:
> Thanks for the input, Sheldon.
>
> What you have said sounds logical, but I think that I may be
> experiencing a different problem because what I am referring to is
> when something is selected in the dropdown (which puts the selected
> value into the input box) and then the input loses focus, onchange
> apparently does not fire. I would think that this lack of firing
> should not be the default case, so that it would mirror the behavior
> of a select box, or, at least, that the default could be readily
> overridden or that some other event could be tied to in order to have
> similar behavior to a select box.
>
> Also, I would prefer to have the updatePartyAddress function called
> only when the input loses focus and has changed its value and
> therefore do not much like the idea of tying the updatePartyAddress
> function to onkeyup.
>
> I can possibly see how to correctly call the updatePartyAddress
> function directly if the autocomplete function selectItem() is called
> when an item is selected in an autocomplete dropdown and onItemSelect
> points to a function that I can have call updatePartyAddress and I
> have a reference to the particular input box  that has had its value
> selected. So far, though, I do not know how to programmatically refer
> to the input box that has had its value changed so that I can call
> updatePartyAddress with a reference to this input box (and with a
> value that now has to be extracted from its name but that was directly
> written into the previously used onchange JavaScript function--unless
> I can call the onchange function directly).
>
> Mark Thompson
>
> On Jan 11, 1:40 pm, Sheldon Griffin <[EMAIL PROTECTED]> wrote:
>
> > Keep in mind that the onchange event for a text input box is only
> > fired when the input loses focus. Tying your updatePartyAddress
> > function to onkeyup instead of onchange is one way to get it to fire
> > after every letter.
>
> > That being said, it should be firing if you type in some letters and
> > click on the page outside the box - if it's still not firing in that
> > situation, it's a different problem.
>
> > Sheldon Griffin
>
> > On Jan 10, 1:16 pm, dustyt <[EMAIL PROTECTED]> wrote:
>
> > > I am trying to replace a previous bit of html that managed input by
> > > both an input and a select box with a single input field using
> > > jquery.autocomplete.js, but I have not been able to getautocomplete
> > > to use the onchange JavaScript code used by that previous bit of html.
> > > I have gottenautocompleteto display and select all the values
> > > correctly in multiple analogous fields on the same form, but I do not
> > > know how to have it trigger the code that was previously run under an
> > > onchange event. Unfortunately, I do not understand much of the jquery
> > > andautocompletecode, and I am only moderately more familiar with
> > > JavaScript.
>
> > > I am sorry if this is somewhat of a duplicate message. I posted a
> > > message last night under the same nickname, dustyt, but from a
> > > different account, [EMAIL PROTECTED] I cannot now access the
> > > group from this account (I can read messages--although I do not see my
> > > posting from last night--but the group wants me to join before
> > > posting, yet I am already a member) due to some weirdness with Google
> > > and signing in. When I joined the group last night, it gave me access
> > > to the Members, but now says that I must be a manager to do so or that
> > > jquery_en is not a group. More weirdness.
>
> > > Here is a bit of the current relevant code:
> > >> > name="city<%=addID%>" size="30" maxlength="120" value="" onchange="javascript: updatePartyAddress(this,
> > > <%=addID%>);" >
> > > ...
> > > var idList  = "<%=addIDStringBuffer.toString()%>";
> > > var idArray = idList.split(",");
>
> > > $(document).ready(function() {
> > >   for(var i=0; i< idArray.length; i++) {
> > > $("#city"+idArray[i]).autocompleteArray(
> > >   [
> > > <%=cityList.toString()%>
> > >   ],
> > >   {
> > > delay:10,
> > > minChars:1,
> > > matchSubset:1,
> > > onItemSelect:selectItem,
> > > onFindValue:findValue,
> > > autoFill:true,
> > > maxItemsToShow:10
> > >   }
> > > )

[jQuery] Re: Plugin updated: FCKEditor, Codepress, Multiple File Upload & Star Rating

2008-01-14 Thread Diego A.

Thanks Karl, I really appreciate your feedback - specially coming
from . I had planned (if you don't mind) to use your work on the half-
star rating plugin as the basis for the new features... I hope that's
OK.

PS.: learningjquery.com seems to be down at the moment (just in case
you hadn't noticed)
http://www.learningjquery.com/2007/05/half-star-rating-plugin

On Jan 14, 9:41 pm, Karl Swedberg <[EMAIL PROTECTED]> wrote:
> Fantastic, Diego! That's really exciting news. I was about to start
> work on a semantically-correct half-star rating plugin myself, but I'm
> happy to be able to scratch it off my list now. Actually, I only
> converted Ritesh's plugin to half-star in the first place because
> someone asked for that one specifically to have the added feature.
> It's not a bad plugin, but I much prefer writing JS that gracefully
> degrades.
>
> Thanks a lot for putting the time into this!
>
> --Karl
> _
> Karl Swedbergwww.englishrules.comwww.learningjquery.com
>
> On Jan 14, 2008, at 4:34 PM, Diego A. wrote:
>
>
>
> > Hi Karl,
>
> > I came across the star rating plugin because I needed one myself.
>
> > There were many variations, but I narrowed the list down to 2. One was
> > the Half-Star rating control and the other was PHPLetter's downgrade-
> > able star rating control. I decided to build upon the 'semantically
> > correct' version and then work towards the other advanced features
> > such as half-ratings, custom images, on/off toggle, etc...
>
> > I will develop all those features in the coming weeks and post the
> > updates here for anyone who's interested...
>
> > Thanks guys,
> > Diego
>
> > On Jan 14, 5:49 pm, Karl Swedberg <[EMAIL PROTECTED]> wrote:
> >> hey Diego,
>
> >> I love what you've done with the Star Rating Plugin! Excellent work.
> >> One question: can it be used with 1/2 star values? If so, I think it
> >> would be great for people to see an example of that on the demo page
> >> (if there is such an example, please forgive my oversight).
>
> >> thanks,
>
> >> --Karl
> >> _
> >> Karl Swedbergwww.englishrules.comwww.learningjquery.com
>
> >> On Jan 14, 2008, at 9:42 AM, Diego A. wrote:
>
> >>> Hey everyone,
>
> >>> Quick note to all those using any of my plugins, they've all been
> >>> updated this week and had a few (*cough*) bugs fixed. I recommend
> >>> you
> >>> download the latest versions...
>
> >>> FCKEditor Plugin:http://www.fyneworks.com/jquery/FCKEditor/
> >>> Codepress Plugin:http://www.fyneworks.com/jquery/Codepress/
> >>> Multiple File Upload 
> >>> Plugin:http://www.fyneworks.com/jquery/multiple-file-upload/
> >>> Star Rating Plugin:http://www.fyneworks.com/jquery/star-rating/
>
> >>> Cheers,
> >>> Diego


[jQuery] Re: Method to convert dimenions value to ColdFusion variable?

2008-01-14 Thread Diego A.

There are components you can use, but usually, the only way is to use
javascript on the client to calculate the dimensions and then
1. post it back to the server
OR
2. set a cookie that can be read by the server-side script

On Jan 14, 7:34 pm, "Rick Faircloth" <[EMAIL PROTECTED]> wrote:
> Hi, all.
>
> I guess this would be aimed at those of us who use
> jQuery and ColdFusion, but.
>
> Is there a way to convert the dimensions of the browser window
> to a variables that ColdFusion can use?
>
> I'd like to try to get the browser window size of a user,
> and create an image on-the-fly using the new image handling tags
> in CF8 that would create the largest image possible for the browser
> window.
>
> To prevent the images based on browser window size from taking too
> long to display, I may create a variety of image sizes when the image
> is first uploaded and then just call the most appropriate image size
> for the browser window.  (That would, however, take up a *lot* of
> disk space)
>
> Anyone know if this possible or has anyone done it?
>
> Thanks,
>
> Rick


[jQuery] Re: Plugin updated: FCKEditor, Codepress, Multiple File Upload & Star Rating

2008-01-14 Thread Diego A.

Hi Karl,

I came across the star rating plugin because I needed one myself.

There were many variations, but I narrowed the list down to 2. One was
the Half-Star rating control and the other was PHPLetter's downgrade-
able star rating control. I decided to build upon the 'semantically
correct' version and then work towards the other advanced features
such as half-ratings, custom images, on/off toggle, etc...

I will develop all those features in the coming weeks and post the
updates here for anyone who's interested...

Thanks guys,
Diego

On Jan 14, 5:49 pm, Karl Swedberg <[EMAIL PROTECTED]> wrote:
> hey Diego,
>
> I love what you've done with the Star Rating Plugin! Excellent work.
> One question: can it be used with 1/2 star values? If so, I think it
> would be great for people to see an example of that on the demo page
> (if there is such an example, please forgive my oversight).
>
> thanks,
>
> --Karl
> _
> Karl Swedbergwww.englishrules.comwww.learningjquery.com
>
> On Jan 14, 2008, at 9:42 AM, Diego A. wrote:
>
>
>
> > Hey everyone,
>
> > Quick note to all those using any of my plugins, they've all been
> > updated this week and had a few (*cough*) bugs fixed. I recommend you
> > download the latest versions...
>
> > FCKEditor Plugin:http://www.fyneworks.com/jquery/FCKEditor/
> > Codepress Plugin:http://www.fyneworks.com/jquery/Codepress/
> > Multiple File Upload 
> > Plugin:http://www.fyneworks.com/jquery/multiple-file-upload/
> > Star Rating Plugin:http://www.fyneworks.com/jquery/star-rating/
>
> > Cheers,
> > Diego


[jQuery] Re: jQuery Form Plugin, and ajax submit without submit button

2008-01-14 Thread Diego A.

Use the ajaxSubmit method:
$('#form_id').ajaxSubmit()

1. jQuery ajaxSubmit()
be.twixt.us/jquery/formSubmission.php

2. jQuery Form Plugin
www.malsup.com/jquery/form/

On Jan 14, 3:58 pm, Giovanni Battista Lenoci <[EMAIL PROTECTED]>
wrote:
> Hi, I'm using this fantastic plugin but if I try to submit the form
> using
>
> $('#form_id')[0].submit() the ajaxform it's not fired, it behaves like
> it's a normal form, and I'm redirected to the ajax page.
>
> What I want to do is to submit the form when I check a checkbox.
>
> Can you help me?
>
> thank you


[jQuery] Plugin updated: FCKEditor, Codepress, Multiple File Upload & Star Rating

2008-01-14 Thread Diego A.

Hey everyone,

Quick note to all those using any of my plugins, they've all been
updated this week and had a few (*cough*) bugs fixed. I recommend you
download the latest versions...

FCKEditor Plugin: http://www.fyneworks.com/jquery/FCKEditor/
Codepress Plugin: http://www.fyneworks.com/jquery/Codepress/
Multiple File Upload Plugin: 
http://www.fyneworks.com/jquery/multiple-file-upload/
Star Rating Plugin: http://www.fyneworks.com/jquery/star-rating/

Cheers,
Diego


[jQuery] Re: Metadata plugin performance issues

2007-09-23 Thread Diego A.

I'm not arguing with you either, and I'm not discrediting your method.
I was intrigued to know more because we had similar requirements and
went in different directions. I see the benefits of your method. It is
without a doubt the fastest and most efficient of the two.

> With the metadata plugin, I did:
> 
> 
> {field1: 'value1', field2: 'value2'}
> 

I do it like this:

It costs more performance-wise, but I think it is worth it in terms of
flexibility and clarity, which is why I went out of my way to fine-
tune the metadata plugin.

About short-circuiting, I said it was un-reliable because it wasn't
being used by my browser. Now I've looked over the original code and
realised that the original statement was:
if ( this.nodeType == 9 || $.isXMLDoc(this) || this.metaDone ) return;
...when it should have been...
if ( this.metaDone || this.nodeType == 9 || $.isXMLDoc(this) ) return;
...in order for short-circuiting to work. Indeed, this would have
stopped $.isXMLDoc(this) being executed over and over again.

Thanks,
Diego A.

On Sep 22, 10:05 pm, "Erik Beeson" <[EMAIL PROTECTED]> wrote:
> > I didn't know about logical operator short-circuiting, thanks for the
> > info - it's good to know.
>
> > But this obviously wasn't in place on my tests or I wouldn't have got
> > the results I did. So I don't think logical operator short-circuiting
> > is a reliable enough solution to this problem...
>
> Why wouldn't it be reliable?
>
> I considered doing exactly what you did - using a global variable to
>
> > store metadata - but even then don't you have 2 issues with that?
>
> With the metadata plugin, I did:
> 
> 
> {field1: 'value1', field2: 'value2'}
> 
> ...
> 
>
> Now I do:
> 
> 
> myNamespace.myData['div1'] = {field1: 'value1', field2: 'value2'};
> 
> ...
> 
>
> 1. lazy programming because you end up evaluating things before you
>
> > actually need them
>
> My "data" is generally just simple key/value pairs, there's little
> "evaluation" going on in terms of processing. In terms of storage, I think
> it's more efficient because with the metadata plugin, the data is stored
> first in the DOM, and then again as JavaScript objects once you access the
> data. Plus I think the overhead of all of the processing that the metadata
> plugin does is slower than just accessing a variable.
>
> 2. a nightmare mapping the metadata to its owner elements?
>
>
>
> In my case, I have a guaranteed unique ID for each chunk of data, so access
> goes from $('#id')[0].data with the plugin to myNamespace.myData['id'] the
> way I do it now.
>
> But I'm not arguing that you shouldn't use it. If it's working for you,
> that's great. My main comment was that you could use the short-circuiting.
>
> --Erik



[jQuery] Re: Metadata plugin performance issues

2007-09-22 Thread Diego A.

Hi Erik,

I didn't know about logical operator short-circuiting, thanks for the
info - it's good to know.

But this obviously wasn't in place on my tests or I wouldn't have got
the results I did. So I don't think logical operator short-circuiting
is a reliable enough solution to this problem...

I considered doing exactly what you did - using a global variable to
store metadata - but even then don't you have 2 issues with that?
1. lazy programming because you end up evaluating things before you
actually need them
2. a nightmare mapping the metadata to its owner elements
?

The flexibility provided by the metadata plugin is just too good and I
can't think of another method that is worth while using...

On Sep 21, 8:32 pm, "Erik Beeson" <[EMAIL PROTECTED]> wrote:
> Thanks for this info. I eventually gave up on the metadata plugin in favor
> of a global variable for holding my metadata. So instead of
> $('#someID')[0].data, I now just do mynamespace.mydata['someID'].
>
> You mention breaking up the if statement to keep a function call from
> happening. Thanks to logical operator short-circuiting, all you have to do
> is move this.metaDone to before the function call, like so:
>
> if ( this.metaDone || this.nodeType == 9 || $.isXMLDoc(this) ) return;
>
> See here for more 
> info:http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Op...
>
> --Erik
>
> On 9/21/07, Diego A. <[EMAIL PROTECTED]> wrote:
>
>
>
> > I've written a short article about Metadata plugin performance issues
> > in my blog:
>
> >http://fyneworks.blogspot.com/2007/09/jquery-metadata-plugin-performa...
>
> > I was wondering what you guys think about it...
> > ...also might help people with the same problem.



[jQuery] Metadata plugin performance issues

2007-09-21 Thread Diego A.

I've written a short article about Metadata plugin performance issues
in my blog:
http://fyneworks.blogspot.com/2007/09/jquery-metadata-plugin-performance.html

I was wondering what you guys think about it...
...also might help people with the same problem.



[jQuery] Re: Form Input Lookup

2007-08-30 Thread Diego A.

Start here:
http://www.google.co.uk/search?q=jquery+autocomplete&sourceid=navclient-ff&ie=UTF-8&rls=GGGL,GGGL:2006-14,GGGL:en


On Aug 30, 9:33 am, Phunky <[EMAIL PROTECTED]> wrote:
> Hello, please do excuse my lack of knowledge with JS and JQuery but i
> have attempted to avoid everything JS for many years as i just did not
> like it.
>
> Although JQuery did make some simple aspects more manageable i still
> try to avoid it... but sadly now i need to work with AJAX to make
> aspects of a project more simple for its users :D
>
> I am currently trying to create a Username Look up function with
> JQuery and i am trying to learn how to do this by hacking up the
> jquery.autocomplete plugin i stumbled apon via pengoworks.com.
>
> But i feel im failing as i dont quite understand what is happening
> with the script and this means im not really learning anything along
> the way - which is not good for me in the long run as i would like to
> finally get my head around JS ;)
>
> So if someone would like to step me in the right direction to what i
> need to look at for creating a simple JQuery plugin/function that
> would allow me to
>
> 1: Grab the value of a form input
> 2: Grab results of a .php page via AJAX ( $.get()?? )
> 3: Check through the AJAX results ( should i return the data as JSON?
> or just | it? )
> 4: If there is a match / likeness for what is in the form input
> addClass('error') IF NOT addClass('accept')
>
> Quite simple really, but with my head my arse regarding JS im not 100%
> sure what i should be looking to get through the points.
>
> If someone could just point me to the correct aspects of the API or
> Help pages that would be great.
>
> Many thanks for any help and sorry if im just being a twittering
> little JS noob :(



[jQuery] Re: Dimensions 1.1 Released

2007-08-13 Thread Diego A.

Great work Brandon. I'm so glad I can rely on your dimensions plugin
to do some of my dirty work... lol

Thanks!
Diego A.

On Aug 13, 5:34 am, "Brandon Aaron" <[EMAIL PROTECTED]> wrote:
> I just released Dimensions 1.1. It includes an option to include margin for
> the outerWidth and outerHeight methods. I've also fixed the issues with
> Safari 3 and the offset method. The docs have also been udpated for 1.1. As
> usual you can grab the latest from the Dimensions project page. Note that
> this update requires jQuery 1.1.3.
>
> project page:http://jquery.com/plugins/project/dimensions/
> docs:http://brandonaaron.net/docs/dimensions/
>
> --
> Brandon Aaron



[jQuery] jQuery Multiple Upload Plugin v1.23

2007-08-13 Thread Diego A.

Just quick a message to anyone using the jQuery Multiple Upload
Plugin.

New version: http://www.fyneworks.com/jquery/multiple-file-upload/
- copies original element attributes for new elements

This is more of a 'heads up', but as usual, feedback will be welcomed.

Thanks,
Diego A.



[jQuery] Re: WYSIWYG Editing with Form Plugin

2007-08-01 Thread Diego A.
Well, it's not going to work without the plugin.
So use the plugin and let's find the problem...

On 31/07/07, Shaun Kester <[EMAIL PROTECTED]> wrote:
>
> I realize that. I've tried this dozens of different ways. When I use your
> plugin I end up with a url of
> http://sc1fs003/administration/?FCKeditor1=%3Cp%3E%3Cstrong%3Etest%3C%2Fstrong%3E%3C%2Fp%3E&ItemSave=Save#and
>  nothing in the post.
>
> Thank you very much for your help so far.
>
> On 7/31/07, Diego A. <[EMAIL PROTECTED]> wrote:
>
> > Shaun,
> >
> > You haven't used the plugin. The script wasn't loaded. So the
> > 'ajaxSubmit' method wasn't intercepted. Please read installation
> > instructions here:
> > http://www.fyneworks.com/jquery/FCKEditor/
> >
> > Cheers,
> > Diego A.
> >
> > On 31/07/07, Shaun Kester <[EMAIL PROTECTED] > wrote:
> >
> > >
> > > I've got everything working except that it takes two submit for the
> > > data to make it to the server.
> > >
> > > Example: http://209.97.223.72/administration/
> > > Username: admin
> > > Password: admin
> > >
> > > 1. Login with above info
> > > 2. Click the first link 'Site Content'
> > > 3. Click the first page 'Business'
> > > 4. Enter text, click "Save" below editor. The alert response is the
> > > content of the POST. Clicking it again will send the right content,
> > > but the first one refuses to budge.
> > >
> > > Relevant JS:
> > >
> > > function LoadFunctions() {
> > >
> > > 
> > > $("#Funcs").load('/Admin.scpc?&Prog=Funcs&UserId='+$.cookie('scpc')
> > > +'&NoCache='+new Date().getTime(), function(data){
> > > $('.FuncItems').click(function(){
> > >
> > > 
> > > $("#FuncDetails").load('/Admin.scpc?&Prog=FuncDetails&Type='+$
> > > (this).attr("rel")+'&UserId='+$.cookie('scpc')+'&NoCache='+new
> > > Date().getTime(), function(data){
> > > $('.ItemList').click(function(){
> > > 
> > > $("#main").load('/Admin.scpc?&Prog=EditItem&Type='+$
> > >
> > > (this).attr("rel")+'&ID='+$(this).attr("id")+'&UserId='+
> > > $.cookie('scpc')+'&NoCache='+new Date().getTime(), function(data){
> > > // attach handler to
> > > form's submit event
> > > 
> > > $('#EditItem').submit(function()
> > > {
> > > //Update
> > > fckeditor here with code I don't know. Please help.
> > >
> > > // submit the
> > > form
> > >
> > > 
> > > $(this).ajaxSubmit({url:'/Admin.scpc?&Prog=SaveItem&UserId='+
> > > $.cookie('scpc'), dataType: 'script',type: 'post'});
> > > // return
> > > false to prevent normal browser submit and page
> > > navigation
> > > return false;
> > > });
> > > });
> > > });
> > > });
> > > });
> > > });
> > > }
> > >
> > > On Jul 27, 4:59 pm, "Diego A." < [EMAIL PROTECTED]> wrote:
> > > > I can't understand why this would happen.
> > > > The plugin doesn't tamper with the code at all.
> > > > Do you have a URL?
> > > >
> > > > On 27/07/07, Shaun Kester < [EMAIL PROTECTED]> wrote:
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > > Thanks for your help. I have this:
> > > >
> > > > > //Start the editor
> > >
> > > > >   

[jQuery] Re: WYSIWYG Editing with Form Plugin

2007-07-31 Thread Diego A.
Shaun,

You haven't used the plugin. The script wasn't loaded. So the 'ajaxSubmit'
method wasn't intercepted. Please read installation instructions here:
http://www.fyneworks.com/jquery/FCKEditor/

Cheers,
Diego A.

On 31/07/07, Shaun Kester <[EMAIL PROTECTED]> wrote:
>
>
> I've got everything working except that it takes two submit for the
> data to make it to the server.
>
> Example: http://209.97.223.72/administration/
> Username: admin
> Password: admin
>
> 1. Login with above info
> 2. Click the first link 'Site Content'
> 3. Click the first page 'Business'
> 4. Enter text, click "Save" below editor. The alert response is the
> content of the POST. Clicking it again will send the right content,
> but the first one refuses to budge.
>
> Relevant JS:
>
> function LoadFunctions() {
>
> $("#Funcs").load('/Admin.scpc?&Prog=Funcs&UserId='+$.cookie('scpc')
> +'&NoCache='+new Date().getTime(), function(data){
> $('.FuncItems').click(function(){
>
> 
> $("#FuncDetails").load('/Admin.scpc?&Prog=FuncDetails&Type='+$
> (this).attr("rel")+'&UserId='+$.cookie('scpc')+'&NoCache='+new
> Date().getTime(), function(data){
> $('.ItemList').click(function(){
>
> 
> $("#main").load('/Admin.scpc?&Prog=EditItem&Type='+$
> (this).attr("rel")+'&ID='+$(this).attr("id")+'&UserId='+
> $.cookie('scpc')+'&NoCache='+new Date().getTime(), function(data){
> // attach handler to
> form's submit event
> 
> $('#EditItem').submit(function()
> {
> //Update fckeditor
> here with code I don't know. Please help.
>
> // submit the form
>
> 
> $(this).ajaxSubmit({url:'/Admin.scpc?&Prog=SaveItem&UserId='+
> $.cookie('scpc'), dataType: 'script',type: 'post'});
> // return false to
> prevent normal browser submit and page
> navigation
> return false;
> });
> });
> });
> });
> });
> });
> }
>
> On Jul 27, 4:59 pm, "Diego A." <[EMAIL PROTECTED]> wrote:
> > I can't understand why this would happen.
> > The plugin doesn't tamper with the code at all.
> > Do you have a URL?
> >
> > On 27/07/07, Shaun Kester <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> >
> >
> > > Thanks for your help. I have this:
> >
> > > //Start the editor
> > > $(function(){
> > >  $.fck.start({
> > >  path:
> > > "fckeditor/",
> > >  Height:
> "300px",
> > >  Width:
> "400px",
> > >  ToolbarSet:
> > > "MyToolbar"
> > >  });
> > > });
> > > //Bind form
> >
> > >
> $('#ItemSave').click(function(){
> >
> > >
> $('#EditItem').ajaxSubmit({
> > > url:
> > > '/Admin.scpc?&Prog=SaveItem&UserID='+$.cookie('scpc'),
> > >
> dataType:
> > > 'script'
> > > });
> > > });
> >
> > > The server finally gets the content (ya!), but any formatting tags
> > > like 'p' and 'str

[jQuery] Re: WYSIWYG Editing with Form Plugin

2007-07-27 Thread Diego A.
I can't understand why this would happen.
The plugin doesn't tamper with the code at all.
Do you have a URL?

On 27/07/07, Shaun Kester <[EMAIL PROTECTED]> wrote:
>
>
> Thanks for your help. I have this:
>
> //Start the editor
> $(function(){
>  $.fck.start({
>  path:
> "fckeditor/",
>  Height: "300px",
>  Width: "400px",
>  ToolbarSet:
> "MyToolbar"
>  });
> });
> //Bind form
>
> 
> $('#ItemSave').click(function(){
>
> 
> $('#EditItem').ajaxSubmit({
> url:
> '/Admin.scpc?&Prog=SaveItem&UserID='+$.cookie('scpc'),
> dataType:
> 'script'
> });
>     });
>
> The server finally gets the content (ya!), but any formatting tags
> like 'p' and 'strong' are gone. I get just the plain text.
>
> On Jul 27, 12:26 pm, "Diego A." <[EMAIL PROTECTED]> wrote:
> > $(function(){
> >  $.fck.start({
> >   path: "/path/to/fck/",
> >   Height: "500px",
> >   ToolbarSet: "Default",
> >   Config: {
> >CustomConfigurationsPath: '/path/to/fck/custom.js'
> >/* and so on... */
> >   }
> >  });
> >
> > });
> >
> > On Jul 27, 7:59 pm, Shaun Kester <[EMAIL PROTECTED]> wrote:
> >
> > > How do I set the FCK options like width, toolbar, etc?
> >
> > > On Jul 27, 11:31 am, "Diego A." <[EMAIL PROTECTED]> wrote:
> >
> > > > Try my plugin:http://www.fyneworks.com/jquery/FCKEditor/
> >
> > > > On Jul 27, 6:53 pm, Shaun Kester <[EMAIL PROTECTED]> wrote:
> >
> > > > > Hi all,
> >
> > > > > I'm having a heck of a time getting either tinymce or fckeditor to
> > > > > load via ajax and then be submitted with mikes awesome form
> plugin.
> > > > > Anybody got these to successfully work? Here my code that loads
> and
> > > > > binds the textarea and form.
> >
> > > > > function LoadFunctions() {
> > > > >
> $("#Funcs").load('/Admin.scpc?&Prog=Funcs&UserId='+$.cookie('scpc')
> > > > > +'&NoCache='+new Date().getTime(), function(data){
> > > > > $('.FuncItems').click(function(){
> > > > >
> $("#FuncDetails").load('/Admin.scpc?&Prog=FuncDetails&Type='+$
> > > > > (this).attr("rel")+'&UserId='+$.cookie('scpc')+'&NoCache='+new
> > > > > Date().getTime(), function(data){
> > > > > $('.ItemList').click(function(){
> > > > >
> $("#main").load('/Admin.scpc?&Prog=EditItem&Type='+$
> > > > > (this).attr("rel")+'&ID='+$(this).attr("id")+'&UserId='+
> > > > > $.cookie('scpc')+'&NoCache='+new Date().getTime(), function(data){
> > > > > //Start the editor
> >
> > > > > //Bind form
> > > > >
> $('#EditItem').ajaxForm({
> > > > > type:
> 'post',
> > > > >
> beforeSubmit:  getFCKRealContent,
> > > > > url:
> '/Admin.scpc?&Prog=SaveItem&UserID='+$.cookie('scpc'),
> > > > > dataType:
> 'script'
> > > > > });
> > > > > });
> > > > > });
> > > > > });
> > > > > });
> > > > > });
> >
> > > > > }
> >
> > > > > TIA,
> >
> > > > > Shaun
>
>
> >
>


-- 
Kind regards,
Diego A.
07951 445 825
[EMAIL PROTECTED]


[jQuery] Re: WYSIWYG Editing with Form Plugin

2007-07-27 Thread Diego A.

$(function(){
 $.fck.start({
  path: "/path/to/fck/",
  Height: "500px",
  ToolbarSet: "Default",
  Config: {
   CustomConfigurationsPath: '/path/to/fck/custom.js'
   /* and so on... */
  }
 });
});

On Jul 27, 7:59 pm, Shaun Kester <[EMAIL PROTECTED]> wrote:
> How do I set the FCK options like width, toolbar, etc?
>
> On Jul 27, 11:31 am, "Diego A." <[EMAIL PROTECTED]> wrote:
>
> > Try my plugin:http://www.fyneworks.com/jquery/FCKEditor/
>
> > On Jul 27, 6:53 pm, Shaun Kester <[EMAIL PROTECTED]> wrote:
>
> > > Hi all,
>
> > > I'm having a heck of a time getting either tinymce or fckeditor to
> > > load via ajax and then be submitted with mikes awesome form plugin.
> > > Anybody got these to successfully work? Here my code that loads and
> > > binds the textarea and form.
>
> > > function LoadFunctions() {
> > > 
> > > $("#Funcs").load('/Admin.scpc?&Prog=Funcs&UserId='+$.cookie('scpc')
> > > +'&NoCache='+new Date().getTime(), function(data){
> > > $('.FuncItems').click(function(){
> > > 
> > > $("#FuncDetails").load('/Admin.scpc?&Prog=FuncDetails&Type='+$
> > > (this).attr("rel")+'&UserId='+$.cookie('scpc')+'&NoCache='+new
> > > Date().getTime(), function(data){
> > > $('.ItemList').click(function(){
> > > 
> > > $("#main").load('/Admin.scpc?&Prog=EditItem&Type='+$
> > > (this).attr("rel")+'&ID='+$(this).attr("id")+'&UserId='+
> > > $.cookie('scpc')+'&NoCache='+new Date().getTime(), function(data){
> > > //Start the editor
>
> > > //Bind form
> > > $('#EditItem').ajaxForm({
> > > type: 'post',
> > > beforeSubmit:  
> > > getFCKRealContent,
> > > url: 
> > > '/Admin.scpc?&Prog=SaveItem&UserID='+$.cookie('scpc'),
> > > dataType: 'script'
> > > });
> > > });
> > > });
> > > });
> > > });
> > > });
>
> > > }
>
> > > TIA,
>
> > > Shaun



[jQuery] Re: Announce: Masked Input Plugin 1.0

2007-07-27 Thread Diego A.

Josh,

Great work! Thanks for sharing...

Diego A.

On Jul 26, 1:21 am, Josh Bush <[EMAIL PROTECTED]> wrote:
> I just wanted to announce that I've finally released v1.0 of my masked
> input plugin.  Please check it out at:
>
> http://digitalbush.com/projects/masked-input-plugin
>
> Thank You
> Josh
> digitalbush.com



[jQuery] Re: jQuery 1.1.3 Ignores Inline Event Registration

2007-07-27 Thread Diego A.
Wait I will...
Thanks ;-)

On 27/07/07, John Resig <[EMAIL PROTECTED]> wrote:
>
>
> It'll be out within the week, so you're welcome to wait, if you wish.
>
> --John
>
> On 7/27/07, Diego A. <[EMAIL PROTECTED]> wrote:
> >
> > Thanks John/Brandon, (guess you both replied at about the same time)
> >
> > Any ideas on how long it will be until 1.1.4 is out?
> > Should I stick to 1.1.2 until 1.1.4 is released?
> >
> > On Jul 27, 6:33 pm, "Diego A." <[EMAIL PROTECTED]> wrote:
> > > Hi there,
> > >
> > > I'm not sure whether this is a bug or an intentional change, but I'm
> > > having problems with my implementations of jQuery because version
> > > 1.1.3 ignores inline event registrations - ie.: conventional
> > > onclick="alert('hello world');" declarations.
> > >
> > > I've setup a test here:http://www.fyneworks.com/jquery/events/
> > >
> > > The test:
> > > 
> > >  Test link
> > > 
> > > 
> > > $(function(){ // on start up, simulate click event
> > >  $('a').click();});
> > >
> > > 
> > >
> > > Only works in jQuery 1.1.2.
> > > jQuery 1.1.3 ignores the onclick="" declaration...
> > >
> > > Any help appreciated!
> >
> >
>
> >
>


-- 
Kind regards,
Diego A.
07951 445 825
[EMAIL PROTECTED]


[jQuery] Re: WYSIWYG Editing with Form Plugin

2007-07-27 Thread Diego A.

Try my plugin:
http://www.fyneworks.com/jquery/FCKEditor/

On Jul 27, 6:53 pm, Shaun Kester <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I'm having a heck of a time getting either tinymce or fckeditor to
> load via ajax and then be submitted with mikes awesome form plugin.
> Anybody got these to successfully work? Here my code that loads and
> binds the textarea and form.
>
> function LoadFunctions() {
> $("#Funcs").load('/Admin.scpc?&Prog=Funcs&UserId='+$.cookie('scpc')
> +'&NoCache='+new Date().getTime(), function(data){
> $('.FuncItems').click(function(){
> 
> $("#FuncDetails").load('/Admin.scpc?&Prog=FuncDetails&Type='+$
> (this).attr("rel")+'&UserId='+$.cookie('scpc')+'&NoCache='+new
> Date().getTime(), function(data){
> $('.ItemList').click(function(){
> 
> $("#main").load('/Admin.scpc?&Prog=EditItem&Type='+$
> (this).attr("rel")+'&ID='+$(this).attr("id")+'&UserId='+
> $.cookie('scpc')+'&NoCache='+new Date().getTime(), function(data){
> //Start the editor
>
> //Bind form
> $('#EditItem').ajaxForm({
> type: 'post',
> beforeSubmit:  
> getFCKRealContent,
> url: 
> '/Admin.scpc?&Prog=SaveItem&UserID='+$.cookie('scpc'),
> dataType: 'script'
> });
> });
> });
> });
> });
> });
>
> }
>
> TIA,
>
> Shaun



[jQuery] Re: jQuery 1.1.3 Ignores Inline Event Registration

2007-07-27 Thread Diego A.

Thanks John/Brandon, (guess you both replied at about the same time)

Any ideas on how long it will be until 1.1.4 is out?
Should I stick to 1.1.2 until 1.1.4 is released?

On Jul 27, 6:33 pm, "Diego A." <[EMAIL PROTECTED]> wrote:
> Hi there,
>
> I'm not sure whether this is a bug or an intentional change, but I'm
> having problems with my implementations of jQuery because version
> 1.1.3 ignores inline event registrations - ie.: conventional
> onclick="alert('hello world');" declarations.
>
> I've setup a test here:http://www.fyneworks.com/jquery/events/
>
> The test:
> 
>  Test link
> 
> 
> $(function(){ // on start up, simulate click event
>  $('a').click();});
>
> 
>
> Only works in jQuery 1.1.2.
> jQuery 1.1.3 ignores the onclick="" declaration...
>
> Any help appreciated!



[jQuery] jQuery 1.1.3 Ignores Inline Event Registration

2007-07-27 Thread Diego A.

Hi there,

I'm not sure whether this is a bug or an intentional change, but I'm
having problems with my implementations of jQuery because version
1.1.3 ignores inline event registrations - ie.: conventional
onclick="alert('hello world');" declarations.

I've setup a test here:
http://www.fyneworks.com/jquery/events/

The test:

 Test link


$(function(){ // on start up, simulate click event
 $('a').click();
});


Only works in jQuery 1.1.2.
jQuery 1.1.3 ignores the onclick="" declaration...

Any help appreciated!



  1   2   >