[jQuery] Passing parameters by object

2010-01-13 Thread SamCKayak
Passing parameters using an object has become a popular method among jQuery add-ins. Few plugins actually validate the passed parameter object to ensure that elements are spelled correctly. Most plugins use the jQuery.extend method which would copy the passed parameter { resiz: 1 } just as easily

[jQuery] Global monitoring of all Ajax completions

2010-01-13 Thread SamCKayak
I'd like to logout users when the associated session expires as soon as reasonably possible. Assume the users computer died for any reason, I'd like to logout the user server-side by keeping the session timeout as short as reasonably possible, maybe 3 minutes. To keep the session alive so the ser

[jQuery] Preventing form submit

2009-10-29 Thread SamCKayak
I've added a jQuery .onClick to a form submit. Is there a way to prevent the form from submitting?

[jQuery] Best Practices

2009-06-09 Thread SamCKayak
The following form is used in several plug-ins... var oGlobalObject; (function( externalObject) { ... code here, setup properties and methods on externalObject })( oGlobalObject ); so variable abc is defined as a global object with properties and methods.. Is the following form equivalent? va

[jQuery] Stack Overflow at line 0

2009-06-05 Thread SamCKayak
I "occasionally" get this error in IE8 when refreshing a page. The debugger is locked out making it difficult to identity the cause. There's a snippet of code I am using to preload images which when I borrowed it, mentioned this problem. I've posted it below. Any suggestions on how this code m

[jQuery] Named and anomymous functions

2009-06-05 Thread SamCKayak
o.fnTest = function(){ alert('Hello World') } o.fnTest = function fnTest(){ alert('Hello World') } both seem to assign the function to o.fnTest. Most of the plugin libraries I've seen use the anomymous function assignment. The latter (a named, not anomymous function in FireBug) is easier to wo

[jQuery] Referencing an element in a frame

2009-05-30 Thread SamCKayak
$(document).ready( function() { // how would I reference a div of ID=test insode the frame named econsole? $('frame[name="econsole"] what goes here') } I'd also like to know the reverse. For javascript insode econsole's window, how would I reference the frameset of id="outer" (I'd like

[jQuery] Question on encode/decode of JSON - server-side and client-side

2009-05-26 Thread SamCKayak
I am building a client-side and server-side solution and want to use JSON through Ajax in both directions. I have ASP or JavaScript server-side, though Microsoft's support of server-side JavaScript seems nil, so I am reluctantly conceeding to use ASP. I'd appreciate suggestions on available solu

[jQuery] Recommendations for jQuery method to play mp3 audio

2009-05-20 Thread SamCKayak
Is there a cross-browser jQuery plug-in that can preload several different mp3 audio files and provide play / stop methods?

[jQuery] jQuery Media - won't autostart an mp3

2009-05-17 Thread SamCKayak
I need to play an audio file in response to a user action. The player must be completely cross-browser compatible, and hopefully use an available plug-in. jQuery.media seems to be the ticket, but while I can get it to work in manual mode, it doesn't autoplay for me. This may be a problem with p

[jQuery] Need jQuery plugin for artwork display

2008-04-11 Thread SamCKayak
I'm looking for a jQuery extension to show off artwork. Maybe 10 to 100 paintings. Maybe more. There are so many jQuery extensions I need some help finding the needle in the haystack. Any recommendation appreciated. Is there anything that will perform album cover flipping like iTunes? Thanks

[jQuery] Safari - Problem with fadeIn / fadeOut

2007-07-02 Thread SamCKayak
I've tested in IE 6, 7, Firefox, Opera, but Safari (for windows) is unpredictable, sometimes fading an image in, then not another. http trainthetrainers dot net the script in question is banner-top.js check the banner ad at the top. It's set to 8 second rotate for debug. Any known problems wi

[jQuery] Re: Keeping a div of controls and stats in Viewport

2007-06-05 Thread SamCKayak
I found a prototype.js solution here: http://www.prototypejs.org/feed/api/position/atom.xml Note the div in the top-right of the page. Anyone done anything similar in jQuery? Plans for the future? Sam

[jQuery] Re: Find set of questions

2007-06-05 Thread SamCKayak
I am learning, I am learning... I missed the subtle difference in the documentation: $('a, b') and $('a', 'b') !!! The way to filter my list is using a function.. like so: ('ol.ol1 > li').filter( function() { return $('li.correctchosen', this).length != 0 } ) // Filters the first set dow

[jQuery] Keeping a div of controls and stats in Viewport

2007-06-05 Thread SamCKayak
Anyone have a jQuery-esque method of keeping a DIV of information (or controls) in the viewport when the window has vertical scrolling? Sam

[jQuery] Find set of questions

2007-06-04 Thread SamCKayak
$('ol.ol1 > li') // returns a complete set of list elements containing quiz results... Some of the results contain correct answers, some incorrect answers... The indicator would be another list contaiing the choices and assigned classes: .correctchosen or .correctnotchosen How do I filter the

[jQuery] Vertical Positioning

2007-06-02 Thread SamCKayak
I have an element in one div, when clicked, I'd like to blindDown() another element in another div. No problem so far. I'd like to set the vertical positioning of the latter element to the same vertical positioning of the element clicked, before the blindDown() is executed. The divs containing

[jQuery] Re: jQuery css properties

2007-06-02 Thread SamCKayak
Thanks. Sam

[jQuery] jQuery css properties

2007-06-02 Thread SamCKayak
.css( {background: "navy"} ) is a great facility, but the object keys cannot follow the corresponding css names which is why css background-color is shortended to "background". Is there a list somewhere of all the revised property names? I need border-bottom in particular. Sam

[jQuery] finding span with title

2007-06-02 Thread SamCKayak
Is there a way to find all spans with a title="..." using a single $ ('span:title') or similar construct? Sam

[jQuery] Re: onhover Tips

2007-06-01 Thread SamCKayak
Karl, I see cluetips supports local HTML, that's great. Can it support a non-anchor element, simply coded with title?, e.g., abc def Sam

[jQuery] Re: onhover Tips

2007-06-01 Thread SamCKayak
Karl, Do you have plans or schedule to support loading of HTML, hidden on the page, into the tip? Sam

[jQuery] Re: onhover Tips

2007-06-01 Thread SamCKayak
clueTips doesn't have links to download the supporting javascript(s). Am I missing them somewhere or are we supposed to view source and grab the code? Sam

[jQuery] Re: Performance monitoring

2007-06-01 Thread SamCKayak
Caching a jQuery object "globally" or any other way will help if the object is: - expensive to build, e.g., a large DOM, sprinkled with many objects as was the case with my 250 questions - reusable, e.g., a user can click to "hide all", "show all". Instead of recalculating the object, I save

[jQuery] Re: onhover Tips

2007-05-31 Thread SamCKayak
I was hoping for a bubbletip based on jQuery. Bubbletips look great. baassistance wont require another library and will meet my needs. T Thanks, Sam

[jQuery] onhover Tips

2007-05-31 Thread SamCKayak
Any suggestions for onmouseover tip libraries? Sam

[jQuery] Re: Performance monitoring

2007-05-31 Thread SamCKayak
caching the object globally made the performance suitable for production. Thanks, Sam

[jQuery] Re: Performance monitoring

2007-05-31 Thread SamCKayak
It's tolerable if I change .hide('fast') to .css('display', 'none') similar for show... Any way to track where time is being spent in JavaScript? Sam

[jQuery] Performance monitoring

2007-05-31 Thread SamCKayak
When I expand my quiz to 250 questions, the jQuery scripts are timing out. This happened once before and I was able to diagnose the problem to a selector which wasn't precise. It was installing event handlers on many elements, not the few necessary elements. So here I am again, same symptom. I

[jQuery] Shorter method?

2007-05-31 Thread SamCKayak
if($(obj).attr('checked')) { // Hide the correct answers? $('.quizsubheader').hide('slow'); } else { $('.quizsubheader').show('slow'); }; What's the best one-liner method to achieve the same result above? Sam

[jQuery] Re: good show/hide icon

2007-05-31 Thread SamCKayak
After hunting around, I ended up using a "window" icon, but I think the expand / collapse or + / - would be better in retrospect. I'm surprised there's no defacto standard emerging on icon semantics... e.g., an "office" set, a "navagational" set... Anyone know of any standards? Sam

[jQuery] Determining show / hide state

2007-05-30 Thread SamCKayak
Does jQuery .show() and .hide() set a flag anywhere on an object to indicate if it was last show()n or hide()n? Sam

[jQuery] Re: good show/hide icon

2007-05-30 Thread SamCKayak
Silk is a great deal, great looking, almost 1,000 icons. I don't see a show / hide tho... IconBuffet looks like it could be the deal. I've signed in as SamCKayak there... Sam

[jQuery] good show/hide icon

2007-05-30 Thread SamCKayak
Is there a great (small) show / hide icon out there somewhere? Intuitive, good design, good looks, etc... Sam

[jQuery] .parents(expr)

2007-05-29 Thread SamCKayak
I could do a test, but discussion seemed like it might turn up something else... .parents(expr) supports an expression to filter parent elements, e.g., .parents('.getme') // returns all parents with class getme the $(expr) in general allows any css (or xml) selector. Does expr extend this way

[jQuery] Automatic scrolling?

2007-05-29 Thread SamCKayak
I have a web page with a user-selectable number of quiz questions. Each question is in a list element. Sometimes users select 250 quiz questions which is a lot... I wanted to solicit thoughts about automatically scrolling to the next question when a choice is made (when a radio button is selecte

[jQuery] Selector befuddlement

2007-05-25 Thread SamCKayak
This is a snippet of a list containing another list: QUESTION TEXT IS HERE CHOICE 1 CHOICE 2 The parent list is a list of 10 or more questions. Each #ol1 list element contains a question, and another list ul.ul2 which contains choices. I want to assign .hover() handlers to

[jQuery] Queueing multiple .show() and .hide()

2007-05-23 Thread SamCKayak
Things get quirky on a page if .show() and.hide() are running simultaneously on different blocks. I've implemented a callback to queue things up serially. It seems to run a little smoother now. Is there an integrated queueing system in jQuery that will relieve me of the burden of serializing .s

[jQuery] Hacker wants to format Ajax Data elegantly

2007-05-23 Thread SamCKayak
Background: My usual server-side languages are ASP (not .NET) and MS SQL... I've manually constructed JSON strings server-side. Worth the effort because JavaScript picks them apart naturally, no special library required. In the other direction, I've relied on hacks. Usually CSV or semicolon de

[jQuery] Re: Dynamic content rendering anomaly

2007-05-22 Thread SamCKayak
Rob, the tbody didn't change the problem unfortunately, but when I resorted to Erik's trick, it worked, but it's after the show, so the display problem flashes briefly. So now that the beast is known, I think I'll wrap the table in a div and apply the show effect there when I get a chance. Than

[jQuery] Dynamic content rendering anomaly

2007-05-22 Thread SamCKayak
First: this page validates. I've gone as far as running the "rendered code" through the WDG validator. No errors. No CSS errors either. Renders fine in IE 6, 7. Firefox, does a trick with the top of the table.show(), extending the border-top of the table beyond the right end of the box eleme

[jQuery] Re: Set Div Width

2007-05-22 Thread SamCKayak
Setting the width using .css( {width: 88} ) worked great. Thanks...

[jQuery] Set Div Width

2007-05-22 Thread SamCKayak
I'm setting the width of a DIV using: ...).children('div').attr( {width: ('80px'} ); It seems to have no effect (I have margin:0 auto; set in CSS). The rendered (view/generated source) shows: which isn't what I had expected. I know that: will work fine. Is there a better way to set the

[jQuery] Re: Radio button .click() difficulty

2007-05-22 Thread SamCKayak
I'm past this problem which is why the test page is down. I found the fix by trial and error... which was: the return codes in an event handler were resetting the selected radio button to the initial state before the click event. I think I'm doing a "return false" to preserve the jQuery-selecte

[jQuery] Re: Ajax: ASP returns JSON to client

2007-05-22 Thread SamCKayak
Thanks everyone. I'll reply to several questions all at once here. - It's ASP, not .NET. ( I know, I know.) I tried the JavaScript decodeURI and found it doesn't decode the ASP Server.URLEncode() well. I know that jQuery wants to stay small, but it seems like adding php, asp, .net decoders w

[jQuery] Ajax: ASP returns JSON to client

2007-05-21 Thread SamCKayak
In ASP, I am building a JSON object and escape the data using Server.URLEncode(strParmChoices) It seems this encodes blanks as a plus sign "+". Back in JavaScript, it looks like unescape("+") leaves the plus as a plus. I've band-aided the problem using unescape(json.strParmChoices).replace(/\

[jQuery] Re: Ajax Data Format Recommendation

2007-05-21 Thread SamCKayak
I found JSON on the return trip to work fine. Sometimes the answers come to me as soon as I post. Sam

[jQuery] Ajax Data Format Recommendation

2007-05-21 Thread SamCKayak
I did a little Json and some XML using prototype last year. Now I have jQuery and need to pass about 4 string parameters to the server, query a database, and return about 4 string parameters. My current method to post the get is: $.get("../survey/postsurveytodb.asp", { surveyid:

[jQuery] $(document).ready(function() {

2007-05-21 Thread SamCKayak
Can $(document).ready(function() { appear in an included

[jQuery] Re: Gathering List innerHTML into a string

2007-05-21 Thread SamCKayak
Thanks. This gives me all I need. Sam

[jQuery] Re: Gathering List innerHTML into a string

2007-05-21 Thread SamCKayak
Here's a simpler problem... If I have a jQuery object which holds an array of elements, e.g., $('li') Is there a way to collapse the innerHTML of that array into a string of concatenated text? Sam

[jQuery] Gathering List innerHTML into a string

2007-05-21 Thread SamCKayak
I have an unordered list, each list element contains a radio button, and some text, e.g.: This is some text in list element 1. This is some text in list element 2. There can be from 1 to N list elements in the , what I need to do is concatenate the text into a semicolon delimited string to be pa

[jQuery] Re: Finding a parent element

2007-05-21 Thread SamCKayak
Thanks. Works great, and it's less filling. Is there no way I can suppress my email address from showing to group members? Sam

[jQuery] Finding a parent element

2007-05-21 Thread SamCKayak
I have an element (call it e1) with an onclick handler nested a variable length from a parent element (call it p1). I need to go up to the parent (p1), which might be 1, 2, or 3 levels up, then down to another element (call it e2). I want to hide element e2 when e1 is clicked. Is there a single

[jQuery] Radio button .click() difficulty

2007-05-18 Thread SamCKayak
Here's a prototype of a quiz form... http://trainthetrainers.net/test.htm I've run into a problem with the .check() function with radio buttons... On all the quiz choices, clicking anywhere on the question EXCEPT THE RADIO BUTTON, will dynamically check the radio button. Clicking on the radio

[jQuery] newbie onmouseover onmouseout

2007-05-16 Thread SamCKayak
Just getting started... I have several unordered lists on a page. I want to add a class 'hilite' to an ordered list onmouseover and remove the class onmouseout. So far, so good. My problem is that while the mouse is inside the ordered list, an onmouseout event fires when the mouse moves over a