[jQuery] No repeat firing: how to achieve repeat AJAX calls

2006-08-10 Thread Bruce MacKay
Hello folks, I'm having difficulty in getting an application to allow repeated AJAX calls. The basic structure of the application is div id=selfreviewform action=blah id=dcdays/form/div Users are presented with a question and a data entry form in selfreview and once submitted, an answer and a

[jQuery] Erasing contents of a form

2006-08-20 Thread Bruce MacKay
Hi folks, I use the function below to send user comments to a database and get refreshed on the current page - no problems. However, I cannot seem to erase the contents of the comments form (id=NewCommentZ) for subsequent use - the text area and text input elements remain populated with the

Re: [jQuery] Erasing contents of a form

2006-08-21 Thread Bruce MacKay
: Or do $(formElement).reset(); , that would reset the form to its original state. On 8/20/06, Bruce MacKay [EMAIL PROTECTED] wrote: Hi folks, I use the function below to send user comments to a database and get refreshed on the current page - no problems. However, I cannot seem to erase

Re: [jQuery] Erasing contents of a form

2006-08-21 Thread Bruce MacKay
Thanks Ashutosh /Dave. Yes Dave, I did mean #commentsFormZ - sorry. Neither of these solutions fired, so perhaps there must be something else in my code screwing things up. The site is at http://www.callas.org.nz/e_books.asp?id=showpID=1cID=156 - feel free to add a comment! Cheers, Bruce

[jQuery] Submitted form not picking up selected items

2006-09-07 Thread Bruce MacKay
Hi folks, I'm using the following code to pass form data onto the server for processing $.fn.ajaxSubmit = function(e) {this.submit(function(){ var params = {}; $(this) .find([EMAIL PROTECTED], [EMAIL PROTECTED]'text'], [EMAIL PROTECTED]'hidden'], [EMAIL PROTECTED]'password'], [EMAIL

Re: [jQuery] Submitted form not picking up selected items

2006-09-08 Thread Bruce MacKay
Thanks for this. I couldn't see how to gain control of the AJAX output of this code for cosmetic purposes (e.g. fading/highlighting) purposes, so I decided that as the initial problem apparently was in the serialisation part of the original code, that I'd use the .serialize function of your

Re: [jQuery] Submitted form not picking up selected items

2006-09-08 Thread Bruce MacKay
Thanks Mike, this did the job - and perhaps slowly I'm starting to understand this. I appreciate also the general tidy up of the other sections of the code - I didn't know, for example, that this structure - $(#indicate, #enquiryinfo).hide(); - was possible. Cheers, Bruce At 11:35 p.m.

[jQuery] Overlapping divs toggleContent function

2006-11-05 Thread Bruce MacKay
Hi folks, I'm having a problem in FF2 with the contents of a toggled div overlapping two divs below it. The problem (http://horticulture127.massey.ac.nz/dumpthis.htm) occurs when the [Glossary] link is clicked to reveal an input box for a glossary search. In IE6, two divs beneath are pushed

[jQuery] if/then equivalents in jQuery

2006-11-12 Thread Bruce MacKay
Hi folks, I'm hoping someone might paint me a picture of how to use jQuery's equivalent of if/then conditional statements - or how to arrange jQuery code to allow for such. I have the following code which collects information from an email form and sends it to the server for processing. If the

[jQuery] Reading json strings

2006-11-24 Thread Bruce MacKay
Hi folks, I don't understand what I'm doing wrong in the following code (http://temporarius.massey.ac.nz/json_test.htm) where I cannot seem to harvest the returned json string. The test json string being returned after the form is submitted is: {fields: [{id: name, isValid: false, message:

[jQuery] .val() confusion

2006-11-25 Thread Bruce MacKay
Hi folks, I have a form containing, amongst other things, a hidden input element (id=sAction) with its value set to add when the page first loads. By clicking an item on an accompanying list (to call fnEditThisAsset), data from that item are loaded into the form and sAction's value is

[jQuery] Hiding a row in a table

2006-11-27 Thread Bruce MacKay
Hi folks, I have a tabulated set of data (table id=tbl_assetList), with the last column of each row providing a delete it link to the following function... function fnDeleteNodeTransaction(ni,pi,ai){ $(#theIndicator3).show(); $(#tbl_assetList a).click(function(){$(tr).hide()});

Re: [jQuery] Hiding a row in a table

2006-11-27 Thread Bruce MacKay
have nested tables, but that could be worked around. --Erik On 11/27/06, Bruce MacKay mailto:[EMAIL PROTECTED][EMAIL PROTECTED] wrote: Hi folks, I have a tabulated set of data (table id=tbl_assetList), with the last column of each row providing a delete it link to the following function

Re: [jQuery] Hiding a row in a table

2006-11-27 Thread Bruce MacKay
() { $(this).ancestors('tr').hide(); }); }); --Erik On 11/27/06, Bruce MacKay mailto:[EMAIL PROTECTED][EMAIL PROTECTED] wrote: Thanks Erik, Unfortunately your line of code hid all the rows in the table, including the one that was clicked. If I just wanted to hide the row

[jQuery] Klaus's (disappearing) tabs

2006-11-29 Thread Bruce MacKay
Hello folks, I've been using Klaus's tabs plugin to separate the main sections of an editor for an e-learning application - and until I tried to improve things today, it worked brilliantly. When the plugin worked, it was within a two section frame - one for a tree view of the lesson and the

Re: [jQuery] Klaus's (disappearing) tabs - fixed, but why?

2006-11-29 Thread Bruce MacKay
Why is it that a solution appears immediately after sending a help-me-please post. The function should have been function editThisNode(nodeID, nodeorder, pblID, bFullView, bNodeDetail, sorder, origin, pagetypeID) { $.get(scripts/ajax_ramosus_editor.asp?id=8nodeID= + nodeID + nodeorder= +

[jQuery] Replicating select tag text

2006-12-05 Thread Bruce MacKay
Hi folks, I'd appreciate some help with a form element task I wish to achieve. I have a form containing three elements (2 text and 1 select). [sNewNodeTitle] [iNodeID] --- select [sLinkText] For reasons that aren't important here, the user will either enter something into sNewNodeTitle or

Re: [jQuery] Replicating select tag text

2006-12-05 Thread Bruce MacKay
Hello again, I've taken one step closer to fixing this problem: $('#iNodeID').change(function(){$(#sLinkText).val($(#iNodeID).attr(value))}); returns the value of the selected option, but I still don't know how to get the text between the option tags; .attr(option) doesn't return the text.

Re: [jQuery] Replicating select tag text - Thanks!

2006-12-05 Thread Bruce MacKay
); }); Karl Rudd On 12/6/06, Bruce MacKay [EMAIL PROTECTED] wrote: Hello again, I've taken one step closer to fixing this problem: $('#iNodeID').change(function(){$(#sLinkText).val($(#iNodeID).attr(value))}); returns the value of the selected option, but I still

[jQuery] Disabling a tags

2006-12-12 Thread Bruce MacKay
Hello folks, Another simple question I'm sure. I have a preview page in which I want to display the text of a tags, but to disable the tag by changing its href contents to #. The code I use to populate the div (#preview) after an ajax call is function showResponse(json) { if

Re: [jQuery] Disabling a tags -- thanks

2006-12-12 Thread Bruce MacKay
Thank you all for the solutions and the additional lesson about div#myID - much appreciated. -- Bruce ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list

[jQuery] Refreshing form contents from json

2006-12-16 Thread Bruce MacKay
Hello all, I'd appreciate some help in identifying where I'm failing with the following code/scenario. I have a page that lists the questions in a multiple-choice type quiz and has, hidden, the form that I use to edit each question. When the appropriate link for a question is clicked, the

[jQuery] Resetting a form/general floundering

2006-12-17 Thread Bruce MacKay
Hello folks, Please excuse this longish post but I'm seriously confused. I'm building a quiz editor. I have form (#nLinkForm) which is loaded with the page and a submit function bound to it. Once the user has selected the type of quiz, an appropriate set of input elements (text, textarea,

Re: [jQuery] Resetting a form/general floundering

2006-12-17 Thread Bruce MacKay
Sorry, a typo on my part - I am using #nLinkForm in the code Bruce At 07:58 p.m. 18/12/2006, you wrote: $(nLinkForm) is looking for nLinkForm tags. You need to use css syntax: $(#nLinkForm) for id, $(.nLinkForm) for class. Blair On 12/18/06, Bruce MacKay mailto:[EMAIL PROTECTED][EMAIL

Re: [jQuery] Resetting a form/general floundering

2006-12-19 Thread Bruce MacKay
are being inserted correctly? * In terms of what you're actually trying to do, I've used something like this when I want to reset only part of a form: * jQuery.fn.resetInput() { * return this.each(function() { this.value=this.defaultValue; }); * }; Blair On 12/18/06, Bruce MacKay

Re: [jQuery] Resetting a form/general floundering

2006-12-20 Thread Bruce MacKay
form before, but I would expect that you would have to do $(#nLinkForm) [0].reset(). i.e. $(#nLinkForm) // select the form [0] // access the DOM element itself .reset() // run the reset method on the element Blair On 12/19/06, Bruce MacKay mailto:[EMAIL PROTECTED][EMAIL PROTECTED] wrote: Thanks

[jQuery] Wildcards

2007-01-03 Thread Bruce MacKay
Hello folks, Can wildcards be used in the following context... I change the ID of an a tag surrounding an icon (that when clicked triggers a delete function) from its original setting of del to a string containing info (pb, iA) about the item (to be deleted) by:

[jQuery] re. Wildcards

2007-01-04 Thread Bruce MacKay
Thanks Aaron, Jörn for your responses. Aaron - your solution gave me what I was after - I'd seen that [...] structure in a couple of posts in Nabble but I couldn't figure out how to use it (or even if it was what I needed). Jörn - in my context I'm using a class element (class=deleteA) in

[jQuery] Dynamically removing an inline script block

2007-01-04 Thread Bruce MacKay
Hello folks, I'm seeking help in dynamically REMOVING an inline script block within the head tags. My current application involves a case study editor, wherein users add/delete/edit branches to a decision tree. The visual representation of the tree is generated by COOLjsTree

Re: [jQuery] Dynamically removing an inline script block

2007-01-06 Thread Bruce MacKay
Thanks folks for your responses. As usual, I couldn't see the wood for the trees and you were correct Christof, what I really needed to do was to alter the values of a variable. Problem now solved. Thanks again, Bruce At 11:46 a.m. 5/01/2007, you wrote: Hi, I'm seeking help in

[jQuery] Double fire

2007-01-07 Thread Bruce MacKay
Hello folks, Despite my best efforts to understand previous posts about multiple firings of functions, I'm still having difficulty with a section of code that persists in firing twice. When a particular section of a page is loaded, a function is triggered which completes an ajax call to

[jQuery] radio buttons, label and double fired functions

2007-01-11 Thread Bruce MacKay
Hi folks, I have a set of radio buttons of the form: a href='#' class='ltype' id='A1'input type='radio' id='A' name='iLTID' value='1' //alabel for='A'standard link/label a href='#' class='ltype' id='B2'input type='radio' id='B' name='iLTID' value='2' //alabel for='B'review link/label that

Re: [jQuery] radio buttons, label and double fired functions

2007-01-11 Thread Bruce MacKay
Hi Aaron, Your suggested rearrangement of the a tag does not alter the twin firing of the function. The only way to get a single fire is to remove the label tags - and I don't want to do that. Cheers, Bruce At 07:12 p.m. 12/01/2007, you wrote: On 1/11/07, Bruce MacKay mailto:[EMAIL

Re: [jQuery] radio buttons, label and double fired functions

2007-01-11 Thread Bruce MacKay
wrote: On 1/11/07, Bruce MacKay mailto:[EMAIL PROTECTED][EMAIL PROTECTED] wrote: a href='#' class='ltype' id='A1'input type='radio' id='A' name='iLTID' value='1' //a Why are you wrapping the input in an a? Shouldn't it be this instead: input type='radio' id='A' name='iLTID' value='1' /label

Re: [jQuery] radio buttons, label and double fired functions - thanks

2007-01-12 Thread Bruce MacKay
Thanks Aaron for the solution and explanation - my problem is now fixed and I understand how/why. Cheers, Bruce At 08:10 p.m. 12/01/2007, you wrote: On 1/12/07, Aaron Heimlich mailto:[EMAIL PROTECTED][EMAIL PROTECTED] wrote: And anyway, when you click on a label, the element it's associated

[jQuery] .css, jQuery1.1

2007-01-15 Thread Bruce MacKay
Hello folks, I'm having difficulty understanding how .css is supposed to work. The following line of code correctly styles the font color of the json data within #tree as blue: $(#tree).highlightFade({color:'red',speed:2000,iterator:'sinusoidal'}).html(field.msg).css({color: blue});

[jQuery] ID (or name) of current tab

2007-01-15 Thread Bruce MacKay
Hello folks, I'm trying to retrieve the ID of the current tab (a la Klaus) to pass to a function (tFocus). My attempt thus far... $(#editor).tabs({fxFade: true, fxSpeed: fast, onShow: tFocus($(this).attr(id))}); but this just returns undefined to tFocus - which I'm sure won't surprise

Re: [jQuery] ID (or name) of current tab

2007-01-16 Thread Bruce MacKay
Thanks for the illumination Klaus - I'm out of the hole. Cheers, Bruce At 01:55 a.m. 17/01/2007, you wrote: Bruce MacKay schrieb: Hello folks, I'm trying to retrieve the ID of the current tab (a la Klaus) to pass to a function (tFocus). My attempt thus far... $(#editor).tabs

[jQuery] ID of parent

2007-01-19 Thread Bruce MacKay
Hi folks, Not a new question to this list, I know, but I'm having difficulty in getting the ID of a parent. From the examples on Nabble, I've tried var ej = $(#sText).parent().attr(id); and various renditions on the them, but the best I get reported is [object Object]. I'd appreciate a

Re: [jQuery] Dom Updates?

2007-01-20 Thread Bruce MacKay
Hi Yehuda, Can this approach be extended to JSON data? I return html content of multiple divs using the pattern... $(#nlinks2).html(sLinks); where sLinks is a JSON field. I cannot work out how to hook the call to docReady to this code. Any help here? Thanks, Bruce At 12:46 p.m.

[jQuery] StyleSwitcher (or HTML) puzzle

2007-02-10 Thread Bruce MacKay
Hi folks, I'm trying to introduce Kelvin Luck's stylesheet switcher (http://www.kelvinluck.com/article/switch-stylesheets-with-jquery) into a project, but I seem unable to pass go. The link tag follows the form: link rel=stylesheet type=text/css href=styles1.css title=styles1 media=screen

Re: [jQuery] StyleSwitcher (or HTML) puzzle - fixed

2007-02-10 Thread Bruce MacKay
I found my mistake - I was loading the link tags before the js. Sorry for the unnecessary post. Bruce At 12:53 a.m. 11/02/2007, you wrote: Hi folks, I'm trying to introduce Kelvin Luck's stylesheet switcher ( http://www.kelvinluck.com/article/switch-stylesheets-with-jquery) into a

[jQuery] Binding a submit function after ajax

2007-02-14 Thread Bruce MacKay
Hi folks, I'm having difficulty getting the submit of a form, loaded into the page from an AJAX call, being bound to a function. If my description doesn't make sense, hopefully the following code will show what I'm on about: function getSS(ej) { $.ajax({ type: 'GET',

Re: [jQuery] Binding a submit function after ajax

2007-02-14 Thread Bruce MacKay
Thanks Mike, I thought the basic code was correct. What wasn't correct was my call to after_SS - I'd made a typo on this function's name. Cheers, Bruce At 02:29 a.m. 15/02/2007, you wrote: Bruce, That code looks ok to me. Do you have a sample page somewhere we could look at? Based on

[jQuery] Cascading data into text input boxes

2007-02-16 Thread Bruce MacKay
Hi folks, I have a set of n paired text input boxes (date on; date off). Each is attached to Kelvin Luck's date picker plugin. In most instances, the date off will be 7 days after the date on, and the next date on will be 1 day after the preceding date off. So, to help the user (so that

Re: [jQuery] Cascading data into text input boxes - thanks

2007-02-17 Thread Bruce MacKay
entered in advance), you just check the comments in the code... adding change() to the end would trigger the change event and run the code for the new input box. Good luck Kristinn On 2/16/07, Sam Collett [EMAIL PROTECTED] wrote: On 16/02/07, Bruce MacKay [EMAIL PROTECTED] wrote: Hi folks

[jQuery] Hide/show question with dl/dt/dd

2007-02-20 Thread Bruce MacKay
Hi folks, I have a simple faq application with the question within a dt tag and the corresponding answer within a dd tag. I had hoped that my onload code of: $('dt.toggle').bind(click, function(){$(this).parent('dt').next('dd').slideToggle(500);return false;}); would have revealed the

Re: [jQuery] Hide/show question with dl/dt/dd - fixed!

2007-02-20 Thread Bruce MacKay
I'll answer my own question this time. First, make sure you are working with a recent version of jquery! That is enough to make this one work: $('a.toggle').bind(click, function(){$(this).parent('dt').next('dd').slideToggle(500);return false;}); The other approach will work when the

[jQuery] Treeview - collapsing sub-branches

2007-02-24 Thread Bruce MacKay
Hi folks, I'm suffering from a no doubt self-inflicted problem with the brilliant Treeview plugin - when I click a sub-branch to collapse it, it does collapse, but then immediately expands. The plugin's example page (http://jquery.bassistance.de/treeview/treeviewDemo.html) has it (the

[jQuery] Swapping css of non-adjacent link tags

2007-03-14 Thread Bruce MacKay
Hello folks, I'm seeking some help in changing the (in this case) background colour of links once they've been clicked. I have an application that contains many (50-100) links on a page. Clicking on any one brings specific content into a neighbouring div. What I want to do is to change the

Re: [jQuery] Swapping css of non-adjacent link tags

2007-03-14 Thread Bruce MacKay
all the jQuery code so it functions with css calls on the fly as well, though as I said I think this way is better. Bruce MacKay wrote: Hello folks, I'm seeking some help in changing the (in this case) background colour of links once they've been clicked. I have an application

[jQuery] highlight/fade the current table row

2007-03-30 Thread Bruce MacKay
Hello folks, I'm after some assistance (syntax I guess) on how one selects the current row of a table. The context of this query is that I have a table of data in which the last column of each row contains a checkbox which the user checks if the data case is to be deleted. When checked, I

Re: [jQuery] highlight/fade the current table row

2007-03-30 Thread Bruce MacKay
Thanks Adam, That's certainly closer, but it's not quite there - at least on my page. $(this).parent('tr').highlightFade doesn't fire. On the other hand, $(this).parent('td').highlightFade... does fire on the td within which the checkbox sits. Sorry, but I'm unsure how to go one step

Re: [jQuery] highlight/fade the current table row - solution

2007-03-30 Thread Bruce MacKay
I found a solution $(this).parent('td').parent('tr').highlightFade(... Is there shorthand syntax for .parent('td').parent('tr')? Thanks/Bruce At 12:09 a.m. 31/03/2007, you wrote: Thanks Adam, That's certainly closer, but it's not quite there - at least on my page.

Re: [jQuery] highlight/fade the current table row - solution -thanks

2007-03-30 Thread Bruce MacKay
Thanks both, Bruce At 01:28 a.m. 31/03/2007, you wrote: On Mar 30, 2007, at 8:40 AM, Brunner Adam wrote: Hi! $(this).parent('td').parent('tr').highlightFade(... Is there shorthand syntax for .parent('td').parent('tr')? Sorry, made a typo. So this is the solution for you: