[jQuery] Re: Two Sliders on Page :: 1 closes when the other opens

2009-03-24 Thread Mohd.Tareq
Hi commarts,
When you are writing script to open top right slider , at the same time you
need to add script
to close bottom slider in the same script.

Hope you get it.

Cheers.

On Wed, Mar 25, 2009 at 1:35 AM, commarts  wrote:

>
> Friends,
>
> I have two sliders on the page. One at the top right, and one at the
> bottom right. I would like for them to work together. When one slider
> opens the other one closes.
>
> Daniel
>


[jQuery] [ajaxForm] Loading Dynamic Data Best Practices

2009-03-24 Thread Code Daemon

RIght now I have a page that has a search box that uses the
autocomplete plugin. When the form is submitted using the ajaxForm
plugin, the server sends back HTML code with jQuery mixed in. This
seems to work alright in Firefox, but in IE the javascript goes
unnoticed. The results are sometimes unpredictable in FF as well.

Is it bad practice to load javascript this way? I tried putting the
javascript in the ajaxForm's 'success:' method so that it would be
called after the post was made, but this doesn't make IE recognize it
either.

Here is the server response that get's directly loaded in a tab via
the ajaxForm plugin's 'target:' method.

I have nearly identical code in another tab that inserts new objects
into the database. The particular code below allows you to edit
entries. The tab that let's you add is hardcoded when the page loads
initially, however, instead of being loaded dynamically like this
below.

--
mypage.php
--


$(document).ready(function(){

$('#update_inventory').validate({
submitHandler: function(form) {

$(form).ajaxSubmit({

target: '#inventory_system_details',

success: parseDbResponse
});
},
debug: true,
errorElement: "em",
errorContainer: $("#warning2, #summary2"),
errorPlacement: function(error, element) {
error.appendTo( 
element.parent("span").next("span") );
},
success: function(label) {
label.text("ok!").addClass("success");
}

});

$('#prop_no2').blur( function(){
$('#prop_no_status2').load("system/test_prop_no", 
{prop_no: $
('#prop_no2').val()} );
});

$('#hostname2').blur( function(){
$('#hostname_status2').load("system/test_hostname", 
{hostname: $
('#hostname2').val()} );
});

$('#frmClearButton2').click( function(){
//reset model numbers
$('#model2').attr("disabled", "disabled");
$('#model2 option:selected').text("select model");

//clear status messages
$('#prop_no_validation_msg2').html('');
$('#hostname_validation_msg2').html('');
$('#vendor_validation_msg2').html('');
});

});

function parseDbResponse(responseText, statusText){

$("#inventory_system_details").html(responseText);
$('#frmClearButton2').click();

}

function addEditHandlers()
{
$("input[name='edit']").click(
function()
{

$(".readclass").removeClass("readclass").addClass
("editclass").removeAttr("disabled");
$("input[name='edit'] , 
input[name='done']").toggle
();
}
);
}

function addDoneHandlers()
{
$("input[name='done']").click(
function()
{

$(".editclass").removeClass("editclass").addClass("readclass").attr
("disabled","true");
$("input[name='edit'] , 
input[name='done']").toggle
();
}
);
}

$(function()
{
addEditHandlers();
addDoneHandlers();
});




.dp_embed + img { position: relative; 
left:
-21px; top: -1px; }


input.readclass {
border-width:0px;
background-color: white;
color: black;
}

input.editclass {
border-width:1px;
}






property number*







barcode*







hostname*

   





alias




vendor*

select vendor
3com
Acordex Imaging Systems
Addonics
Amer Power
Andatco
APC
Apex
Apple
aViV
Avocent
Bask Computers
B

[jQuery] Is anyone making a Canvas-photo jquery version/plugin (cool stuff)

2009-03-24 Thread sleepwalker

Hey,
I just saw this cool project called Canvas-photo and I was wondering
if anyone was working on a jquery version (plugin)?

Thanks

Daniel

http://code.google.com/p/canvas-photo/ [code]
http://www.ernestdelgado.com/public-tests/canvasphoto/demo/canvas.html
[demo]


[jQuery] Free jQuery select elements cheat sheet

2009-03-24 Thread xiaohouzi79

I've just finished writing a jQuery cheat sheet which is available for
free download in pdf format.

I've have put hours of work in to gathering together information from
different tutorials and other sources to write this document.

It is organized around the jQuery API for easy reference.

You can get the download link from my blog here:

http://myphpetc.blogspot.com/2009/03/jquery-select-element-
cheat-sheet.html">http://myphpetc.blogspot.com/2009/03/jquery-select-
element-cheat-sheet.html




[jQuery] Re: Regarding jQuery UI tabs()

2009-03-24 Thread Nikola

You might wan't to post this in the UI group..
http://groups.google.com/group/jquery-ui

You could, also, just add / remove your own 'active' class pretty
easily.

On Mar 24, 10:32 pm, MorningZ  wrote:
> it's definitely possible, but would require going through the js and
> theme css and changing the class name
>
> so why would this be important to do?
>
> On Mar 24, 9:21 pm, BigFisch  wrote:
>
>
>
> > I was wondering if there was a way to rename the class when something
> > is "active".
>
> > Is it possible to define this in a parameter?
>
> > Instead of "ui-state-active", I'd like it to use "active"- Hide quoted text 
> > -
>
> - Show quoted text -


[jQuery] Re: ajax timeout question

2009-03-24 Thread Mathew

nice, i should have tired that i guess. still learning
i got it woring just as i wanted thank you

On Mar 24, 10:32 pm, "comslash.com"  wrote:
> Mathew,
>
> I believe you can set the value to null or 0 to not have the request
> time out ... but you may want to implement something on error instead
> of this to say attempt the search again x times then print msg server
> is busy or something along those lines.
>
> On Mar 24, 10:51 pm, Mathew  wrote:
>
> > i am using jquery ajax to load search results of a page. and am having
> > a hard time finding an answer to this question regarding my timeout
> > time
> > i have jquery set to timeout 5000 before doing the success functions.
> > i have noticed on my less than reliable connection that sometimes it
> > takes longer then 5000 to complete the ajax call and if it does then
> > the ajax fails to submit. i could up the limit but usually when my
> > connection is good the call only takes 200. is tehre a way to match
> > the timeout to however long the call takes?
> > thanks


[jQuery] Re: Cycle Plugin : [cycle] terminating; too few slides: 1

2009-03-24 Thread pedalpete

Yeah, but I've seen the same thing in my code, and it turned out I
wasn't calling the 'foreach' properly.

Look at the response you are getting from the server (I'm assuming
ajax) or look for a tag not closed properly or something.
Posting code or link is the only way we can help here.

On Mar 24, 5:18 pm, Asinox  wrote:
> Hi, but im doing... i have a foreach  with php for load the images, in
> the home pages i got the message, but in the another part to the
> website is fine...
>
> On Mar 24, 7:16 pm, pedalpete  wrote:
>
> > The message means that there isn't enough data in the cycle for it to
> > cycle through.
> > Likely you are only loading your cycle wrapper once, but you didn't
> > include any code or a url, so it's tough to tell.


[jQuery] Re: Convert js to jquery

2009-03-24 Thread Richard D. Worth

$(function() {
  $(".search-options li").click(function() {
$(this).addClass("selected").siblings().removeClass("selected");
return false;
  });
});


  
User ID
mikode
Search Contact by
  
  





  


- Richard

On Tue, Mar 24, 2009 at 12:40 PM, mdjamal  wrote:

>
> Hi,
>
> I am trying to convert the below js code to jQuery format, since I am
> using jQuery for my site. Posted below the code, your help is
> appreciated.
>
> http://woork.blogspot.com/2008/01/tabbed-search-bar-using-css-and.html
>
>
> --
> 
> function setSearchOptions(idElement){
>/* Total Tabs above the input field (in this case there are 2 tabs:
> mikode, user id) */
>tot_tab = 2;
>tab = document.getElementById('tab'+idElement);
>search_option = document.getElementById('searchopt');
>for(i=1; i<=2; i++){
>if(i==idElement){
>tab.setAttribute("class","selected");
>search_option.value=idElement;
>} else {
>
>  document.getElementById('tab'+i).setAttribute("class","");
>}
>}
> }
> 
>
>
>
> onclick="javascript:setSearchOptions
> (2);">User ID
> onclick="javascript:setSearchOptions(1);">mikode
>Search Contact by
>
>
>
> size="40"/>
> class="search-button" />
>
>
>
>
> --
>
> Thank you!


[jQuery] Re: Cycle Plugin : [cycle] terminating; too few slides: 1

2009-03-24 Thread KathyW

If you could supply a link to the page so we could check the code it
would help enormously.

KathyW.


[jQuery] Re: ajax timeout question

2009-03-24 Thread comslash.com

Mathew,

I believe you can set the value to null or 0 to not have the request
time out ... but you may want to implement something on error instead
of this to say attempt the search again x times then print msg server
is busy or something along those lines.



On Mar 24, 10:51 pm, Mathew  wrote:
> i am using jquery ajax to load search results of a page. and am having
> a hard time finding an answer to this question regarding my timeout
> time
> i have jquery set to timeout 5000 before doing the success functions.
> i have noticed on my less than reliable connection that sometimes it
> takes longer then 5000 to complete the ajax call and if it does then
> the ajax fails to submit. i could up the limit but usually when my
> connection is good the call only takes 200. is tehre a way to match
> the timeout to however long the call takes?
> thanks


[jQuery] Tabs and tables

2009-03-24 Thread Joe Tseng
Currently I am working on an entry form that I've realized has become too
long and would like to break up using Tabs.  My current form uses tables
(yes I should use divs but I'm still used to tables) and I thought I could
just put in child tables inside the divs used by Tabs.  I've come to
discover this breaks the entire page and was wondering if others have been
able to use child tables and Tabs successfully.

tia,

 - Joe

-- 

Failure is always an option -- Adam Savage


[jQuery] ajax timeout question

2009-03-24 Thread Mathew

i am using jquery ajax to load search results of a page. and am having
a hard time finding an answer to this question regarding my timeout
time
i have jquery set to timeout 5000 before doing the success functions.
i have noticed on my less than reliable connection that sometimes it
takes longer then 5000 to complete the ajax call and if it does then
the ajax fails to submit. i could up the limit but usually when my
connection is good the call only takes 200. is tehre a way to match
the timeout to however long the call takes?
thanks


[jQuery] Re: jQuery Validation Plugin & ASP.NET

2009-03-24 Thread Mac

Hi

You are not placing the # in front of the form id as jquery requires.
I do that all the time!!!

On Mar 24, 12:26 pm, Zach  wrote:
> I've tried to get this to work for the past 4 hours and I'm stuck.
>
> I've got a master page with the following scripts added.
>
>     
>     
>
> this is the form tag on my master page
>
>     
>
> in the HTML output of the page, it actually renders to "aspnetForm".
>
> in the content page, this is what I have
>
>     
>
>         $().ready(function() {
>
>         $('aspnetForm').validate();
>
>         $('.TitleField').rules("add", {
>             minlength: 2
>         });
>
>         });
>     
>
> here is the control I'm trying to validate
>
>  Columns="30" MaxLength="100" runat="server" EnableTheming="false"
> CssClass="TitleField" />
>
> here is the error I get when testing in IE7
>
> Microsoft JScript runtime error: '$.data(...).settings' is null or not
> an object
>
> when I go to the debug in VS, it shows the $.data as being undefined.
> What am I missing, I've tried to use a id selector as well, without
> any luck.  I've tested my selectors by changing background colors, and
> they alwasy work but why isn't this thing validating?
>
> I'm probably missing something simple, any help is GREATLY
> APPRECIATED!
>
> Thanks,
>
> Zach


[jQuery] Re: How to prevent loading jquery twice

2009-03-24 Thread Andy789

Thanks, guys. After all, I gave up on jscript solution and added a
switch adding jscript to the header on a php level

On Mar 23, 11:44 pm, Peter Edwards  wrote:
> Are you using joomla to load jQuery? or are you wringin script tags in
> some sort of template?
> I came across 
> this:http://www.packtpub.com/article/using-javascript-effects-with-joomla
> which seems to imply joomla can handle you script inclusion.
> hope this helps
>
> on 23/03/2009 11:41 Andy789 said::
>
> > also, it is working (only in FF, though) and not very stable. I think
> > what is happening, when I write the  reference to
> > the header, it does not mean that it is loaded. in fact, it is loaded
> > SOMETIMES
>
> > On Mar 23, 10:28 pm, Andy789  wrote:
>
> >> we are talking about joomla's index.php (used as a main page) and
> >> index2.php (used as an iframe). Index2.php is always a part of
> >> index.php. Therefore,
>
> >> 1) if I include jquery to the main page header, the iframe (generated
> >> as index2,php) will not work as there is no jquery in there
> >> 2) if I include it to both headers, i will get adoublelibrary
> >> 3) if I include it only to the iframe part, which is always a part of
> >> the main page, it will work OK, but i will be changing the core
> >> joomla's files and will have to hack it every time when a new version
> >> is out
>
> >> So, I am trying to load it only, if it has not been loaded before.
> >> Does it make sense now?
>
> >> On Mar 23, 10:15 pm, Liam Potter  wrote:
>
> >>> well, the onesloadingthrough the iframe will need jquery loaded in the
> >>> iframe, and the components loaded one-by-one only need jquery loaded 
> >>> once..
>
> >>> I don't understand what you are trying to do hre, just load jquery in
> >>> the head.
>
> >>> Andy789 wrote:
>
>  Because some components are loaded inside of iframe and need its own
>  jQuery. some compionents are loaded one-by-one and need only one
>  common library
>
>  On Mar 23, 9:39 pm, Liam Potter  wrote:
>
> > why would you beloadingthe library for each script?
>
> > Andy789 wrote:
>
> >> Hi all,
>
> >> I have different independent modules using jquery and need to avoid
> >> its doubleloading. So, instead ofloadingjquery, I amloadingthe
> >> code:
>
> >> if (typeof jQuery != 'undefined') {
> >> document.write('');
> >> }
>
> >> Also, I have added a line var $j = jQuery.noConflict(); as a last line
> >> of jquery library file.
>
> >> The problem is that though it writes the code on document write, it
> >> does not seem that jquery is loaded at all, because I am getting an
> >> error  jQuery not defined.
>
> >> What am i doing wrong here? is there a more elegant way to load a
> >> library dynamically?
>
> >> Thanks


[jQuery] Re: Regarding jQuery UI tabs()

2009-03-24 Thread MorningZ

it's definitely possible, but would require going through the js and
theme css and changing the class name

so why would this be important to do?


On Mar 24, 9:21 pm, BigFisch  wrote:
> I was wondering if there was a way to rename the class when something
> is "active".
>
> Is it possible to define this in a parameter?
>
> Instead of "ui-state-active", I'd like it to use "active"


[jQuery] Re: referring to an array with a specific name

2009-03-24 Thread Macsig

Sweet!!!
thanks Steven that is exactly what I was talking about (sorry if I
have been confusing on my former explanation).

Have a good 1!

On Mar 24, 7:01 pm, Steven Yang  wrote:
> i think what macsig means is
> his arrays are like
>
> var a =[array a]
> var b = [array b]
>
> if thats the case
> you might want to do
>
> var arrays = {
>  'a' : [array a],
>  'b' : [array b]
>
> }
>
> then when select changes and you get the value
> you can get your array with
> var myArray = arrays[val];


[jQuery] Re: jquery, ajax success but wont load htl() ???

2009-03-24 Thread Mathew

ahhh, i moved the script to the top and made id (document).ready
and although it still shows in the response but at the top i am
getting results.
thanks a bunch!   i need to clean it up alot but as long as i am
getting results on screen im good.
hey man thanks for your time and consideration good job!

On Mar 24, 9:05 pm, James  wrote:
> I've noticed in your AJAX response (view via Firebug), you have a
> whole load of other stuff at the bottom of the response.
> If you're inserting into a table, your response should begin with
> , and end with .
> But you have a whole load of other things like  tags. This
> would make invalid HTML and would not display as expected.
>
> On Mar 24, 3:44 pm, James  wrote:
>
> > Try changing:
> > 
> > to: > >
> > > and use: > > jQuery("#searchresults").append(r); > > > See what happens. > > > On Mar 24, 3:33 pm, Mathew wrote: > > > > yes whetehr slideup/down is there is the same issue. the page is up at > > > ->   > > > http://undergroundinnertainment.com/2009/index.php?option=com_usersea... > > > thank you for your time also. > > > the response i get for example of a search is: > > > > edrease thomaspracyce
> > />paulsboro, nj | Is located: 7.78 From: 19146 | Artist > > td> > >  valign="top">Sasha Rodriguez > > ="Sasha Rodriguez">Sasha Rosa
> > style="color:gray">Philadelphia, PA > > > | Is located: 13.17 From: 19146 | Model > > class="sectiontableentry2" valign="top"> > > > > > alt="Tanikka" title="Tanikka">Neek Neek2010
> > class="small" style="color:gray">Philadelphia, Pa | Is located: 3.12 From: > > > >  19146 | Model > > valign="top">xiao xuan ANNIE liu > > title="xiao xuan ANNIE liu">rosepetalgurl
> > class="small" style="color:gray">philadelphia, pa | Is located: 1.58 From: > > > >  19146 | Model|*|Promoter > > class="sectiontableentry2" valign="top">Shatorra Ming > > title="Shatorra Ming">seximing
> > style="color:gray">Brooklyn, NY | Is located: 84.62 From: 19146 | > > > >  Model > > valign="top">Tara > > td>Mixbella
Bronx, NY | Is located: 96.33 From: 19146 | Model > > tr> > > >