[jQuery] Re: Using multiple selectors

2008-10-15 Thread wyo
> And for more on selectors:http://docs.jquery.com/Selectors > > Also, you'll need to use the val() function instead of value. > > On Oct 14, 2:49 pm, wyo <[EMAIL PROTECTED]> wrote: > > > I've a form like > > > > > > > > >

[jQuery] Using multiple selectors

2008-10-14 Thread wyo
I've a form like Now I try to access it in the following way: $('#Test, Prefix').value = 'Testing"; I also tried $('#Test', 'Prefix').value = 'Testing"; with no success. Any idea what's wrong? O. Wyss

[jQuery] Form plugin using ajaxSubmit to fill initial values into form

2008-10-11 Thread wyo
I'd like to read the initial values of the input fields from a DB (php script) with ajaxSubmit. So far ajaxSubmit didn't fire the request to my php script. See sample at http://www.orpatec.ch/test/formdata.html (view source) Is there a sample anywhere which does about the same? Besides how are t

[jQuery] Re: How to bind to a dynamically created object

2008-02-04 Thread wyo
On Feb 3, 5:39 pm, Brandon Aaron <[EMAIL PROTECTED]> wrote: > Ugh ... large tables always needs lots of optimizations. First ... > you'll want to minimize the number of .append()s. Concat all your HTML > into an array and then append. Something like this: > > var html = []; > ... > Thanks. > caus

[jQuery] Re: How to bind to a dynamically created object

2008-02-02 Thread wyo
> maybe cutting that 'id=' ? > simply: > $('.expanding, #'+i+). Unfortunately not since I've done this before. IMO the only solution would be to use the onclick clause in HTML but I haven't figured out to access jQuery from outside. E.g. yet this doesn't work so far. O. Wyss

[jQuery] Re: How to bind to a dynamically created object

2008-02-02 Thread wyo
On Feb 2, 5:06 pm, "Glen Lipka" <[EMAIL PROTECTED]> wrote: > http://brandonaaron.net/docs/livequery/ > This will do the trick. > Perfect. Yet if I rework the sample to bind each image separate, the script takes for ages and the browser complains about stopping the script. for (var i in data

[jQuery] How to bind to a dynamically created object

2008-02-02 Thread wyo
Isn't it possible to bind to a previous created object? I've the following code for (var i in data) { $('#eintragsliste').append( '' + ' ' + '' + '...' + ' ' + ' ' + '...' +

[jQuery] Re: Accessing jQuery functions from outside

2008-02-01 Thread wyo
On Jan 31, 3:38 pm, Giovanni Battista Lenoci <[EMAIL PROTECTED]> wrote: > wyo ha scritto: > > > > Why don't you declare the function outside the document.ready ? > Since I want to use the function during startup but prevent it from being used before document.ready an

[jQuery] Accessing jQuery functions from outside

2008-01-31 Thread wyo
I've some functions which I'd like to use outside of jQeury in normal HTML, e.g. $(document).ready(function() { function collapse (i) { $('#expanded_'+i).hide(); } }); ... ... What do I have to write at the onclick?

[jQuery] Problems with bind

2008-01-29 Thread wyo
I've tried to build a table collapser yet I've problems with the statements $('#collapser_'+i+', .expanding').bind('click', collapser_collapse (i)); $('#collapser_'+i+', .collapsing').bind('click', collapser_expand (i)); To me they look correct yet Javascript stops working. The source is

[jQuery] How to terminate each befor full iteration

2007-06-17 Thread wyo
I'd like to terminat (beak) the iteration in the following code if a value is emtpy. Is that somehow possible? var okay = true; $('.input_required').each (function (i){ if ($(this).val() == "") { okay = false; } if (!okay) ??? }) O. Wyss

[jQuery] Re: Form plugin, filling results into the fields

2007-06-17 Thread wyo
On 17 Jun., 04:14, "Mike Alsup" <[EMAIL PROTECTED]> wrote: > No, the form plugin does not do anything with the server response > (other than pass it to your callback). What exactly is it that you > need to do? > Well I though the form plugin might be able to loop through the response and assigns

[jQuery] Form plugin, filling results into the fields

2007-06-16 Thread wyo
I'm not sure if I understand it right, does the form plugin move the results back into the form fileds after the call succeeds? If yes how has the results look like? If no, what's the best solution? O. Wyss

[jQuery] Form plugin parameter passing

2007-06-16 Thread wyo
Is it possible to pass additional parameters to the AJAX call? On my page I have a get value (e.g. mode=1) which I'd like to pass to the called server function. Or do I have to store the value in a hidden input field so it's passed with the other fields? O. Wyss

[jQuery] Re: Form plugin: Multiple submit buttons

2007-05-16 Thread wyo
On May 15, 3:25 pm, Scott Sauyet <[EMAIL PROTECTED]> wrote: > > You could easily do this in JQuery, but then you have to realize that > the site would not work with Javascript disabled. Since you are going > to have to do server-side processing anyway, it doesn't seem that big a > deal to do the

[jQuery] Form plugin: Multiple submit buttons

2007-05-15 Thread wyo
I've a form with serveral submit buttons which should call quite some different functions. Is there a way to overwrite the URL depending on the submit button, calling separate server functions or do I have to separate them on the server? O. Wyss --~--~-~--~~~---~--~-

[jQuery] Question about load()

2007-05-14 Thread wyo
I consider to embed a page from one domain into a page from another domain with an iframe. Yet when I click a link inside the embedded page, only the embedded part should be loaded without involving the outer page. Does anybody know if I could do this with load()? Has anybody already tried somethi

[jQuery] Download indicator

2007-05-12 Thread wyo
My gallery including size fitting now works mosty (except with Firefox/ SeaMonkey) but I need to have a download indicator to show when the download takes a little longer. I've seen Thickbox uses a "loadingAnimation.gif". Is there a general available download indicator which I could use? Is this a

[jQuery] Disable an input element

2007-05-10 Thread wyo
I'd like to disable a button (input element) after an action. So far I can hide it $('#kontakt_senden').hide(); yet I don't know how to disable it. Does anybody know? O. Wyss

[jQuery] Re: Form plugin shows just result

2007-05-09 Thread wyo
On May 9, 1:53 pm, "Mike Alsup" <[EMAIL PROTECTED]> wrote: > Both pages have the same problem with this line: > > $('#kontakt_formular').ajaxForm (function() {alert (data[0]? > 'success': 'failure')}); > > 'data' is undefined here. If you bind a function to ajaxError you > should see an error. Y

[jQuery] Re: Form plugin shows just result

2007-05-08 Thread wyo
On May 8, 11:33 pm, "Aaron Heimlich" <[EMAIL PROTECTED]> wrote: > Onhttp://www.orpatec.ch/termola/index.php?page=contact.phpFirebug gives me > the following error: > > validateInput is not > definedhttp://www.orpatec.ch/termola/contact.php?page=contact.php > Line 30 > Well that can't be the reaso

[jQuery] Form plugin shows just result

2007-05-08 Thread wyo
I'm playing around with the form plugin yet when I press the submit button only the result (in my case "true" is shown afterwards. The full form is gone. My code is rather simple $(document).ready(function() { var options = { beforeSubmit: validateInput, dataType: 'js

[jQuery] Re: Plugin downloads

2007-05-07 Thread wyo
On May 4, 9:44 am, "Giuliano Marcangelo" <[EMAIL PROTECTED]> wrote: > Otto, > > seems fairly easy to me to download the js > > http://menu.n2cms.com/Js/n2menu.js > Well it's just shown as text without any formating when I access the link. O. Wyss

[jQuery] Plugin downloads

2007-05-04 Thread wyo
Why can't plugin authors provide useful downloads? I just tried to look into n2menu and wanted to download it, yet it seems to be impossible to get the js file. Download is generally dificult with many pluggins so one gets the impression downloads aren't wished. Doesn't the jQuery plugin site have

[jQuery] Re: Determining when an image is fully loaded

2007-04-29 Thread wyo
On 28 Apr., 23:18, "Erik Beeson" <[EMAIL PROTECTED]> wrote: > Maybe $('#pictures').html(...).children().bind(...) > Amazingly this works, see http://www.orpatec.ch/gallery4.html > But I think you're trying to hard to use jQuery. How about this > (tested on FF2/Mac): > Possibly but I want to learn

[jQuery] Re: Determining when an image is fully loaded

2007-04-29 Thread wyo
On 28 Apr., 23:12, "Mike Alsup" <[EMAIL PROTECTED]> wrote: > > var $img = $('') > .appendTo('#pictures') > .bind('load', function() { alert('loaded') }); > Thanks, this works. Why do you use "appendTo" instead of "html"? I must say I don't understand the difference. O. Wyss

[jQuery] Re: Determining when an image is fully loaded

2007-04-28 Thread wyo
On 28 Apr., 15:39, "Sean Catchpole" <[EMAIL PROTECTED]> wrote: > Try this: > $('#pictures').html(...).bind("load",function(){...}); > I've tried $('#pictures').html('').bind ('load', sizeImage); function sizeImage() { alert ('sizeImage'); } The alert is never shown, see http://www.orp

[jQuery] Difference of $.getJSON versus $get

2007-04-28 Thread wyo
What's the difference of $.getJSON versus $.get? I currently use $.getJSON to load JSON data but I can't see any advantages. Is $.getJSON just another way for $.ajax({ type: "GET", url: "link name", dataType: "json", complete: "function name" }) or is the callback excuted only whe

[jQuery] Determining when an image is fully loaded

2007-04-28 Thread wyo
I load images with $('#pictures').html(''); and want to save the loaded width,height afterwards. It seems this is only possible after the image is fully loaded. Is there an event which I could bind a function? O. Wyss

[jQuery] Re: About form upload

2007-04-27 Thread wyo
On 27 Apr., 20:38, "Mike Alsup" <[EMAIL PROTECTED]> wrote: > > I've also just tried it out but where is "upload.php"? > > As with any form processing, there must be a server component that > handles the data. upload.php is just the action target for > Massimiliano's form. > Oh, I though it would

[jQuery] Re: About form upload

2007-04-27 Thread wyo
On 27 Apr., 19:57, "Mike Alsup" <[EMAIL PROTECTED]> wrote: > > Just start with something simple, like this: > I've also just tried it out but where is "upload.php"? > enctype="multipart/form-data"> > File: > > O. Wyss

[jQuery] AJAX parameter problem

2007-04-27 Thread wyo
I've done my first AJAX call but since the documentation isn't clear about how parameter passing is done, it's not working on the first try. My code = var files = new Array(); $.getJSON ("getfiles.php", {basedir: "gallery"}, function (data){

[jQuery] Determining the optimal page width,height

2007-04-27 Thread wyo
My cropping image function works just after loading the image but not during window resizing. The problem is if there's a width="100%" somewhere in the page but no height="100%", enlarging vertical only adds white space instead of cropping larger. Any size calculation based on actual values fails

[jQuery] Cropping image function

2007-04-25 Thread wyo
My cropping image function works somehow but I've still some questions $.fn.cropImage = function (minW, minH) I've change the parameters to be minmal values, image won't be cropped smaller. Yet how do I specify default values so cropImage can be called without parameters or with just one? i

[jQuery] How to make a methode in jQuery

2007-04-23 Thread wyo
Sorry my question might be rather basic stuff but none of the tutorials, sample code or API description helps me solving my question. I've a function cropImage which I'd like to use as a methode. What's the correct syntax for function cropImage () { ... $(this).css ({width:

[jQuery] Cropping images plugin

2007-04-23 Thread wyo
I'd like to crop images to the maximum available space if the image is too large. I've looking around for a plugin which does just that but none seems to do. In case none exists I propose to create one which has the following API: cropImage (width, height) - If width, height are empty the imag

[jQuery] Re: Showing a bind(click...) as clickable

2007-04-22 Thread wyo
On 17 Apr., 00:06, Jörn Zaefferer <[EMAIL PROTECTED]> wrote: > wyo schrieb:> On 15 Apr., 18:27, "Brian Cherne" <[EMAIL PROTECTED]> wrote: > > > ".hover" is this a jQuery function? Where is it described? > > http://jquery.bassistance.de/api

[jQuery] Re: How to bind to dynamic elements

2007-04-21 Thread wyo
On 21 Apr., 15:12, Giant Jam Sandwich <[EMAIL PROTECTED]> wrote: > Try this instead: > > for (var i in folders) { > $('#f'+i).bind('click', function() { > alert ($(this).attr("id")); > }); > } > Perfect. Besides is it allowed to use just number as id's? O. Wy

[jQuery] Re: How to bind to dynamic elements

2007-04-21 Thread wyo
On 21 Apr., 14:52, Giant Jam Sandwich <[EMAIL PROTECTED]> wrote: > Unless you need the unique ID for each paragraph, it might be easier > to bind the click by the class name. jQuery will perform the foreach > logic for you. > Well depending on which folder is clicked I'd like to switch to a certai

[jQuery] Re: How to bind to dynamic elements

2007-04-21 Thread wyo
> The javascript part looks alright to me. Is there any data in the > folders array on the client side when the script gets executed? Do you > have a sample page online? > Yes, http://www.orpatec.ch/index.php?page=gallery.php Is there a way to retrieve the id of the bound element? O. Wyss

[jQuery] How to bind to dynamic elements

2007-04-21 Thread wyo
I've a dynamically created array var folders = new Array(); folders = encode ($folders) ?>; and html created with foreach ($folders as $key => $d) { echo "$d"; } and would like to bind a click handler to each element like for (var i in folders) {

[jQuery] Re: Showing a bind(click...) as clickable

2007-04-16 Thread wyo
On 15 Apr., 18:27, "Brian Cherne" <[EMAIL PROTECTED]> wrote: > You could chain this on the end of $('#prev') > > .hover( >function(){ $(this).addClass('isOver'); }, // don't forget the comma >function(){ $(this).removeClass('isOver'); } > ); > ".hover" is this a jQuery function? Where is i

[jQuery] Re: Showing a bind(click...) as clickable

2007-04-16 Thread wyo
On 16 Apr., 00:21, "Brian Cherne" <[EMAIL PROTECTED]> wrote: > Good point, Paul. Assuming it's not too much work, changing the IMG to an A > tag would take care of most your problems... You wouldn't need ugly js hacks > to get IE to understand "hover" and the only thing you'd need to do is > Okay

[jQuery] Re: Showing a bind(click...) as clickable

2007-04-15 Thread wyo
On 15 Apr., 14:28, "boermans" <[EMAIL PROTECTED]> wrote: > > Adding a class may be preferable if you wish to provide further visual > cues (such as a border) to your clickable images. > > $('#prev').addClass('clickable').bind('click', function() {...} > Nice. > And then in your css: > > .clic

[jQuery] Showing a bind(click...) as clickable

2007-04-15 Thread wyo
I've bound a click handler to an image and would like to see that this element is clickable on the page $('#prev').bind('click', function() {...} This doesn't show the click cursor (finger pointing to) when the cursor hovers over the element. Do I have to change this to a '

[jQuery] Re: How to load picture after picture (take 2)

2007-04-14 Thread wyo
On 14 Apr., 20:18, "wyo" <[EMAIL PROTECTED]> wrote: Okay found the mistake myself just after posting. > $('#files').html(' > echo ""; O. Wyss

[jQuery] How to load picture after picture (take 2)

2007-04-14 Thread wyo
I've now reworked my sample and it finally loads picture after picture yet it doesn't show them. My code is now var files = new Array(); files = encode ($files) ?>; var pos = 0; (pos > 0)? $('#prev').show(): $('#prev').hide(); (pos < (files.length-1))? $('#next').sh

[jQuery] Re: Understanding $(document).ready() etc

2007-04-13 Thread wyo
On Apr 12, 10:41 am, Klaus Hartl <[EMAIL PROTECTED]> wrote: > wyo schrieb: > > > As I understand $(document).ready() is more or less just an enclosure > > to make sure the DOM is correcly available for use with jQuery. As it > > Yes, the goal should be to sepa

[jQuery] Understanding $(document).ready() etc

2007-04-12 Thread wyo
As I understand $(document).ready() is more or less just an enclosure to make sure the DOM is correcly available for use with jQuery. As it seems this makes the use of any on... event handler obsolete since any event can be bound in the $(document).ready() enclosure. Is that right or is there more

[jQuery] Re: How to load picture after picture

2007-04-11 Thread wyo
Sorry, was to fast with posting, here are more questions. On Apr 12, 12:25 am, "Jonathan Sharp" <[EMAIL PROTECTED]> wrote: > > You could do that too... here's another option: > > echo ""; > That means only the first is added with PHP? >function showPhoto() { > this.src = this.$src; >

[jQuery] Re: How to load picture after picture

2007-04-11 Thread wyo
On Apr 12, 12:25 am, "Jonathan Sharp" <[EMAIL PROTECTED]> wrote: > On 4/11/07, wyo <[EMAIL PROTECTED]> wrote: > > > Doesn't this load all the pictures right away? Since I expect soon a > > few hundreds pictures I don't want to load all. >

[jQuery] Re: How to load picture after picture

2007-04-10 Thread wyo
On Apr 10, 11:58 pm, "Jonathan Sharp" <[EMAIL PROTECTED]> wrote: > Another approach would be to print out the images like: > echo " class=\"photo\">"; > Doesn't this load all the pictures right away? Since I expect soon a few hundreds pictures I don't want to load all. And what about if the hidin

[jQuery] How to load picture after picture

2007-04-10 Thread wyo
I currently retrieve all pictures of my gallery with the following PHP code $files = getFiles ($d); if (count ($files) > 0) { foreach ($files as $key => $f) { echo ""; } } simply adding picture after picture. But since there will be many more pictures I'd like to load just th

[jQuery] Re: AJAX sample code

2007-04-04 Thread wyo
Would be possible to download the full working code of the code samples (JSON sapmle) of the Form plugin? On Apr 4, 10:58 am, "skube" <[EMAIL PROTECTED]> wrote: > I would suggestion using the jQuery with the Form plug-in > (http://www.malsup.com/jquery/form/) >

[jQuery] AJAX sample code

2007-04-04 Thread wyo
I'm currently evaluation jQuery for a web site and it looks promising. Yet jQuery is rather new and documentation is rather sparse IHMO, especially for AJAX. I'm looking for working sample code which allows to filter a list of elements (e.g. persons) through some input fields (e.g. lastname, fistn