[jQuery] Re: Validate optional field

2007-05-15 Thread Oddish

Thanks a lot! :)

On May 14, 3:48 pm, Dan G. Switzer, II [EMAIL PROTECTED]
wrote:
 I'm trying to validate an optional field with the validation plugin,
 using a custom method. Here's the code:

 rules: {
birthdate: { validBirthdate:true }
 },
 messages: {
 birthdate: {
 validBirthdate: Invalid birthdate
 }
 }

 How do I make this field optional? I only want to check the birthdate
 if the user has provided one. (I'm aware of the date method, but I'm
 purposely using a custom method).

 This is going to be controlled by your custom function. If you look at
 Jörn's built in validation methods, you'll see he validates the field if the
 field is also required:

 rangeLength: function(value, element, param) {
 var length = jQuery.validator.getLength(value, element);
 return !jQuery.validator.methods.required(value, element) || (
 length = param[0]  length = param[1] );

 },

 You can use the same approach in your custom validation, or you can just
 pass back true if the field is blank to say it passes validation.

 -Dan



[jQuery] Re: Tutorial example problem with Firefox?

2007-05-15 Thread SeViR


I check the example in Firefox 2.0.0.3 and it works for me. This is my 
sample

code:

!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN 
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;

html xmlns=http://www.w3.org/1999/xhtml;
head
meta http-equiv=Content-Type content=text/html; charset=iso-8859-1 /
titleDocumento sin tiacute;tulo/title
script type=text/javascript src=jquery.js/script
script type=text/javascript
   $(document).ready(function(){
$(a)
  .filter(.clickme)
.click(function(){
  alert(You are now leaving the site.);
})
  .end()
  .filter(.hideme)
.click(function(){
  $(this).hide();
  return false;
})
  .end();
   });
/script
/head

body
a href=http://google.com/; class=clickmeI give a message when you 
leave/a

a href=http://yahoo.com/; class=hidemeClick me to hide!/a
a href=http://microsoft.com/;I'm a normal link/a
/body
/html


Meburke escribió:

The example for Chainability works fine in IE6 and Mozilla, but does
not work in Firefox (2.0.0.3). When I click on the jquery no alert
shows up and I just get a new tab to the jquery site, when I click on
the You are now leaving the site. link, it opens up another tab, and
the same things happen when I click on the other two links. I
uninstalled NoScript, but that didn't help. I enabled pop-ups but that
didn't help. I specifically have JavaScript enabled in the options, so
I don't know what the difference may be with Firefox.

This is a great tool, and I simply want to find out what's happening
so I can warn users from the web page to review their settings. Does
anyone have any suggestions?

Thank you,

Mike B.


  



--
Best Regards,
José Francisco Rives Lirola sevir1ATgmail.com

SeViR CW · Computer Design
http://www.sevir.org
 
Murcia - Spain




[jQuery] Re: JQuery Form Plugin: encodeURIcomponent/decodeURI with ISO-8859-1

2007-05-15 Thread SeViR


Have you check to decode in server side?

/Encoding iso = Encoding.GetEncoding(iso8859-1);
//Encoding unicode = Encoding.UTF8;

I have never any problem with that.
/



sithram escribió:

Thanks Tony and Mike for your help, but I continue with the same
problem after your indications.

If I don't use ajax to send data (I mean I use normal submit) the ASP
page of the server works fine and insert information with the correct
characters.

Regards,

Xavier

On 12 mayo, 15:39, Mike Alsup [EMAIL PROTECTED] wrote:
  



  



--
Best Regards,
José Francisco Rives Lirola sevir1ATgmail.com

SeViR CW · Computer Design
http://www.sevir.org

Murcia - Spain




[jQuery] binding to two events (resize and onload)

2007-05-15 Thread willwade

Hi there
I have a wacky fix to the age old problem of fluid column widths (a
table would do of course). It involves using jquery to calculate the
sizes of my columns - the splitter code is a bit over the top for my
needs. So I have some simple code but I can't seem to get it to work.

$(document).bind(ready, resizeCols);
$(document).bind(resize, resizeCols);

function resizeCols() {
//Get full width of central col
var divWidth = $('#col-centre').width();
//now main should always be 80% and side 205px
mainWidth = divWidth - 205;
alert(mainWidth);
$('#main-content').width(mainWidth);
}

The alert doesn't show at all and Im not entirely sure why - I don't
get any errors showing up. My guess is that Im binding wrong - any
suggestions?

Thanks

Will



[jQuery] Re: Tutorial example problem with Firefox?

2007-05-15 Thread SeViR


I check the example in Firefox 2.0.0.3 and it works for me. This is my 
sample

code:

!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN 
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;

html xmlns=http://www.w3.org/1999/xhtml;
head
meta http-equiv=Content-Type content=text/html; charset=iso-8859-1 /
titleDocumento sin tiacute;tulo/title
script type=text/javascript src=jquery.js/script
script type=text/javascript
   $(document).ready(function(){
$(a)
  .filter(.clickme)
.click(function(){
  alert(You are now leaving the site.);
})
  .end()
  .filter(.hideme)
.click(function(){
  $(this).hide();
  return false;
})
  .end();
   });
/script
/head

body
a href=http://google.com/; class=clickmeI give a message when you 
leave/a

a href=http://yahoo.com/; class=hidemeClick me to hide!/a
a href=http://microsoft.com/;I'm a normal link/a
/body
/html


Meburke escribió:

The example for Chainability works fine in IE6 and Mozilla, but does
not work in Firefox (2.0.0.3). When I click on the jquery no alert
shows up and I just get a new tab to the jquery site, when I click on
the You are now leaving the site. link, it opens up another tab, and
the same things happen when I click on the other two links. I
uninstalled NoScript, but that didn't help. I enabled pop-ups but that
didn't help. I specifically have JavaScript enabled in the options, so
I don't know what the difference may be with Firefox.

This is a great tool, and I simply want to find out what's happening
so I can warn users from the web page to review their settings. Does
anyone have any suggestions?

Thank you,

Mike B.


  



--
Best Regards,
José Francisco Rives Lirola sevir1ATgmail.com

SeViR CW · Computer Design
http://www.sevir.org
 
Murcia - Spain




[jQuery] Re: JQuery Form Plugin: encodeURIcomponent/decodeURI with ISO-8859-1

2007-05-15 Thread Sithram PG
Thanks SeViR for your help, but in this case I must use ASP, nor ASP.NET.

Regards,



2007/5/15, SeViR [EMAIL PROTECTED]:


 Have you check to decode in server side?

 /Encoding iso = Encoding.GetEncoding(iso8859-1);
 //Encoding unicode = Encoding.UTF8;

 I have never any problem with that.
 /



 sithram escribió:
  Thanks Tony and Mike for your help, but I continue with the same
  problem after your indications.
 
  If I don't use ajax to send data (I mean I use normal submit) the ASP
  page of the server works fine and insert information with the correct
  characters.
 
  Regards,
 
  Xavier
 
  On 12 mayo, 15:39, Mike Alsup [EMAIL PROTECTED] wrote:
 
 
 
 


 --
 Best Regards,
 José Francisco Rives Lirola sevir1ATgmail.com

 SeViR CW · Computer Design
 http://www.sevir.org

 Murcia - Spain



 



[jQuery] Re: binding to two events (resize and onload)

2007-05-15 Thread Erik Beeson


Maybe try:

$(document).ready(resizeCols);
$(window).bind('load', resizeCols);

Or maybe you're getting a javascript error in one of the lines before
the alert that's causing it to halt. Check the firebug console or try
adding an alert at the top of the function.

--Erik

On 5/15/07, willwade [EMAIL PROTECTED] wrote:


Hi there
I have a wacky fix to the age old problem of fluid column widths (a
table would do of course). It involves using jquery to calculate the
sizes of my columns - the splitter code is a bit over the top for my
needs. So I have some simple code but I can't seem to get it to work.

$(document).bind(ready, resizeCols);
$(document).bind(resize, resizeCols);

function resizeCols() {
//Get full width of central col
var divWidth = $('#col-centre').width();
//now main should always be 80% and side 205px
mainWidth = divWidth - 205;
alert(mainWidth);
$('#main-content').width(mainWidth);
}

The alert doesn't show at all and Im not entirely sure why - I don't
get any errors showing up. My guess is that Im binding wrong - any
suggestions?

Thanks

Will




[jQuery] Re: tagging

2007-05-15 Thread jquery newbie

guys- thanks for the replies.. jake got me started and i ended up with
following.. if anybody can turn it into a plugin that takes the
input field's name and the list of tags as parameters, it might be
useful for the community..

script type=text/javascript
// ![CDATA[
$(function(){
$(span.tag).click(function(){
var input = $(input.tagtext);
if (input.val().search(new RegExp(\\b+$(this).text()+\
\b,i))===-1) {
input.val(input.val() + $(this).text() +  );
$(this).addClass(selected);
}
else
{
input.val(input.val().replace($(this).text() + 
 , ));
$(this).removeClass(selected);
}
return false;
});
});
// ]]
/script
style type=text/css
span.tag.selected {background:blue;color:white;padding:2px
6px;cursor:pointer;}
input.tagtext {width:400px;}
/style



[jQuery] Re: jquery tabs: adding a tab on the fly

2007-05-15 Thread Klaus Hartl


[EMAIL PROTECTED] wrote:

Thanks for this info.  One thing I notice when doing this is that when
I reinitialize the tabs, a whole new group of div id=remote-tab-#
containers gets created.  So for example, if there were 5 tabs
initially, and then I try and add a 6th, after reinitialization, there
are now

div id=remote-tab-1.../div
...
div id=remote-tab-11.../div

containers.  Here is the code I am using, which is basically what you
provided.  Maybe my tweaks messed it up?

jQuery.fn.newTabs = function(order_id) {
 $('ul.tabs-nav a', this).unbind('click');
 return this.tabs(order_id, {
 remote: true,
 fxFade: true,
 fxSpeed: 'fast',
 onShow: function(clicked, shown, hidden) {
clickTabAction(shown, false);
 }
});
};

...

var ul = $('#container ul');
ul.append(li id=\tab + retVal + \a href=
\draw_modules.php?tab_id= + retVal + \ + name +  span id=
\moduleCount + retVal + \ class=\tabModuleCount\(0)/span/a/
li\n);
var order_id = getSelectedTabOrderId();
$('#container').newTabs(order_id);


 - Dave


Yes, I didn't take remote tabs into account. That said, I cannot support 
creating Tabs properly right now, I'm sorry. Again, this will go into 
Tabs 3.


One workaround could be to disable certain tabs right from the beginning 
and enable them as you need them. Disabled tabs could be hidden via CSS:


/* hide disabled tabs */
.tabs-disabled {
display: none;
}

// initialize tabs with immediatly disabling
$('#container').tabs({
remote: true,
disabled: [4, 5]
});

// enable a tab later on
$('#container').enableTab(4);


-- Klaus










-- Klaus


[jQuery] Re: Tabs

2007-05-15 Thread Klaus Hartl


[EMAIL PROTECTED] wrote:

Hello. I am new to this group.

I would like to implement tab plugin into my site. I have read the
articles on 
http://stilbuero.de/2006/05/13/accessible-unobtrusive-javascript-tabs-with-jquery/
but i am still have problems figuring out howto make this run.

Here is my code.

script src=jquery.js type=text/javascript/script
script type=text/javascript
$.tabs = function(containerId, start) {
var ON_CLASS = 'on';
var id = '#' + containerId;
var i = (typeof start == number) ? start - 1 : 0;
$(id + 'div:lt(' + i + ')').add(id + 'div:gt(' + i +
')').hide();
$(id + 'ulli:nth-child(' + i + ')').addClass(ON_CLASS);
$(id + 'ullia').click(function() {
if (!$(this.parentNode).is('.' + ON_CLASS)) {
var re = /([_\-\w]+$)/i;
var target = $('#' + re.exec(this.href)[1]);
if (target.size()  0) {
$(id + 'div:visible').hide();
target.show();
$(id + 'ulli').removeClass(ON_CLASS);
$(this.parentNode).addClass(ON_CLASS);
} else {
alert('There is no such container.');
}
}
return false;
});
};
/script

div id=container
ul
lia href=#section-1Section 1/a/li
lia href=#section-2Section 2/a/li
lia href=#section-3Section 3/a/li
/ul
div id=section-1
...
/div
div id=section-2
...
/div
div id=section-3
...
/div
/div

Any suggestions on what I am doing wrong? Thanks



You are using the oldest version possible. You may want to have a look 
at the demo:


http://stilbuero.de/jquery/tabs/

and see what is possible with the plugin today. You can also download 
the latest version together with some working CSS from there.




-- Klaus


[jQuery] kelvinluck - date-picker V2

2007-05-15 Thread Vincent Majer


Hi,

first, sorry for my english.. not perfect..

second point, i should say thanks to kelvinluck for this great jquery 
plugin, the DatePicker V2 !


I'm trying to use it.. and i have some problems with IE6..

I've used the source from this page of example :
http://kelvinluck.com/assets/jquery/datePicker/v2/demo/datePickerIntoSelects.html

But it seems the date.js file makes IE6 finds an error.. so it doesn't 
work..


here is my code :

First, the scripts to include :

script type='text/javascript' src='/js/jquery-1.1.2.js'/script
script type=text/javascript src=/js/date.js/script
script type=text/javascript src=/js/date_fr.js/script
script type=text/javascript src=/js/jquery.dimensions.pack.js/script
!--[if IE]script type=text/javascript 
src=/js/jquery.bgiframe.js/script![endif]--

script type=text/javascript src=/js/jquery.datePicker.js/script
link rel=stylesheet type=text/css media=screen 
href=/css/datePicker.css



And then :

script type=text/javascript charset=utf-8
$(function()
{

// initialise the Select date link
$('#date-pick').datePicker(
// associate the link with a date picker
{
createButton:false,
startDate:'18/05/2007',
endDate:'11/12/2007'
}
).bind(
// when the link is clicked display the date picker
'click',
function()
{
updateSelects($(this).dpGetSelected()[0]);
$(this).dpDisplay();
return false;
}
).bind(
// when a date is selected update the SELECTs
'dateSelected',
function(e, selectedDate, $td, state)
{
updateSelects(selectedDate);
}
).bind(
'dpClosed',
function(e, selected)
{
updateSelects(selected[0]);
}
);

var updateSelects = function (selectedDate)
{
var d = selectedDate.getDate();
var m = selectedDate.getMonth();
var y = selectedDate.getFullYear();
($('#d')[0]).selectedIndex = d - 1;
($('#m')[0]).selectedIndex = m;
($('#y')[0]).selectedIndex = y - 2007;
}
// listen for when the selects are changed and update the picker
$('#d, #m, #y')
.bind(
'change',
function()
{
var d = new Date(
$('#y').val(),
$('#m').val()-1,
$('#d').val()
);
$('#date-pick').dpSetSelected(d);
});

// default the position of the selects to today
var today = new Date();
($('#d')[0]).selectedIndex = today.getDate() - 1;
($('#m')[0]).selectedIndex = today.getMonth();
($('#y')[0]).selectedIndex = today.getFullYear() - 2007;

// and update the datePicker to reflect it...
$('#d').trigger('change');
});
/script


It works well with Firefox But IE6 complains about a missing ] on line 
7, car 94.. code : 0.. i don't know what to do to make it work.. and 
that line/char reference doesn't mean anything.. BUT the error message 
changes when i remove the date.js from the called scripts.. ?


Any helps or advices .. ?

Thanks !!



[jQuery] Re: help! imagebox disaster - website crashes safari

2007-05-15 Thread Klaus Hartl


Robert O'Rourke wrote:


Help!

   I'm really desperate here, the site I just set live is causing safari 
to crash when you click through to a property page.. not good. The only 
unique thing about the page is that I am including imagebox and 
interface in the head. Are there known issues with this in safari? Could 
it be the other effects interfering with it?


   url is http://www.italianpropertygallery.com, if you click through to 
any property safari crashes. I don't have a mac so can't test it 
properly here.


   I'd appreciate any suggestions or advice or I'm going to have to just 
hide that js from safari. All other browsers are working as expected.


   Thanks in advance,
   Rob



Look for occurences of $(elem).hmtl('...'). This causes Safari to crash 
for me as well. You have to replace it with $(elem)[0].innerHTML = '...'


If you're using jQuery 1.1.2 that is. That should be fixed with the 
latest version.




-- Klaus



[jQuery] Re: kelvinluck - date-picker V2

2007-05-15 Thread Vincent Majer


ok, i've found an error in my date_fr.js, it's ok now..

When i load the page i don't have an error showing in IE6, BUT...

When i click the calendar icon, i've got another pretty error message :
Line 333
Car 4
Erreur : console est indéfini
Code : 0


... ??

Does anyone know what's this error ?


Vincent Majer a écrit :


Hi,

first, sorry for my english.. not perfect..

second point, i should say thanks to kelvinluck for this great jquery 
plugin, the DatePicker V2 !


I'm trying to use it.. and i have some problems with IE6..

I've used the source from this page of example :
http://kelvinluck.com/assets/jquery/datePicker/v2/demo/datePickerIntoSelects.html 



But it seems the date.js file makes IE6 finds an error.. so it doesn't 
work..


here is my code :

First, the scripts to include :

script type='text/javascript' src='/js/jquery-1.1.2.js'/script
script type=text/javascript src=/js/date.js/script
script type=text/javascript src=/js/date_fr.js/script
script type=text/javascript 
src=/js/jquery.dimensions.pack.js/script
!--[if IE]script type=text/javascript 
src=/js/jquery.bgiframe.js/script![endif]--

script type=text/javascript src=/js/jquery.datePicker.js/script
link rel=stylesheet type=text/css media=screen 
href=/css/datePicker.css



And then :

script type=text/javascript charset=utf-8
$(function()
{
   
// initialise the Select date link

$('#date-pick').datePicker(
// associate the link with a date picker
{
createButton:false,
startDate:'18/05/2007',
endDate:'11/12/2007'
}
).bind(
// when the link is clicked display the date picker
'click',
function()
{
updateSelects($(this).dpGetSelected()[0]);
$(this).dpDisplay();
return false;
}
).bind(
// when a date is selected update the SELECTs
'dateSelected',
function(e, selectedDate, $td, state)
{
updateSelects(selectedDate);
}
).bind(
'dpClosed',
function(e, selected)
{
updateSelects(selected[0]);
}
);
   
var updateSelects = function (selectedDate)

{
var d = selectedDate.getDate();
var m = selectedDate.getMonth();
var y = selectedDate.getFullYear();
($('#d')[0]).selectedIndex = d - 1;
($('#m')[0]).selectedIndex = m;
($('#y')[0]).selectedIndex = y - 2007;
}
// listen for when the selects are changed and update the picker
$('#d, #m, #y')
.bind(
'change',
function()
{
var d = new Date(
$('#y').val(),
$('#m').val()-1,
$('#d').val()
);
$('#date-pick').dpSetSelected(d);
});
   
// default the position of the selects to today

var today = new Date();
($('#d')[0]).selectedIndex = today.getDate() - 1;
($('#m')[0]).selectedIndex = today.getMonth();
($('#y')[0]).selectedIndex = today.getFullYear() - 2007;

// and update the datePicker to reflect it...

$('#d').trigger('change');
});
/script


It works well with Firefox But IE6 complains about a missing ] on line 
7, car 94.. code : 0.. i don't know what to do to make it work.. and 
that line/char reference doesn't mean anything.. BUT the error message 
changes when i remove the date.js from the called scripts.. ?


Any helps or advices .. ?

Thanks !!






[jQuery] Re: help! imagebox disaster - website crashes safari

2007-05-15 Thread Erik Beeson


I don't have a suggestion on why it happens, but I can confirm that it
kills Safari. I see you're using an old version of jQuery (rev 1460,
current is 1465). Maybe try updating? Or maybe try the current SVN
version?

Also, you might want to move that animating that you're doing at the
top of $(document).ready(function() {...}) to
$(window).load(function() {...}). I don't know if animating before the
page has loaded would cause Safari to crash, but you probably want the
animation to start on load anyways.

--Erik


On 5/15/07, Robert O'Rourke [EMAIL PROTECTED] wrote:


Help!

I'm really desperate here, the site I just set live is causing
safari to crash when you click through to a property page.. not good.
The only unique thing about the page is that I am including imagebox and
interface in the head. Are there known issues with this in safari? Could
it be the other effects interfering with it?

url is http://www.italianpropertygallery.com, if you click through
to any property safari crashes. I don't have a mac so can't test it
properly here.

I'd appreciate any suggestions or advice or I'm going to have to
just hide that js from safari. All other browsers are working as expected.

Thanks in advance,
Rob



[jQuery] Re: kelvinluck - date-picker V2

2007-05-15 Thread Vincent Majer


another error fixed, in the jquery.datepicker.js, line 332
i've commented console.log(c) and it runs in IE6

BUT.. (arghh)

I've still got error.. on IE 7 !!! when the page loads :
Line 790
car 1
Syntax Error


nobody uses this great plugin ??





Vincent Majer a écrit :


ok, i've found an error in my date_fr.js, it's ok now..

When i load the page i don't have an error showing in IE6, BUT...

When i click the calendar icon, i've got another pretty error message :
Line 333
Car 4
Erreur : console est indéfini
Code : 0


... ??

Does anyone know what's this error ?


Vincent Majer a écrit :


Hi,

first, sorry for my english.. not perfect..

second point, i should say thanks to kelvinluck for this great jquery 
plugin, the DatePicker V2 !


I'm trying to use it.. and i have some problems with IE6..

I've used the source from this page of example :
http://kelvinluck.com/assets/jquery/datePicker/v2/demo/datePickerIntoSelects.html 



But it seems the date.js file makes IE6 finds an error.. so it doesn't 
work..


here is my code :

First, the scripts to include :

script type='text/javascript' src='/js/jquery-1.1.2.js'/script
script type=text/javascript src=/js/date.js/script
script type=text/javascript src=/js/date_fr.js/script
script type=text/javascript 
src=/js/jquery.dimensions.pack.js/script
!--[if IE]script type=text/javascript 
src=/js/jquery.bgiframe.js/script![endif]--

script type=text/javascript src=/js/jquery.datePicker.js/script
link rel=stylesheet type=text/css media=screen 
href=/css/datePicker.css



And then :

script type=text/javascript charset=utf-8
$(function()
{
   // initialise the Select date link
$('#date-pick').datePicker(
// associate the link with a date picker
{
createButton:false,
startDate:'18/05/2007',
endDate:'11/12/2007'
}
).bind(
// when the link is clicked display the date picker
'click',
function()
{
updateSelects($(this).dpGetSelected()[0]);
$(this).dpDisplay();
return false;
}
).bind(
// when a date is selected update the SELECTs
'dateSelected',
function(e, selectedDate, $td, state)
{
updateSelects(selectedDate);
}
).bind(
'dpClosed',
function(e, selected)
{
updateSelects(selected[0]);
}
);
   var updateSelects = function (selectedDate)
{
var d = selectedDate.getDate();
var m = selectedDate.getMonth();
var y = selectedDate.getFullYear();
($('#d')[0]).selectedIndex = d - 1;
($('#m')[0]).selectedIndex = m;
($('#y')[0]).selectedIndex = y - 2007;
}
// listen for when the selects are changed and update the picker
$('#d, #m, #y')
.bind(
'change',
function()
{
var d = new Date(
$('#y').val(),
$('#m').val()-1,
$('#d').val()
);
$('#date-pick').dpSetSelected(d);
});
   // default the position of the selects to today
var today = new Date();
($('#d')[0]).selectedIndex = today.getDate() - 1;
($('#m')[0]).selectedIndex = today.getMonth();
($('#y')[0]).selectedIndex = today.getFullYear() - 2007;
// and update the datePicker to reflect it...
$('#d').trigger('change');
});
/script


It works well with Firefox But IE6 complains about a missing ] on 
line 7, car 94.. code : 0.. i don't know what to do to make it work.. 
and that line/char reference doesn't mean anything.. BUT the error 
message changes when i remove the date.js from the called scripts.. ?


Any helps or advices .. ?

Thanks !!









[jQuery] Re: remove() callback

2007-05-15 Thread Sam Collett

On May 15, 6:08 am, Equand [EMAIL PROTECTED] wrote:
 but empty clears the element. and I need only to remove a particular
 element...
 if i use empty, i need to clear the parent. but there are some
 elements in parent which should not be removed...

You could save a reference to its parent before hand, e.g.

$(a.removeme).click(
function(e)
{
e.preventDefault();
var $this = $(this), $parent = $this.parent();
$parent.find(.removemetoo).remove();
}
)



[jQuery] Re: help! imagebox disaster - website crashes safari

2007-05-15 Thread Robert O'Rourke


Klaus Hartl wrote:


Robert O'Rourke wrote:


Help!

   I'm really desperate here, the site I just set live is causing 
safari to crash when you click through to a property page.. not good. 
The only unique thing about the page is that I am including imagebox 
and interface in the head. Are there known issues with this in 
safari? Could it be the other effects interfering with it?


   url is http://www.italianpropertygallery.com, if you click through 
to any property safari crashes. I don't have a mac so can't test it 
properly here.


   I'd appreciate any suggestions or advice or I'm going to have to 
just hide that js from safari. All other browsers are working as 
expected.


   Thanks in advance,
   Rob



Look for occurences of $(elem).hmtl('...'). This causes Safari to 
crash for me as well. You have to replace it with $(elem)[0].innerHTML 
= '...'


If you're using jQuery 1.1.2 that is. That should be fixed with the 
latest version.




-- Klaus



Thanks a million Klaus and Erik,
   Upgrading to the latest build did sort out the crashing however 
safari still failed to load the images via imagebox. I found this 
replacement version of the script: 
http://www.intelliance.fr/jquery/imagebox/ that solves the problem. All 
working now, panic over... phew!


   I've checked out the latest build out via svn now so I have a first 
port of call for debugging. And less of these frantically bashed out 
emails =P


   Erik, I moved the animation effect back inside the $(document).ready 
function some time ago, I don't know how that old code ended up on your 
computer... our servers do some funny caching at the moment so I'll have 
to check it out.


   Thanks again,
   Rob


[jQuery] Re: Text Highlighting from Search

2007-05-15 Thread Renato Formato



Wow, that looks robust.  Definetely let me know when it's released.
So I assume, I would remove the search definitions and add something like:
[/^http:\/\/(www\.)?commadot\./i, /s=([^]+)/i], 


I get a little lost on the syntax there.
It might be worth while in the plugin to make a simple api to create new 
ones like

{http:true,
https:false,
url: *.commadot.com,
urlVariable: s}

or maybe allow it to take a dom element text, which would help in AJax 
situations.  Like the content of a span would be the keywords?




Thanks Glen, I know that regular expressions are not easy to use. The 
idea of using an API to build the regexs is a good one and cover most of 
the cases but not all, those in which the words are not in the query 
string  (ex: sites using dir names to search a tag 
www.my_site.com/jQuery). However I think that something better can be done.


The plugin is based on referrer urls. It seems you need to highlight 
words taking them from your current url. Another good addition to do.


Talking about brainstorming, maybe it can be done with an option like this:

url = {
 type:referrer or current,
 schema:http,
 domain:commadot.com,
 path:,
 urlVar=s
}

Another idea can be to provide a keys option, in which you could set a 
space separated list of keywords to search. When keys is set, no 
regexs would be evaluated, the plugin would directly search for this keys.


Ex:
//when retrieving the keys from the url
var search = window.location.match(/s=([^]+)/i);
or
//when retrieving the keys from a DOM element
var search = jQuery(#searchTerm).text();
//go to search
options = {keys:search};
jQuery(function(){
jQuery(document).SEhighlight(options);
})

Renato


[jQuery] Form Validation Plugin

2007-05-15 Thread Mandy Singh

Does jquery have a simple form validation plugin where I can define the
rules for a field and respective error messages and throw all messages out
to a common container on top of the form. No ajax just simple client side
validations. The one I saw on the wiki is really huge and does all sorts of
things but I just want a simple one. Anything available? Else I'll write
something up. Please let me know.

Regards,
Mandy.


[jQuery] [OT] dedicated hosting in europe

2007-05-15 Thread spinnach


sorry about this being completely off topic, but can anyone recommend 
some good hosting provider (which offers dedicated servers), but located 
in europe ? we're building a pretty big portal and since all of the 
users will be from europe it would be great if the server was in europe 
also..


thanks, i apologize again for this being completely ot..

dennis.


[jQuery] Re: Form Validation Plugin

2007-05-15 Thread Luc Pestille
Jörn Zaefferer's Validation plugin ( 
http://bassistance.de/jquery-plugins/jquery-plugin-validation/ 
http://bassistance.de/jquery-plugins/jquery-plugin-validation/  ) will do 
what you want. It does huge stuff too, but also very simple validation, just 
add a class {required:true} to inputs, at it's most basic...
 



From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mandy 
Singh
Sent: 15 May 2007 12:29
To: jquery-en@googlegroups.com
Subject: [jQuery] Form Validation Plugin


Does jquery have a simple form validation plugin where I can define the rules 
for a field and respective error messages and throw all messages out to a 
common container on top of the form. No ajax just simple client side 
validations. The one I saw on the wiki is really huge and does all sorts of 
things but I just want a simple one. Anything available? Else I'll write 
something up. Please let me know. 

Regards,
Mandy. 

In2
Thames House
Mere Park
Dedmere Road
Marlow
Bucks
SL7 1PB

Tel 01628 899700
Fax 01628 899701
e: [EMAIL PROTECTED]
i: www.in2.co.uk

This message (and any associated files) is intended only for the use of 
jquery-en@googlegroups.com and may contain information that is confidential, 
subject to copyright or constitutes a trade secret. If you are not 
jquery-en@googlegroups.com you are hereby notified that any dissemination, 
copying or distribution of this message, or files associated with this message, 
is strictly prohibited. If you have received this message in error, please 
notify us immediately by replying to the message and deleting it from your 
computer. Messages sent to and from us may be monitored. Any views or opinions 
presented are solely those of the author [EMAIL PROTECTED] and do not 
necessarily represent those of the company.


[jQuery] Re: remove() callback

2007-05-15 Thread Sam Collett

Missed a line ($this.remove())

On May 15, 11:10 am, Sam Collett [EMAIL PROTECTED] wrote:
 You could save a reference to its parent before hand, e.g.

 $(a.removeme).click(
 function(e)
 {
 e.preventDefault();
 var $this = $(this), $parent = $this.parent();
   $this.remove();
 $parent.find(.removemetoo).remove();
 }
 )



[jQuery] Re: remove() callback

2007-05-15 Thread Equand



On May 15, 1:58 pm, Sam Collett [EMAIL PROTECTED] wrote:
 Missed a line ($this.remove())

 On May 15, 11:10 am, Sam Collett [EMAIL PROTECTED] wrote: You could save a 
 reference to its parent before hand, e.g.

  $(a.removeme).click(
  function(e)
  {
  e.preventDefault();
  var $this = $(this), $parent = $this.parent();

$this.remove();

  $parent.find(.removemetoo).remove();
  }
  )
this won't help...  i don't need a function to remove...
i just need the next function to start right after the remove() but
not at the time of remove... so e.g. on appending a span to a div the
previous span removes, but now the div jumps because of this...



[jQuery] Re: remove() callback

2007-05-15 Thread Erik Beeson


Like I said before, when you call remove, execution won't continue
until remove is finished. There's no need for a callback. Could you
maybe clarify the problem that you are having? I don't understand what
this means: on appending a span to a div the previous span removes,
but now the div jumps because of this. A simple test page that shows
the problem would help.

--Erik


On 5/15/07, Equand [EMAIL PROTECTED] wrote:




On May 15, 1:58 pm, Sam Collett [EMAIL PROTECTED] wrote:
 Missed a line ($this.remove())

 On May 15, 11:10 am, Sam Collett [EMAIL PROTECTED] wrote: You could save a 
reference to its parent before hand, e.g.

  $(a.removeme).click(
  function(e)
  {
  e.preventDefault();
  var $this = $(this), $parent = $this.parent();

$this.remove();

  $parent.find(.removemetoo).remove();
  }
  )
this won't help...  i don't need a function to remove...
i just need the next function to start right after the remove() but
not at the time of remove... so e.g. on appending a span to a div the
previous span removes, but now the div jumps because of this...




[jQuery] Concurrent Ajax request

2007-05-15 Thread Stefano Sala

Hi everybody!
I'm trying to create a page that:
 - refreshes every 5 seconds some part of it.
 - if a button is pressed, to post data to a web service.

The problem is that the second ajax request wait until the first
finish, and doesn't run concurrently.

The code i use is this:

function SetOffertaAsta() {
if (confirm('Sicuro?')) {
$(div# + divContenutorePulsanteOfferta).hide();
ScriviMessaggio('Elaborazione offerta...');
$.ajax({
url: WebServicePath + 'setOffertaAsta',
beforeSend: function () {
IsOffering = true;
},
complete: function() {
IsOffering = false;
},
global: false,
success: function (xml) {
GetInfoAsta(0, false);
OutputErrore(xml);
},
data: {
IdAsta: idAsta,
Valore: ProssimaOfferta
},
timeout: 15000,
type: 'POST'
});
}

return false;
}

and

function GetInfoAsta(pTimeoutServer, rilancia) {
$.ajax({
url: WebServicePath + 'getInfoAsta',
async: true,
error: function () { RichiestaCompleta(0, null, rilancia) },
success: function (XML) { RichiestaCompleta(1, XML,
rilancia) },
data: {
IdAsta: idAsta,
Timeout: pTimeoutServer
},
timeout: 1,
type: 'POST'
});
}

can anybody help?

Thanks!!
Stefano



[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


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
jQuery (English) group.
To post to this group, send email to jquery-en@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jquery-en?hl=en
-~--~~~~--~~--~--~---



[jQuery] Re: Form plugin: Multiple submit buttons

2007-05-15 Thread Scott Sauyet


wyo wrote:

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?


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 separation.


But if you really don't mind a complete dependency on JS, something like 
this (untested) code should work:


$(#button1).click(function() {
$(this).parents(form)[0].action = action1.php;
});
$(#button2).click(function() {
$(this).parents(form)[0].action = action2.php;
});
// ...

Cheers,

  -- Scott



[jQuery] Small delay in animate function - how can I fix it?

2007-05-15 Thread Andy Matthews
http://www.commadelimited.com/clients/haven/atkins/floor-plans.html
 
On this page, if you click any of the olive colored buttons on the left,
you'll see the text slide to the right as an indicator for which floor plan
is active. It also slides any other active item back to the left. When
clicked, there's a small delay before the plan slides right...I don't know
why this is happening. Can anyone help me out with this?
 
Also, is there a list of properties that can be animated using this
function? I tried animating the text-align property and it didn't work.
 

 
Andy Matthews
Senior Coldfusion Developer

Office:  877.707.5467 x747
Direct:  615.627.9747
Fax:  615.467.6249
[EMAIL PROTECTED]
www.dealerskins.com http://www.dealerskins.com/ 
 
dealerskinslogo.bmp

[jQuery] Re: Form plugin: Multiple submit buttons

2007-05-15 Thread Mike Alsup


The best way to handle this is to give the submit buttons a name and
value and key off that data on the server tier.

Mike


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?


[jQuery] Thickbox fade in / out...is this possible?

2007-05-15 Thread Andy Matthews
I'm using thickbox on a site I'm building:
http://www.commadelimited.com/clients/haven/atkins/photo-gallery.html
 
The client wants to know if I can fade the thickbox page in and out when
clicked instead of having it just pop into being. Is this possible? If so,
how might I accomplish it?
 
FYI: The large photos are crap right now as the client hasn't given me the
larger sizes yet
 

 
Andy Matthews
Senior Coldfusion Developer

Office:  877.707.5467 x747
Direct:  615.627.9747
Fax:  615.467.6249
[EMAIL PROTECTED]
www.dealerskins.com http://www.dealerskins.com/ 
 
dealerskinslogo.bmp

[jQuery] Re: Concurrent Ajax request

2007-05-15 Thread Stefano Sala

Maybe it's a firefox limit?



[jQuery] Re: Small delay in animate function - how can I fix it?

2007-05-15 Thread Scott Sauyet


Andy Matthews wrote:

http://www.commadelimited.com/clients/haven/atkins/floor-plans.html
 
On this page, if you click any of the olive colored buttons on the left, 
you'll see the text slide to the right as an indicator for which floor 
plan is active. It also slides any other active item back to the left. 
When clicked, there's a small delay before the plan slides right...I 
don't know why this is happening. Can anyone help me out with this?


You are first animating it to the left slowly, and then animating it to 
the right.  The left animation of all others includes the current one, 
and these animations follow one after the other.  I think if you filter 
out the current one from your list to return left, it should work:


$('#buttons a span').not(# + me.attr('id')).animate({left: 0}, 
slow);


A nice site, by the way.

Cheers,

  -- Scott



[jQuery] thickbox reloaded?

2007-05-15 Thread Alexandre Plennevaux
hello,
 
I know thickbox 3 is out. What of the parallel branch thickbox reladed ? Is 
it still on?
 
thank you,
 
Alexandre
 

 



[jQuery] Re: Small delay in animate function - how can I fix it?

2007-05-15 Thread Andy Matthews

Thanks for your help Scott...I'll give that a shot. I thought about doing
that, but didn't really know how.

Thanks for your comments too...I'm only the architect of the site, I'm doing
it for a local design house who doesn't know how to build...only design.


andy 

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Scott Sauyet
Sent: Tuesday, May 15, 2007 8:54 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Small delay in animate function - how can I fix it?


Andy Matthews wrote:
 http://www.commadelimited.com/clients/haven/atkins/floor-plans.html
  
 On this page, if you click any of the olive colored buttons on the 
 left, you'll see the text slide to the right as an indicator for which 
 floor plan is active. It also slides any other active item back to the
left.
 When clicked, there's a small delay before the plan slides right...I 
 don't know why this is happening. Can anyone help me out with this?

You are first animating it to the left slowly, and then animating it to the
right.  The left animation of all others includes the current one, and these
animations follow one after the other.  I think if you filter out the
current one from your list to return left, it should work:

 $('#buttons a span').not(# + me.attr('id')).animate({left: 0},
slow);

A nice site, by the way.

Cheers,

   -- Scott




[jQuery] Re: remove() callback

2007-05-15 Thread Equand

yeah i managed that with a check on element existence.
now it removes before appending, not appending before removing...
the problem was simple... the remove() itself was called in a
callback...

On May 15, 2:50 pm, Erik Beeson [EMAIL PROTECTED] wrote:
 Like I said before, when you call remove, execution won't continue
 until remove is finished. There's no need for a callback. Could you
 maybe clarify the problem that you are having? I don't understand what
 this means: on appending a span to a div the previous span removes,
 but now the div jumps because of this. A simple test page that shows
 the problem would help.

 --Erik

 On 5/15/07, Equand [EMAIL PROTECTED] wrote:



  On May 15, 1:58 pm, Sam Collett [EMAIL PROTECTED] wrote:
   Missed a line ($this.remove())

   On May 15, 11:10 am, Sam Collett [EMAIL PROTECTED] wrote: You could 
   save a reference to its parent before hand, e.g.

$(a.removeme).click(
function(e)
{
e.preventDefault();
var $this = $(this), $parent = $this.parent();

  $this.remove();

$parent.find(.removemetoo).remove();
}
)
  this won't help...  i don't need a function to remove...
  i just need the next function to start right after the remove() but
  not at the time of remove... so e.g. on appending a span to a div the
  previous span removes, but now the div jumps because of this...



[jQuery] showing overlay when loading doesn't fullscreen when scroll-down

2007-05-15 Thread ibug~

css code is :
#overlay {
display: none;
position: absolute;
z-index:100;
top: 0px;
left: 0px;
background-color:#00;
filter: alpha(opacity=75);
opacity: .75;
height: 100%;
width: 100%;
}
#modal {
display: none;
position: absolute;
left: 50%;
top: 50%;
z-index: 101;
width: 200px;
   margin: -100px;
  background-color: #fff;
  border:1px solid #222;
  padding: 15px;
  text-align:center;
}

html code is :
div id=overlay/div
div id=modal
tabletr
tdimg id=loader 
src=?=base_url();?../Images/ajax-loader.gif/
/td
tdloading.../td
/tr/table
/div

javascript for show and hide them is :
function loading() {
$('#overlay, #modal').show();
}
function loaded() {
$('#overlay, #modal').hide();
}

Everything is ok except when overlay and modal showing (run function
loading())
i have tried scroll-down, the overlay doesn't really fullscreen!!
(fullscreen only doesn't any scrolling)

- disable scrolling ?
- really overlay fullscreen ?
- any idea ?

thanks a lot.



[jQuery] Re: thickbox reloaded?

2007-05-15 Thread Su

On 5/15/07, Alexandre Plennevaux [EMAIL PROTECTED] wrote:


 hello,

I know thickbox 3 is out. What of the parallel branch thickbox reladed ?
Is it still on?





From Klaus in the Thickbox 3 announcement thread:



Sam Collett wrote:
 Will this effect the development of thickbox reloaded (http://
 stilbuero.de/jquery/thickbox_reloaded/) which is designed to be used
 more like a plugin (i.e. $(#myimage).thickbox())?

No, absolutely not! All I can say is that I'm already using Thickbox
Reloaded quite heavily for plazes and it is pretty stable now. There's
only one little bug left in IE 6, then I'll be ready to announce its
beta status.



[jQuery] Re: thickbox reloaded?

2007-05-15 Thread Klaus Hartl

Alexandre Plennevaux wrote:
 hello,
  
 I know thickbox 3 is out. What of the parallel branch thickbox reladed 
 ? Is it still on?
  
 thank you,
  
 Alexandre

Yes, it is still on the plate. It has a few things that TB 3 doesn't 
have, thus I still see a reason to finish it. Unfortunately I'm very, 
very busy right now with Plazes, but the good thing is, that I'm using 
Thickbox Reloaded (funny, I kind of anticipated TB3 when I chose that 
name) heavily there already, and whats in SVN now is stable (could call 
it beta).

I'm planning to release TR soon after the relaunch.


-- Klaus


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
jQuery (English) group.
To post to this group, send email to jquery-en@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jquery-en?hl=en
-~--~~~~--~~--~--~---



[jQuery] Hide DIV on page click help

2007-05-15 Thread Jeff

I am trying to add some functionality to my page where a user clicks
on a link which makes a menu layer visible.  That part I've been able
to do.  Now, I would like that DIV to disappear when the user clicks
anwhere else on that page, on other words, making the menu disappear
when it loses focus.  Basically trying to emulate windows menu
functionality.  How do I make that happen?  Thanks in advance



[jQuery] Re: Retrieving specific xml node from xml document

2007-05-15 Thread chillstroll

Almost got it only one problem now. How do I get the specific div
details that was hidden on document load to show again?

JQUERY CODE:
script type=text/javascript
 $(function() {
$.ajax({url: 'tiydschedule.xml',
type: 'GET',
dataType: 'xml',
timeout: 1000,
error: function(){
alert('Error loading XML document');
},
success: function(xml){
   $('show',xml).each(function(id){
var date = $('date',this).text();
var dayofweek = $('dayofweek',this).text();
var image = $('image',this).text();
var title = $('title',this).text();
var description = $('description',this).text();
var filename = $('filename',this).text();
var guests = $('guests',this).text();
var specialoffer = 
$('specialoffer',this).text();
var specialofferproductid = $
('specialofferproductid',this).text();
var divthumbnails = 'divh4'+dayofweek+'/h4pimg
src=/images/weekly_guide/'+image+' class=today width=105
height=75//p/div';
var divdetails = 'div 
id='+dayofweek+'divh4'+date
+'/h4/divdiva href=/media/'+filename+'img src=/images/
weekly_guide/'+image+' //a/divh2'+title+'br/a href=/
media/'+filename+'watch now#187;/a/h2p'+description+'/
ph3Todays Offers:/h3pullia href=/shopping/
product_detail.cfm/itemid/'+specialofferproductid+''+specialoffer+'/
a/li/ul/p/div';
$('.wkguidedays').append(divthumbnails);
$('.wkguidetoday').append(divdetails).hide();
   });
}
});
$('.wkguidetoday').find([EMAIL PROTECTED]).show();
 });

/script

I am loading all the data when the document loads and appending to div
classes(.wkguidedays and .wkguidetoday). I am then hiding the
.wkguidetoday class after appending the divdetails variable to it.
However, I want the first of the divdetails (div id=monday...)
within the .weguidetoday class to show up first;

This code is not working for me:
$('.wkguidetoday').find([EMAIL PROTECTED]).show();

How do I get the first one to show up after initially hiding entire
.wkguidetoday class?

Thanks!



On May 14, 6:58 pm, chillstroll [EMAIL PROTECTED] wrote:
 Jake,
 I will try your suggestions out tomorrow and let you know.

 Thanks for the detailed response..Very helpful.

 On May 14, 4:59 pm, Jake McGraw [EMAIL PROTECTED] wrote:

  Couple of things:

  1. this is automatically cast to which ever context you're using it in, in
  your case, since you haven't escaped any quotations, when the inline script
  is run, you're operating within the context of the anchor, a, element so
  the anchor gets passed to the getShow() function, which explains why nothing
  shows.

  2. Even if you had properly escaped the single quotes and included the
  correct this when building your anchors, you would have passed an object
  reference. This reference would not be properly passed when the html string
  is parsed and inserted into the document. Therefore, your method of manually
  building anchors and setting their onclick events, all in html, will not
  work.

  The correct way to do this would be something like:

  Javascript:
  // All of your code and then...
  // Notice that I removed the onclick attribute from the anchor tag
  var divrow = 'divh4'+dayofweek+'/h4pa href=#img
  src=/images/weekly_guide/'+image+'class=today width=105
  height=75//a/p/div';

  // Create variable xml to prevent this from being overwritten in separate
  context
  var xml = this;
  $('.wkguidedays').append(divrow).find('a:last').click(function(xml){
getShow(xml);

// Prevent memory leaks
xml = null;

// Prevent propagation
return false;

  });

  So, now that we are properly passing the 'xml' to getShow(), we have to
  change a couple of things within that function as well. The most glaring
  issue is the fact jQuery won't accept an object  as a selector, which is
  what you're trying to do, so you need to instead submit two arguments, in
  the following form:

  $(selector string,context);

  The following should work:

  function getShow(xml) {
$('date',xml).text();
...

  }

  Now, having said all of this, you may want to rethink how the whole project
  is set up. It seems you're delivering a decent amount of information via
  ajax, could you do this when the document loads and then hide it? For that
  matter, using anchors with href=# is not good because of event
  propagation, you'll have to return false and it's 

[jQuery] Re: Retrieving specific xml node from xml document

2007-05-15 Thread Benjamin Sterling
Not sure if I am totally understanding, so bare with me.  You want the first
on to sure of the divs with the class wkguidetoday correct?  Then
something like (not tested and off the top of my head)
$('.wkguidetoday[0]).show();  or $('.wkguidetoday:first).show(); or
$('wkguidetoday').lt(1).show();

If i misunderstood let me know.

-- 
Benjamin Sterling
http://www.KenzoMedia.com
http://www.KenzoHosting.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
jQuery (English) group.
To post to this group, send email to jquery-en@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jquery-en?hl=en
-~--~~~~--~~--~--~---



[jQuery] Re: binding to two events (resize and onload)

2007-05-15 Thread willwade

Ive got it  - for the record:

$(document).ready(resizeCols);
$(window).bind('resize', resizeCols);

function resizeCols() {
//Get full width of central col
var divWidth = $('#col-centre').width();
//now main should always be 80% and side 205px
mainWidth = divWidth - 209;
$('#main-content').width(mainWidth+'px');
}

thanks Erik!

W

On May 15, 8:46 am, Erik Beeson [EMAIL PROTECTED] wrote:
 Maybe try:

 $(document).ready(resizeCols);
 $(window).bind('load', resizeCols);

 Or maybe you're getting a javascript error in one of the lines before
 the alert that's causing it to halt. Check the firebug console or try
 adding an alert at the top of the function.

 --Erik

 On 5/15/07, willwade [EMAIL PROTECTED] wrote:



  Hi there
  I have a wacky fix to the age old problem of fluid column widths (a
  table would do of course). It involves using jquery to calculate the
  sizes of my columns - the splitter code is a bit over the top for my
  needs. So I have some simple code but I can't seem to get it to work.

  $(document).bind(ready, resizeCols);
  $(document).bind(resize, resizeCols);

  function resizeCols() {
  //Get full width of central col
  var divWidth = $('#col-centre').width();
  //now main should always be 80% and side 205px
  mainWidth = divWidth - 205;
  alert(mainWidth);
  $('#main-content').width(mainWidth);
  }

  The alert doesn't show at all and Im not entirely sure why - I don't
  get any errors showing up. My guess is that Im binding wrong - any
  suggestions?

  Thanks

  Will



[jQuery] onRelease (drop) event for Interface Elements Slider

2007-05-15 Thread [EMAIL PROTECTED]

I'm trying to figure out if there is a way to monitor the release
event for the Interface Elements Slider widget. Essentially, I am
trying to update the position of the slider using SetValues on a
constant basis, but want to suspend that updating process when the
user begins dragging the slider handle (indicator) and then resume the
process when the complete dragging/release the handle. Any help would
be greatly appreciated!



[jQuery] Re: [OT] dedicated hosting in europe

2007-05-15 Thread Benjamin Sterling

Dennis, check out webhostingtalk.com they have a pretty good recommendation
section.  or at least had.  Did not see that section just now, but you can
ask in the forum there.

--
Benjamin Sterling
http://www.KenzoMedia.com
http://www.KenzoHosting.com


[jQuery] Re: thickbox reloaded?

2007-05-15 Thread Klaus Hartl



BAlexandre Plennevaux wrote:

Hello Klaus,

great: although i used TB2 quite a lot (that's what got me into jquery in
the first place), as i grew more used to the jquery way of coding, i prefer
the reloaded code.
$(element).thickbox();


I'm  now trying to hack your implementation so that it allows relative width
and height (in percentage).


That should already be supported, because you're able to specify the 
width and height for each thickbox, like:


$(element).thickbox({ width: '50%', height; '50%' });



Doing so, i discovered your implementation does not allow the use of iframes
if the target sits on the same domain. Am i correct?


Yes. I don't see the need for the usage of an iframe if you're in the 
same domain.




Personally, i would use the rel attribute to specify manually what kind of
thickbox i want to have, I find automatic detection quite magickal but it
gets in my way in this particular case.


The rel attribute actually has some meaning and I don't think it should 
be used for such kind of processing (I'd consider that as obtrusive). A 
user agent may provide some useful information depending on the value of 
the rel attribute, whereas a value of say iframe is obtrusive/useless

for a user.

But don't worry, I'm planning to make thickbox reloaded extensible, e.g. 
next to the 5 build-in thickbox builders, you can provide your own, 
overwrite the existing ones that is.



-- klaus



[jQuery] Re: thickbox reloaded?

2007-05-15 Thread Su

On 5/15/07, Klaus Hartl [EMAIL PROTECTED] wrote:


name) heavily there already, and whats in SVN now is stable (could call
it beta).



Oh, yay. I've been holding off on something that would use TB until Reloaded
settled so I could decide on a flavor.


[jQuery] Parse XML with IE

2007-05-15 Thread philguillard


Hi all,

I know IE6 (maybe 7) is known to have limited ability to parse XML but 
it seems it can.

After an ajax call, i'd like to parse the xml file like this :

$.ajax({
type: GET,
url: url,   
complete: function(response){
var rootNode = $(/rootNode, response.responseXML);
}
});

Is there a hack?, is there something specific about the XML file it can 
parse (ex: no node attributes).



Regards,

Phil


[jQuery] jqModal question

2007-05-15 Thread Shelane

I have a page with a list of volunteers for an event.  Their status
is displayed as to whether the have not received an invitation
(class=invite), they received an invitation and haven't responded
(class=unknown), they accepted the invitation (class=accepted),
they declined the invitation (class=declined).  These are displayed
as images with the volunteer's ID as the id of the image.  I have
successfully attached a click event to send the invitation when none
has been sent (class=invite), (no modal).

I want to attach a modal to each of the other classes to allow the
administrator to manual set the status.  So it would pull up a dialog
of choices.  To the URL, it must pass in the ID of the volunteer in id
of the image, and a couple of other known parameters.  Then the
modal may or may not read the invitation message on the main page
(if resending the invitation).  Clicking on one of the three options
needs to send the results back to the server.

So, I've read through the documentation and I'm a little lost of what
I need to do.

I want to assign the modal dialog
div id=invitation class=jqmWindowimg src=/admin/images/
purplegirlkickball.gif width=90 height=90 //div

To all images with a class of unknown.
$(function(){
$('.invited').css('cursor','pointer').click(function(){
var url = 'myserverpage.lasso?task=eventevent=1volunteer=';
url += $(this).attr('id');
$('#invitation').jqm({ajax: url, trigger: $(this)});
});
});

Am I going about this the right way?  Any gotchas I should know about
with this approach.

Thanks
(this is my first attempt as using any modal)



[jQuery] Re: [OT] dedicated hosting in europe

2007-05-15 Thread spinnach


thanks, benjamin, didn't know about that forum..

dennis.

Benjamin Sterling wrote:
Dennis, check out webhostingtalk.com http://webhostingtalk.com they 
have a pretty good recommendation section.  or at least had.  Did not 
see that section just now, but you can ask in the forum there.


--
Benjamin Sterling
http://www.KenzoMedia.com
http://www.KenzoHosting.com




[jQuery] Re: Form Validation Plugin

2007-05-15 Thread Mandy Singh
Luc,

I had a look at that before I posted. That does what I want but for simple
validations I can't include 40-50 KB of code (cmforms, meta.js,
jquery.validate)...thats an overkill when I just want a required:true check.

Any other?

Thanks,
Mandy.

On 5/15/07, Luc Pestille [EMAIL PROTECTED] wrote:


  Jörn Zaefferer's Validation plugin (
 http://bassistance.de/jquery-plugins/jquery-plugin-validation/ ) will do
 what you want. It does huge stuff too, but also very simple validation, just
 add a class {required:true} to inputs, at it's most basic...


  --
 *From:* jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] *On
 Behalf Of *Mandy Singh
 *Sent:* 15 May 2007 12:29
 *To:* jquery-en@googlegroups.com
 *Subject:* [jQuery] Form Validation Plugin

  Does jquery have a simple form validation plugin where I can define the
 rules for a field and respective error messages and throw all messages out
 to a common container on top of the form. No ajax just simple client side
 validations. The one I saw on the wiki is really huge and does all sorts of
 things but I just want a simple one. Anything available? Else I'll write
 something up. Please let me know.

 Regards,
 Mandy.


 In2
 Thames House
 Mere Park
 Dedmere Road
 Marlow
 Bucks
 SL7 1PB

 Tel 01628 899700
 Fax 01628 899701
 e: [EMAIL PROTECTED]
 i: www.in2.co.uk

 This message (and any associated files) is intended only for the use of
 jquery-en@googlegroups.com and may contain information that is
 confidential, subject to copyright or constitutes a trade secret. If you are
 not jquery-en@googlegroups.com you are hereby notified that any
 dissemination, copying or distribution of this message, or files associated
 with this message, is strictly prohibited. If you have received this message
 in error, please notify us immediately by replying to the message and
 deleting it from your computer. Messages sent to and from us may be
 monitored. Any views or opinions presented are solely those of the author
 [EMAIL PROTECTED] and do not necessarily represent those of the
 company.



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
jQuery (English) group.
To post to this group, send email to jquery-en@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jquery-en?hl=en
-~--~~~~--~~--~--~---



[jQuery] Re: thickbox reloaded?

2007-05-15 Thread Dylan Verheul


On 5/15/07, Klaus Hartl [EMAIL PROTECTED] wrote:

Yes. I don't see the need for the usage of an iframe if you're in the
same domain.


I do. Launch a form in an iframe using thickbox, and allow that form
to be submitted into the iframe.

You could probably do the same with the forms plugin and an ajax
thickbox, but I'd prefer the iframe

Dylan


[jQuery] jquery tabs: changing color of unselected tabs

2007-05-15 Thread [EMAIL PROTECTED]

Hi,

This should be simple, I know, but I'm having problems.  Using the
default stylesheet that accompanies the Jquery Tabs example, how do I
change the color of unselected links?  I tried adding a color:
directive to the .tabs-nav a class, but to no avail.  The links
still appear as the standard link color in both IE and Firefox.

Thanks for any advice, - Dave



[jQuery] Re: Form Validation Plugin

2007-05-15 Thread Dan G. Switzer, II

Mandy,

I had a look at that before I posted. That does what I want but for simple
validations I can't include 40-50 KB of code (cmforms, meta.js,
jquery.validate)...thats an overkill when I just want a required:true
check.

Any other?

The only thing that is required is jquery.validate.js. The packed version of
the file is only 6k. 

The meta.js file is only required if you want to define validation rules
using the class attribute of your tags.

The other libraries are used just for layout in the examples.

-Dan


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
jQuery (English) group.
To post to this group, send email to jquery-en@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jquery-en?hl=en
-~--~~~~--~~--~--~---



[jQuery] What happened to jQuery if-else? (ifelse, jif jelse, $if $else)

2007-05-15 Thread George Adamson



There have been various musings on the possibility of offering if-else
methods in jQuery. I know from the archives and svn etc that there have been
some great ideas and developments too, but they seem to have fizzled out for
one reason or another. (for instance 
http://66.102.9.104/search?q=cache:TFVq2u7QPZMJ:dmlair.com/jquery/jqIfElse/index.html+jquery+%22if+else%22hl=enct=clnkcd=1gl=uk
$if/$else/end  looked useful.)

Is this type of functionality likely to be added one day or is there a
technical or strategic reason for not adding it?

Cheers all,
George
-- 
View this message in context: 
http://www.nabble.com/What-happened-to-jQuery-if-else--%28ifelse%2C-jif-jelse%2C-%24if-%24else%29-tf3749162s15494.html#a10594887
Sent from the JQuery mailing list archive at Nabble.com.



[jQuery] Re: Retrieving specific xml node from xml document

2007-05-15 Thread chillstroll

Yes that is correct. However it is not showing.
I tried your examples but it did not work.
Where does the code go? I currently have it outside the success
function of .ajax but still inside the main document.ready function.
Is that correct.
If I add the code $('.wkguidetoday:first').show(); right after the $
('.wkguidetoday').append(divdetails).hide();  code in the success
function, all the divs show up.
I just want the first one to show..all others hidden.

Thanks!
--Marcus Cox

On May 15, 11:11 am, Benjamin Sterling
[EMAIL PROTECTED] wrote:
 Not sure if I am totally understanding, so bare with me.  You want the first
 on to sure of the divs with the class wkguidetoday correct?  Then
 something like (not tested and off the top of my head)
 $('.wkguidetoday[0]).show();  or $('.wkguidetoday:first).show(); or
 $('wkguidetoday').lt(1).show();

 If i misunderstood let me know.

 --
 Benjamin Sterlinghttp://www.KenzoMedia.comhttp://www.KenzoHosting.com


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
jQuery (English) group.
To post to this group, send email to jquery-en@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jquery-en?hl=en
-~--~~~~--~~--~--~---



[jQuery] Re: Retrieving specific xml node from xml document

2007-05-15 Thread Benjamin Sterling
Marcus,
Would you mind sending what you have so far, my brain is not working real
well today and would help more if I have what you have?

-- 
Benjamin Sterling
http://www.KenzoMedia.com
http://www.KenzoHosting.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
jQuery (English) group.
To post to this group, send email to jquery-en@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jquery-en?hl=en
-~--~~~~--~~--~--~---



[jQuery] Re: jqModal question

2007-05-15 Thread Benjamin Sterling

Change $('#invitation').jqm({ajax: url, trigger: $(this)});

to $('#invitation').jqm({ajax: url}).jqmShow();

And that should do it (hopefully)

--
Benjamin Sterling
http://www.KenzoMedia.com
http://www.KenzoHosting.com


[jQuery] Re: Parse XML with IE

2007-05-15 Thread Benjamin Sterling

Phil, set your datatype to xml, ie. dataType : 'xml',



--
Benjamin Sterling
http://www.KenzoMedia.com
http://www.KenzoHosting.com


[jQuery] Re: Parse XML with IE

2007-05-15 Thread Ⓙⓐⓚⓔ

Phil, your code says:

do a get, when it's complete look for rootnode. BUT, what if the response
has no xml, is malformed, or got some other error. You're ignoring all
possible errors!

success callback calls back when you have a good result (or pretty good)
error is called for most errors.
complete needs to check what it got.

I think we need more help for complete coding, I posted a ticket with my
results... IE was not included though!

http://dev.jquery.com/ticket/1145#preview

On 5/15/07, philguillard [EMAIL PROTECTED] wrote:



Hi all,

I know IE6 (maybe 7) is known to have limited ability to parse XML but
it seems it can.
After an ajax call, i'd like to parse the xml file like this :

$.ajax({
type: GET,
url: url,
complete: function(response){
var rootNode = $(/rootNode, response.responseXML);
}
});

Is there a hack?, is there something specific about the XML file it can
parse (ex: no node attributes).


Regards,

Phil





--
Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ


[jQuery] jquery.innerfade.js Random Problem

2007-05-15 Thread Aaron

I am trying to use this script jquery.innerfade.js but am having a
little bit of a problem.

You can see it here.
http://medienfreunde.com/lab/innerfade/

I have set it to random but it still always starts with the first item
and then shows the others randomly.

How can you make it start out by displaying one of the items randomly
and not the first one everytime.

This is what the code is in the jquery.innerfade.js file.

/* =

// jquery.innerfade.js

// Datum: 2007-01-29
// Firma: Medienfreunde Hofmann  Baldes GbR
// Autor: Torsten Baldes
// Mail: [EMAIL PROTECTED]
// Web: http://medienfreunde.com

// based on the work of Matt Oakes 
http://portfolio.gizone.co.uk/applications/slideshow/

// = */


(function($) {

$.fn.innerfade = function(options) {

this.each(function(){

var settings = {
animationtype: 'fade',
speed: 'normal',
timeout: 2000,
type: 'sequence',
containerheight: 'auto',
runningclass: 'innerfade'
};

if(options)
$.extend(settings, options);

var elements = $(this).children();

if (elements.length  1) {

$(this).css('position', 'relative');

$(this).css('height', settings.containerheight);
$(this).addClass(settings.runningclass);

for ( var i = 0; i  elements.length; i++ ) {
$(elements[i]).css('z-index', 
String(elements.length-
i)).css('position', 'absolute');
$(elements[i]).hide();
};

if ( settings.type == 'sequence' ) {
setTimeout(function(){
$.innerfade.next(elements, settings, 1, 
0);
}, settings.timeout);
$(elements[0]).show();
} else if ( settings.type == 'random' ) {
setTimeout(function(){
do { current = Math.floor ( Math.random 
( ) *
( elements.length ) ); } while ( current == 0 )
$.innerfade.next(elements, settings, 
current, 0);
}, settings.timeout);
$(elements[0]).show();
}   else {
alert('type must either be \'sequence\' or 
\'random\'');
}

}

});
};


$.innerfade = function() {}
$.innerfade.next = function (elements, settings, current, last) {

if ( settings.animationtype == 'slide' ) {
$(elements[last]).slideUp(settings.speed, $
(elements[current]).slideDown(settings.speed));
} else if ( settings.animationtype == 'fade' ) {
$(elements[last]).fadeOut(settings.speed);
$(elements[current]).fadeIn(settings.speed);
} else {
alert('animationtype must either be \'slide\' or \'fade\'');
};

if ( settings.type == 'sequence' ) {
if ( ( current + 1 )  elements.length ) {
current = current + 1;
last = current - 1;
} else {
current = 0;
last = elements.length - 1;
};
}   else if ( settings.type == 'random' ) {
last = current;
while ( current == last ) {
current = Math.floor ( Math.random ( ) * ( 
elements.length ) );
};
}   else {
alert('type must either be \'sequence\' or \'random\'');
};
setTimeout((function(){$.innerfade.next(elements, settings, current,
last);}), settings.timeout);
};
})(jQuery);


Thanks for the help! :)



[jQuery] Re: Form Validation Plugin

2007-05-15 Thread Dan G. Switzer, II
Exactly!

 

-Dan

 

  _  

From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Mandy Singh
Sent: Tuesday, May 15, 2007 2:06 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Form Validation Plugin

 

Oh! Didn't know that. Thanks for pointing that out Dan (I am new to jquery
had been using prototype till now).

So, just the packed version of the file is good enough?

And using that I can define the rules such as - 

$(#myform).validate({


 event: keyup


   rules: {


  firstname: { required: true },


  age: {


  required: #firstname:blank,


  number: true,


  minValue: 3






  },


  password: {


  required: function() {


  return $(#age).val()  18;


  },


  minLength: 5,


  maxLength: 32


  }


   },


 messages {


  password: {


  required: Your password is required because you are
not yet 18 years or older.



  minLength: Please enter a password at least 5
characters long.,


  maxLength: Please enter a password no longer then 32
characters long.


  },


  age: Please specify your age as a number (at least 3).



   }


});

 

On 5/15/07, Dan G. Switzer, II [EMAIL PROTECTED] wrote:


Mandy,

I had a look at that before I posted. That does what I want but for simple
validations I can't include 40-50 KB of code (cmforms, meta.js,
jquery.validate)...thats an overkill when I just want a required:true 
check.

Any other?

The only thing that is required is jquery.validate.js. The packed version of
the file is only 6k.

The meta.js file is only required if you want to define validation rules 
using the class attribute of your tags.

The other libraries are used just for layout in the examples.

-Dan





 



[jQuery] Re: Estimated 1.1.3 release date?

2007-05-15 Thread MikeR

I understand that the site issues, illnesses, etc caused delays... but
does anybody have a new estimated date for the jQuery 1.1.3 release?
Thanks!

On Apr 28, 8:13 pm, Brandon Aaron [EMAIL PROTECTED] wrote:
 Here is a list of fixes thus far that will be in 
 1.1.3:http://tinyurl.com/2t2we5

 --
 Brandon Aaron

 On 4/28/07, Shelane [EMAIL PROTECTED] wrote:



  What might we expect in the next release?  You mentioned a few things
  related to faster selectors, animations, etc.  What bug fixes might
  we see?  IE issues?

  Why is IE always the problem child?  Oh yeah, M$.  OK, off my soapbox
  now.

  On Apr 26, 7:21 pm, John Resig [EMAIL PROTECTED] wrote:
John! Wow :) Did not expect you to chime in on this!

   No problem - I'm busy at the moment, but I still like to watch out for
   meta-problems (site issues, releases dates, etc.)

First thing's first... I bought your book Pro Javascript
Techniques (published 2006?).. and my respect and recognition for
your talent has skyrocketed since. jQuery itself demonstrates very
clearly that you are skilled, but after even starting to read that
book I was very pleasantly surprised. No fluff, no mess... just right
into the JS goodness :).

   Exactly. I hate books that nuts around talking about The History of
   JavaScript and this is how you use document.write. I'm a
   programmer, I want code :-) (Especially code that is still relevant.)
   Glad you're enjoying it, though!

Now back to the original topic lol.. glad to hear 1.1.3 will be out
soon. Hope things are not getting too stressful over there.

Looking forward to more jQuery releases! Have a good one.

   Yeah, things are less than ideal right now - however I really want to
   squeeze some time in and get the last changes into this release.
   There's speed improvements across the board (faster selectors and
   faster animations) along with a bunch of bug fixes. Not too shabby for
   a point release. I just have to stomp some final bugs then we can move
   ahead and release the alpha. (Just need to find a moment to clear my
   head.)

   --John


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
jQuery (English) group.
To post to this group, send email to jquery-en@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jquery-en?hl=en
-~--~~~~--~~--~--~---



[jQuery] $.blockUI()

2007-05-15 Thread philip . waters . pryce

is there some way to reference a element, not html code, and have the
orignal element not be removed.

currently when you call say $.blockUI($('#modal')); it removed #modal
from the DOM, is there some kind of option to turn this off? and
posibly just make that element invisible or not displayed?



[jQuery] Re: Estimated 1.1.3 release date?

2007-05-15 Thread John Resig

We're still dealing with site issues, hopefully this weekend, but
again, that's what I said last week before the attack.

--John

On 5/15/07, MikeR [EMAIL PROTECTED] wrote:

 I understand that the site issues, illnesses, etc caused delays... but
 does anybody have a new estimated date for the jQuery 1.1.3 release?
 Thanks!

 On Apr 28, 8:13 pm, Brandon Aaron [EMAIL PROTECTED] wrote:
  Here is a list of fixes thus far that will be in 
  1.1.3:http://tinyurl.com/2t2we5
 
  --
  Brandon Aaron
 
  On 4/28/07, Shelane [EMAIL PROTECTED] wrote:
 
 
 
   What might we expect in the next release?  You mentioned a few things
   related to faster selectors, animations, etc.  What bug fixes might
   we see?  IE issues?
 
   Why is IE always the problem child?  Oh yeah, M$.  OK, off my soapbox
   now.
 
   On Apr 26, 7:21 pm, John Resig [EMAIL PROTECTED] wrote:
 John! Wow :) Did not expect you to chime in on this!
 
No problem - I'm busy at the moment, but I still like to watch out for
meta-problems (site issues, releases dates, etc.)
 
 First thing's first... I bought your book Pro Javascript
 Techniques (published 2006?).. and my respect and recognition for
 your talent has skyrocketed since. jQuery itself demonstrates very
 clearly that you are skilled, but after even starting to read that
 book I was very pleasantly surprised. No fluff, no mess... just right
 into the JS goodness :).
 
Exactly. I hate books that nuts around talking about The History of
JavaScript and this is how you use document.write. I'm a
programmer, I want code :-) (Especially code that is still relevant.)
Glad you're enjoying it, though!
 
 Now back to the original topic lol.. glad to hear 1.1.3 will be out
 soon. Hope things are not getting too stressful over there.
 
 Looking forward to more jQuery releases! Have a good one.
 
Yeah, things are less than ideal right now - however I really want to
squeeze some time in and get the last changes into this release.
There's speed improvements across the board (faster selectors and
faster animations) along with a bunch of bug fixes. Not too shabby for
a point release. I just have to stomp some final bugs then we can move
ahead and release the alpha. (Just need to find a moment to clear my
head.)
 
--John


 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
jQuery (English) group.
To post to this group, send email to jquery-en@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jquery-en?hl=en
-~--~~~~--~~--~--~---



[jQuery] Re: Retrieving specific xml node from xml document

2007-05-15 Thread Jake McGraw
Chill:

I've looked over what you've submitted, couple of suggestions:

1. You're delivering a lot of your data using Ajax, and nothing about your
application really takes advantage of JavaScript (other than hiding a bit of
the delivered information). You should consider  delivering this information
when the page is requested and not use the JavaScript/XmlHttpRequest object
as a replacement for standard HTTP. Save Ajax for dynamic client side
applications that require small intermittent server requests, not whole page
loads.

2. All you're doing is modifying an XML document to display as HTML, which
means you're running a lot of one off translations (This node text should be
placed in this HTML node). Rather than delivering XML, if you must use the
XHR object, why not deliver the pre-formatted HTML?

- jake

On 5/15/07, chillstroll [EMAIL PROTECTED] wrote:


 Sure thing..This is what I have so far:

 XML DOC:
 ?xml version=1.0 encoding=ISO-8859-1?
 schedule
 show
 dateMonday, May 14, 2007/date
 dayofweekMonday/dayofweek
 image051407.jpg/image
 titleSan Antonio Hosts Training for Ministry
 Conference/title
 descriptionText Here/description
 filename2007-5-14.asx/filename
 guests/
 specialofferNames of God bracelet/specialoffer
 specialofferproductid431/specialofferproductid
 /show
 show
 dateTuesday, May 15, 2007/date
 dayofweekTuesday/dayofweek
 image051507.jpg/image
 titleTraining for Ministry Conference Impacts the
 Alamo City/
 title
 descriptionMore Text Here/description
 filename2007-5-15.asx/filename
 guests/
 specialofferNames of God bracelet/specialoffer
 specialofferproductid431/specialofferproductid
 /show
 /schedule

 JQUERY CODE:
 script type=text/javascript
  $(function() {
 $.ajax({url: 'tiydschedule.xml',
 type: 'GET',
 dataType: 'xml',
 timeout: 1000,
 error: function(){
 alert('Error loading XML document');
 },
 success: function(xml){
$('show',xml).each(function(id){
 var date = $('date',this).text();
 var dayofweek =
 $('dayofweek',this).text();
 var image = $('image',this).text();
 var title = $('title',this).text();
 var description =
 $('description',this).text();
 var filename = $('filename',this).text();
 var guests = $('guests',this).text();
 var specialoffer =
 $('specialoffer',this).text();
 var specialofferproductid = $
 ('specialofferproductid',this).text();
 var divthumbnails =
 'divh4'+dayofweek+'/h4pimg
 src=/images/weekly_guide/'+image+' class=today width=105
 height=75//p/div';
 var divdetails = 'div
 id='+dayofweek+'divh4'+date
 +'/h4/divdiva href=/media/'+filename+'img src=/images/
 weekly_guide/'+image+' //a/divh2'+title+'br/a href=/
 media/'+filename+'watch now#187;/a/h2p'+description+'/
 ph3Todays Offers:/h3pullia href=/shopping/
 product_detail.cfm/itemid/'+specialofferproductid+''+specialoffer+'/
 a/li/ul/p/div';
 $('.wkguidedays').append(divthumbnails);
 $('.wkguidetoday').append(divdetails).hide();
 $('.wkguidetoday:first').show();
});
 }
 });
 $('.wkguidetoday:first').show();
  });

 /script


 HTML CODE:
 div id=UserSection
 div class=section
 div class=wkguidedays/div

 div class=wkguidetoday/div
 /div
 /div

 The thumbnail images show up in div wkguidedays class (working)..
 The first date's details, Monday, needs to initially show up in div
 wkguidetoday class (not working)
 Other date's details will show when clicked on (not implemented yet).

 Thanks for the help!

 --Marcus Cox

 On May 15, 12:29 pm, Benjamin Sterling
 [EMAIL PROTECTED] wrote:
  Marcus,
  Would you mind sending what you have so far, my brain is not working
 real
  well today and would help more if I have what you have?
 
  --
  Benjamin Sterlinghttp://www.KenzoMedia.comhttp://www.KenzoHosting.com


 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
jQuery (English) group.
To post to this group, 

[jQuery] Re: $.blockUI()

2007-05-15 Thread Mike Alsup

No, there is no option for that.  You should simply cache that element
in a variable so that you can resuse it when needed.

Mike


 is there some way to reference a element, not html code, and have the
 orignal element not be removed.

 currently when you call say $.blockUI($('#modal')); it removed #modal
 from the DOM, is there some kind of option to turn this off? and
 posibly just make that element invisible or not displayed?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
jQuery (English) group.
To post to this group, send email to jquery-en@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jquery-en?hl=en
-~--~~~~--~~--~--~---



[jQuery] Re: Estimated 1.1.3 release date?

2007-05-15 Thread MikeR

Ok great, John =). Thanks for the update.

On May 15, 12:43 pm, John Resig [EMAIL PROTECTED] wrote:
 We're still dealing with site issues, hopefully this weekend, but
 again, that's what I said last week before the attack.

 --John

 On 5/15/07, MikeR [EMAIL PROTECTED] wrote:



  I understand that the site issues, illnesses, etc caused delays... but
  does anybody have a new estimated date for the jQuery 1.1.3 release?
  Thanks!

  On Apr 28, 8:13 pm, Brandon Aaron [EMAIL PROTECTED] wrote:
   Here is a list of fixes thus far that will be in 
   1.1.3:http://tinyurl.com/2t2we5

   --
   Brandon Aaron

   On 4/28/07, Shelane [EMAIL PROTECTED] wrote:

What might we expect in the next release?  You mentioned a few things
related to faster selectors, animations, etc.  What bug fixes might
we see?  IE issues?

Why is IE always the problem child?  Oh yeah, M$.  OK, off my soapbox
now.

On Apr 26, 7:21 pm, John Resig [EMAIL PROTECTED] wrote:
  John! Wow :) Did not expect you to chime in on this!

 No problem - I'm busy at the moment, but I still like to watch out for
 meta-problems (site issues, releases dates, etc.)

  First thing's first... I bought your book Pro Javascript
  Techniques (published 2006?).. and my respect and recognition for
  your talent has skyrocketed since. jQuery itself demonstrates very
  clearly that you are skilled, but after even starting to read that
  book I was very pleasantly surprised. No fluff, no mess... just 
  right
  into the JS goodness :).

 Exactly. I hate books that nuts around talking about The History of
 JavaScript and this is how you use document.write. I'm a
 programmer, I want code :-) (Especially code that is still relevant.)
 Glad you're enjoying it, though!

  Now back to the original topic lol.. glad to hear 1.1.3 will be out
  soon. Hope things are not getting too stressful over there.

  Looking forward to more jQuery releases! Have a good one.

 Yeah, things are less than ideal right now - however I really want to
 squeeze some time in and get the last changes into this release.
 There's speed improvements across the board (faster selectors and
 faster animations) along with a bunch of bug fixes. Not too shabby for
 a point release. I just have to stomp some final bugs then we can move
 ahead and release the alpha. (Just need to find a moment to clear my
 head.)

 --John


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
jQuery (English) group.
To post to this group, send email to jquery-en@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jquery-en?hl=en
-~--~~~~--~~--~--~---



[jQuery] Re: thickbox reloaded?

2007-05-15 Thread Alexandre Plennevaux

Yes. I don't see the need for the usage of an iframe if you're in the same
domain.

Indeed, but when i discovered that i was at 6/8 of the development. A bit
late to redo everything. In the meanwhile, i need that hack.


 $(element).thickbox({ width: '50%', height: '50%' });

I tried that, the layout gets all screwed up. The height does not go go
through and the thickbox is off center.

Could you give me the link to the svn ? I 'm not sure i have your latest
version.
And if i can be of help during development, let me know !


Thanks a lot

Alexandre

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Klaus Hartl
Sent: mardi 15 mai 2007 17:19
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: thickbox reloaded?



BAlexandre Plennevaux wrote:
 Hello Klaus,
 
 great: although i used TB2 quite a lot (that's what got me into jquery 
 in the first place), as i grew more used to the jquery way of coding, 
 i prefer the reloaded code.
 $(element).thickbox();
 
 
 I'm  now trying to hack your implementation so that it allows relative 
 width and height (in percentage).

That should already be supported, because you're able to specify the width
and height for each thickbox, like:

$(element).thickbox({ width: '50%', height; '50%' });


 Doing so, i discovered your implementation does not allow the use of 
 iframes if the target sits on the same domain. Am i correct?

Yes. I don't see the need for the usage of an iframe if you're in the same
domain.


 Personally, i would use the rel attribute to specify manually what kind of
 thickbox i want to have, I find automatic detection quite magickal but it
 gets in my way in this particular case.

The rel attribute actually has some meaning and I don't think it should 
be used for such kind of processing (I'd consider that as obtrusive). A 
user agent may provide some useful information depending on the value of 
the rel attribute, whereas a value of say iframe is obtrusive/useless
for a user.

But don't worry, I'm planning to make thickbox reloaded extensible, e.g. 
next to the 5 build-in thickbox builders, you can provide your own, 
overwrite the existing ones that is.


-- klaus

Ce message Envoi est certifié sans virus connu.
Analyse effectuée par AVG.
Version: 7.5.467 / Base de données virus: 269.7.0/804 - Date: 14/05/2007
16:46
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
jQuery (English) group.
To post to this group, send email to jquery-en@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jquery-en?hl=en
-~--~~~~--~~--~--~---



[jQuery] Re: Retrieving specific xml node from xml document

2007-05-15 Thread chillstroll

Jake,
Not quite sure what you mean. As you can tell, I'm a JQuery newbie.
The xml gets created from a content mgmt system and written to a file.
I'm sure I could query the db and return all the required info and
place in html instead of using a xml file; howver I'm not sure how
this would solve my problem.

I basically need to show a list of thumbnails along with the details
of the first thumbnail when the page is loaded. Then when I click on
any of the thumbnails, the details of that thumbnail is loaded/shown
on the page without a browser refresh.

Thanks!
--Marcus Cox


On May 15, 1:51 pm, Jake McGraw [EMAIL PROTECTED] wrote:
 Chill:

 I've looked over what you've submitted, couple of suggestions:

 1. You're delivering a lot of your data using Ajax, and nothing about your
 application really takes advantage of JavaScript (other than hiding a bit of
 the delivered information). You should consider  delivering this information
 when the page is requested and not use the JavaScript/XmlHttpRequest object
 as a replacement for standard HTTP. Save Ajax for dynamic client side
 applications that require small intermittent server requests, not whole page
 loads.

 2. All you're doing is modifying an XML document to display as HTML, which
 means you're running a lot of one off translations (This node text should be
 placed in this HTML node). Rather than delivering XML, if you must use the
 XHR object, why not deliver the pre-formatted HTML?

 - jake

 On 5/15/07, chillstroll [EMAIL PROTECTED] wrote:



  Sure thing..This is what I have so far:

  XML DOC:
  ?xml version=1.0 encoding=ISO-8859-1?
  schedule
  show
  dateMonday, May 14, 2007/date
  dayofweekMonday/dayofweek
  image051407.jpg/image
  titleSan Antonio Hosts Training for Ministry
  Conference/title
  descriptionText Here/description
  filename2007-5-14.asx/filename
  guests/
  specialofferNames of God bracelet/specialoffer
  specialofferproductid431/specialofferproductid
  /show
  show
  dateTuesday, May 15, 2007/date
  dayofweekTuesday/dayofweek
  image051507.jpg/image
  titleTraining for Ministry Conference Impacts the
  Alamo City/
  title
  descriptionMore Text Here/description
  filename2007-5-15.asx/filename
  guests/
  specialofferNames of God bracelet/specialoffer
  specialofferproductid431/specialofferproductid
  /show
  /schedule

  JQUERY CODE:
  script type=text/javascript
   $(function() {
  $.ajax({url: 'tiydschedule.xml',
  type: 'GET',
  dataType: 'xml',
  timeout: 1000,
  error: function(){
  alert('Error loading XML document');
  },
  success: function(xml){
 $('show',xml).each(function(id){
  var date = $('date',this).text();
  var dayofweek =
  $('dayofweek',this).text();
  var image = $('image',this).text();
  var title = $('title',this).text();
  var description =
  $('description',this).text();
  var filename = $('filename',this).text();
  var guests = $('guests',this).text();
  var specialoffer =
  $('specialoffer',this).text();
  var specialofferproductid = $
  ('specialofferproductid',this).text();
  var divthumbnails =
  'divh4'+dayofweek+'/h4pimg
  src=/images/weekly_guide/'+image+' class=today width=105
  height=75//p/div';
  var divdetails = 'div
  id='+dayofweek+'divh4'+date
  +'/h4/divdiva href=/media/'+filename+'img src=/images/
  weekly_guide/'+image+' //a/divh2'+title+'br/a href=/
  media/'+filename+'watch now#187;/a/h2p'+description+'/
  ph3Todays Offers:/h3pullia href=/shopping/
  product_detail.cfm/itemid/'+specialofferproductid+''+specialoffer+'/
  a/li/ul/p/div';
  $('.wkguidedays').append(divthumbnails);
  $('.wkguidetoday').append(divdetails).hide();
  $('.wkguidetoday:first').show();
 });
  }
  });
  $('.wkguidetoday:first').show();
   });

  /script

  HTML CODE:
  div id=UserSection
  div class=section
  div class=wkguidedays/div

  div class=wkguidetoday/div
  /div
  /div

  The thumbnail 

[jQuery] Re: jquery.innerfade.js Random Problem

2007-05-15 Thread Scott Sauyet

I think this would do it.  The original code is starting with 0 
intentionally.  It's not hard to switch to starting with a random one:

} else if ( settings.type == 'random' ) {
// add this:
 var first = Math.floor ( Math.random ( ) * ( 
elements.length ) );
setTimeout(function(){
//  do { current = Math.floor ( Math.random 
( ) * ( elements.length ) 
); } while ( current == 0 )
do { current = Math.floor ( Math.random 
( ) * ( elements.length ) 
); } while ( current == first )
//  $.innerfade.next(elements, settings, 
current, 0);
$.innerfade.next(elements, settings, 
current, first);
}, settings.timeout);
//  $(elements[0]).show();
$(elements[first]).show();
}   else {


Cheers,

   -- Scott

Aaron wrote:
 I am trying to use this script jquery.innerfade.js but am having a
 little bit of a problem.
 
 You can see it here.
 http://medienfreunde.com/lab/innerfade/
 
 I have set it to random but it still always starts with the first item
 and then shows the others randomly.
 
 How can you make it start out by displaying one of the items randomly
 and not the first one everytime.
 
 This is what the code is in the jquery.innerfade.js file.
 
 /* =
 
 // jquery.innerfade.js
 
 // Datum: 2007-01-29
 // Firma: Medienfreunde Hofmann  Baldes GbR
 // Autor: Torsten Baldes
 // Mail: [EMAIL PROTECTED]
 // Web: http://medienfreunde.com
 
 // based on the work of Matt Oakes 
 http://portfolio.gizone.co.uk/applications/slideshow/
 
 // = */
 
 
 (function($) {
 
 $.fn.innerfade = function(options) {
 
   this.each(function(){
 
   var settings = {
   animationtype: 'fade',
   speed: 'normal',
   timeout: 2000,
   type: 'sequence',
   containerheight: 'auto',
   runningclass: 'innerfade'
   };
 
   if(options)
   $.extend(settings, options);
 
   var elements = $(this).children();
 
   if (elements.length  1) {
 
   $(this).css('position', 'relative');
 
   $(this).css('height', settings.containerheight);
   $(this).addClass(settings.runningclass);
 
   for ( var i = 0; i  elements.length; i++ ) {
   $(elements[i]).css('z-index', 
 String(elements.length-
 i)).css('position', 'absolute');
   $(elements[i]).hide();
   };
 
   if ( settings.type == 'sequence' ) {
   setTimeout(function(){
   $.innerfade.next(elements, settings, 1, 
 0);
   }, settings.timeout);
   $(elements[0]).show();
   } else if ( settings.type == 'random' ) {
   setTimeout(function(){
   do { current = Math.floor ( Math.random 
 ( ) *
 ( elements.length ) ); } while ( current == 0 )
   $.innerfade.next(elements, settings, 
 current, 0);
   }, settings.timeout);
   $(elements[0]).show();
   }   else {
   alert('type must either be \'sequence\' or 
 \'random\'');
   }
 
   }
 
   });
 };
 
 
 $.innerfade = function() {}
 $.innerfade.next = function (elements, settings, current, last) {
 
   if ( settings.animationtype == 'slide' ) {
   $(elements[last]).slideUp(settings.speed, $
 (elements[current]).slideDown(settings.speed));
   } else if ( settings.animationtype == 'fade' ) {
   $(elements[last]).fadeOut(settings.speed);
   $(elements[current]).fadeIn(settings.speed);
   } else {
   alert('animationtype must either be \'slide\' or \'fade\'');
   };
 
   if ( settings.type == 'sequence' ) {
   if ( ( current + 1 )  elements.length ) {
   current = current + 1;
   last = current - 1;
   } else {
   current = 0;
   last = elements.length - 1;
   };
   }   else if ( settings.type == 'random' ) {
   last = current;
   while ( current == last ) {
   current = Math.floor ( Math.random ( ) * ( 
 elements.length ) );
  

[jQuery] Re: Parse XML with IE

2007-05-15 Thread philguillard


Thank you guys.
I still can't manage to parse any XML data with IE6.

True it is cleaner to use dataType : 'xml' and use success, but :

Whith a basic sample, and i checked mime type was really text/xml
?xml version=1.0?
root
jqueryhello/jquery
/root

$.ajax({
type: GET,
url: /test, 
dataType : 'xml',   
success: function(response){
alert(A success=+response);
alert(B +typeof response);
alert(C +$(/root/jquery, response).text());
} ,
error: function(o,e1,e2){
alert(error+e1);
}
});

On [A] i have sucess=
On [B] i have object
Erro is launched on [C]
== i suppose object is empty
Works fine on firefox.

Any idea?

Phil

Ⓙⓐⓚⓔ wrote:

Phil, your code says:

do a get, when it's complete look for rootnode. BUT, what if the response
has no xml, is malformed, or got some other error. You're ignoring all
possible errors!

success callback calls back when you have a good result (or pretty good)
error is called for most errors.
complete needs to check what it got.

I think we need more help for complete coding, I posted a ticket with my
results... IE was not included though!

http://dev.jquery.com/ticket/1145#preview

On 5/15/07, philguillard [EMAIL PROTECTED] wrote:




Hi all,

I know IE6 (maybe 7) is known to have limited ability to parse XML but
it seems it can.
After an ajax call, i'd like to parse the xml file like this :

$.ajax({
type: GET,
url: url,
complete: function(response){
var rootNode = $(/rootNode, response.responseXML);
}
});

Is there a hack?, is there something specific about the XML file it can
parse (ex: no node attributes).


Regards,

Phil







[jQuery] Re: jquery tabs: changing color of unselected tabs

2007-05-15 Thread Giuliano Marcangelo

Dave,

if you goa little more specific, and target the .tabs-nav a span, and
apply a color to that..and at same time target .tabs-nav .tabs-selected a
span for some contrast...you will get your desired effect


On 15/05/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:



Hi,

This should be simple, I know, but I'm having problems.  Using the
default stylesheet that accompanies the Jquery Tabs example, how do I
change the color of unselected links?  I tried adding a color:
directive to the .tabs-nav a class, but to no avail.  The links
still appear as the standard link color in both IE and Firefox.

Thanks for any advice, - Dave




[jQuery] Re: jquery tabs: changing color of unselected tabs

2007-05-15 Thread Giuliano Marcangelo
Dave,

the styling works for me in IE6, ff and opera.


On 15/05/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:


 Thanks for this info.  I added these to the bottom of the stylesheet

 .tabs-nav a span {
 color:  #ff;
 }
 .tabs-nav .tabs-selected a span {
 color:  #00;
 }


 Works great on Firefox and almost on IE.  On IE, the selected tab text
 is still in white (as opposed to the #00 I intended).  Any ideas?
 - Dave


 On May 15, 2:46 pm, Giuliano Marcangelo
 [EMAIL PROTECTED] wrote:
  Dave,
 
  if you goa little more specific, and target the .tabs-nav a span, and
  apply a color to that..and at same time target .tabs-nav .tabs-selected
 a
  span for some contrast...you will get your desired effect
 
  On 15/05/07, [EMAIL PROTECTED] [EMAIL PROTECTED]
 wrote:
 
 
 
   Hi,
 
   This should be simple, I know, but I'm having problems.  Using the
   default stylesheet that accompanies the Jquery Tabs example, how do I
   change the color of unselected links?  I tried adding a color:
   directive to the .tabs-nav a class, but to no avail.  The links
   still appear as the standard link color in both IE and Firefox.
 
   Thanks for any advice, - Dave



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
jQuery (English) group.
To post to this group, send email to jquery-en@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jquery-en?hl=en
-~--~~~~--~~--~--~---



[jQuery] Re: thickbox reloaded?

2007-05-15 Thread Alexandre Plennevaux

  The rel attribute actually has some meaning and I don't think it should
be used for such kind of processing (I'd consider that as obtrusive). A user
agent may provide some useful information depending on the value of the rel
attribute, whereas a value of say iframe is obtrusive/useless for a
user.But don't worry, I'm planning to make thickbox reloaded extensible,
e.g. next to the 5 build-in thickbox builders, you can provide your own,
overwrite the existing ones that is.

In fact, why not have it simply as an option in the plugin parameters?

It would lead to let the developer specify its own class names that seems
quite clean to me

$(a.ajaxModal).thickbox({mode: 'ajax'});

$(a.iframeModal).thickbox({mode: 'iframe'});

$(a.innerModal).thickbox({mode: 'inner'});

...

Of course, the automagick detect is wonderful. I'm just considering a way to
bypass it for the sake of flexibility.
 








-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Klaus Hartl
Sent: mardi 15 mai 2007 17:19
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: thickbox reloaded?



BAlexandre Plennevaux wrote:
 Hello Klaus,
 
 great: although i used TB2 quite a lot (that's what got me into jquery 
 in the first place), as i grew more used to the jquery way of coding, 
 i prefer the reloaded code.
 $(element).thickbox();
 
 
 I'm  now trying to hack your implementation so that it allows relative 
 width and height (in percentage).

That should already be supported, because you're able to specify the width
and height for each thickbox, like:

$(element).thickbox({ width: '50%', height; '50%' });


 Doing so, i discovered your implementation does not allow the use of 
 iframes if the target sits on the same domain. Am i correct?

Yes. I don't see the need for the usage of an iframe if you're in the same
domain.


 Personally, i would use the rel attribute to specify manually what kind of
 thickbox i want to have, I find automatic detection quite magickal but it
 gets in my way in this particular case.

The rel attribute actually has some meaning and I don't think it should 
be used for such kind of processing (I'd consider that as obtrusive). A 
user agent may provide some useful information depending on the value of 
the rel attribute, whereas a value of say iframe is obtrusive/useless
for a user.

But don't worry, I'm planning to make thickbox reloaded extensible, e.g. 
next to the 5 build-in thickbox builders, you can provide your own, 
overwrite the existing ones that is.


-- klaus

Ce message Envoi est certifié sans virus connu.
Analyse effectuée par AVG.
Version: 7.5.467 / Base de données virus: 269.7.0/804 - Date: 14/05/2007
16:46
 



[jQuery] Re: jqModal question

2007-05-15 Thread Shelane Enos
That did do it.  Thanks.

Another question.  Is there a way to know the object that was clicked to
open the modal so that when I do something in the modal I can reflect a
change (in this case, replace the image that was clicked)?


On 5/15/07 10:35 AM, Benjamin Sterling [EMAIL PROTECTED]
wrote:

 Change $('#invitation').jqm({ajax: url, trigger: $(this)});
 
 to $('#invitation').jqm({ajax: url}).jqmShow();
 
 And that should do it (hopefully)




[jQuery] Linking each list item to respective div container.

2007-05-15 Thread [EMAIL PROTECTED] d

Hi there, I just started to working on jQuery and am finding it
extremely easy to use. However I've been trying to find a solution to
a simple navigation problem here..

My markup has a list with a few 'li' items. So for each click on a
list item it would show the respective div container and hide the
rest...

!-- List Menu --

div id=dropbox
  ul
liCash/li
liPersonal Assets/li
liCertificates of Deposit/li
  /ul
/div

!-- Div Containers --

div class=formcash
  h2Cash/h2
/div

div class=formpersonal
  h2Personal Assets/h2
/div

div class=formdeposit
  h2Certificates of Deposit /h2
/div

Can I some how do the toggle without naming ids and classes?

Any ideas people?



[jQuery] Re: jquery tabs: changing color of unselected tabs

2007-05-15 Thread Klaus Hartl


Giuliano Marcangelo wrote:

Dave,

if you goa little more specific, and target the .tabs-nav a span, and 
apply a color to that..and at same time target .tabs-nav .tabs-selected 
a span for some contrast...you will get your desired effect


There's no need to go more specific (besides that it's applying a style 
to a nested element, e.g. breaking inheritance and not higher 
specificity in charge here). Simply change the color declaration that is 
already there.


I assume that Dave, as he was talking of that he added a color 
declaration, he added it before the existing one, which of course has no 
effect.



-- Klaus


[jQuery] Re: Parse XML with IE

2007-05-15 Thread Ⓙⓐⓚⓔ

the name of the program is 'test' in the root directory of the server... it
sets the header to be text/xml...

inside success, response is the xml tree of the response, not much good for
debugging. If the alert returns '' for the result, I guess there is a
problem. in the complete callback, you can check the response.responseXMLand
response.responseText

do you have a live link??
your code looks like it should, assuming it's actually getting the xml
result you expect..

On 5/15/07, philguillard [EMAIL PROTECTED] wrote:



Thank you guys.
I still can't manage to parse any XML data with IE6.

True it is cleaner to use dataType : 'xml' and use success, but :

Whith a basic sample, and i checked mime type was really text/xml
?xml version=1.0?
root
jqueryhello/jquery
/root

$.ajax({
type: GET,
url: /test,
dataType : 'xml',
success: function(response){
alert(A success=+response);
alert(B +typeof response);
alert(C +$(/root/jquery, response).text());
} ,
error: function(o,e1,e2){
alert(error+e1);
}
});

On [A] i have sucess=
On [B] i have object
Erro is launched on [C]
== i suppose object is empty
Works fine on firefox.

Any idea?

Phil

Ⓙⓐⓚⓔ wrote:
 Phil, your code says:

 do a get, when it's complete look for rootnode. BUT, what if the
response
 has no xml, is malformed, or got some other error. You're ignoring all
 possible errors!

 success callback calls back when you have a good result (or pretty good)
 error is called for most errors.
 complete needs to check what it got.

 I think we need more help for complete coding, I posted a ticket with my
 results... IE was not included though!

 http://dev.jquery.com/ticket/1145#preview

 On 5/15/07, philguillard [EMAIL PROTECTED] wrote:



 Hi all,

 I know IE6 (maybe 7) is known to have limited ability to parse XML but
 it seems it can.
 After an ajax call, i'd like to parse the xml file like this :

 $.ajax({
 type: GET,
 url: url,
 complete: function(response){
 var rootNode = $(/rootNode, response.responseXML);
 }
 });

 Is there a hack?, is there something specific about the XML file it can
 parse (ex: no node attributes).


 Regards,

 Phil









--
Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ


[jQuery] Re: Parse XML with IE

2007-05-15 Thread Benjamin Sterling

Phil,
Not sure if it will help, but make you declaration ?xml version=1.0
encoding=utf-8?

try $(root/jquery, response).text() instead of $(/root/jquery,
response).text() and see if that returns anything, that is what I use with
no issue.

--
Benjamin Sterling
http://www.KenzoMedia.com
http://www.KenzoHosting.com


[jQuery] Re: jquery tabs: changing color of unselected tabs

2007-05-15 Thread Klaus Hartl


[EMAIL PROTECTED] wrote:

Hi,

This should be simple, I know, but I'm having problems.  Using the
default stylesheet that accompanies the Jquery Tabs example, how do I
change the color of unselected links?  I tried adding a color:
directive to the .tabs-nav a class, but to no avail.  The links
still appear as the standard link color in both IE and Firefox.

Thanks for any advice, - Dave


That should have worked. On line 41 of jquery.tabs.css there is a color 
defined, which you can change of course. But if you're saying that links 
have the standard color still in both IE and Firefox I pretty much 
assume that something is wrong with your CSS.



-- Klaus


[jQuery] Getting a checkbox value

2007-05-15 Thread Skilip

Hi, how do I get the value of a checkbox? If i use this code I get for
both checked and unchecked 1 as a result.

$('#edit-use-background-image').change(function() {
alert($(this).val());
});



[jQuery] Re: Getting a checkbox value

2007-05-15 Thread Josh Nathanson


You have to do something like this:

$(this).attr(checked) ? $(this).val() : 0

This will return the value if it's checked, or 0 if it's not.

$(this).val() is just reaching into the dom and getting the attribute 
value of the element, whether or not it's checked.


-- Josh

- Original Message - 
From: Skilip [EMAIL PROTECTED]

To: jQuery (English) jquery-en@googlegroups.com
Sent: Tuesday, May 15, 2007 2:00 PM
Subject: [jQuery] Getting a checkbox value




Hi, how do I get the value of a checkbox? If i use this code I get for
both checked and unchecked 1 as a result.

$('#edit-use-background-image').change(function() {
alert($(this).val());
});





[jQuery] Re: * Important: Repent, Completely trust in God only and, Love Him with all of your heart.

2007-05-15 Thread Marshall Salinger


It's a sin to spam the jQuery list!

Secret wrote:

There is a section below with the title Atheism and Evolution are
WRONG.

All those who have sinned deserve to suffer in Hell forever. Pride
is an example of a terrible sin.

1. Repent (be truly sorry for your sins; beg for God's forgiveness;
abandon sin; ask Him to help you stop sinning; and repent for His
sake).

2. Completely trust in God only; do not trust in yourself.

3. Love the Lord with all of your heart.

The Son of God (the Lord Jesus Christ) suffered and died on the cross
to pay for the sins of those who trust in Him. His blood can clean
away our sins. He was buried for three days, then lived again. There
is hope of eternal life and happiness for those who trust in God.

Your efforts and works cannot save you. Only God is truly righteous
and good. Humans are totally corrupt, but thankfully God controls all
things. Thank the Lord if He has saved you, and if His Spirit has
given you the ability to trust in Him.

-

Atheism and Evolution are wrong:

An atheist is a person who does not believe in God.

God is the Intelligent Creator of the Universe.

If you refuse to trust in God, it's not my loss.

1. Energy/matter cannot be created nor destroyed through natural
methods.

2. The Universe cannot create itself. If it created itself, then
anything can create itself; and the Universe can have a Mind of its
own.

3. Fine-tuning of the Universe.
4. Laws of physics do not order themselves. They have no goals.
5. No oscillating universe; no multiverse.
6. Universe moving towards entropy (or heat death).
7. Planets do not form through natural methods.
8. Gases scatter/dissipate quickly. Therefore, Jupiter have been
created.
9. Saturn has three rings. They have been set in place.
10. A Theory: the Earth is near the center of the Universe. This idea
supports the Bible.
11. The Earth is not millions of years old. Notes: Magnetic field
decay; Archaeology; History, other Time limiters. Note: Ancient
people were as smart as modern men. Evolutionists have no excuse.

12. Misplaced fossils; Wrong sequence of geological strata/layers;
Polystrata fossils are enemies of Uniformitarianism and Evolution.

13. Decay rates are not constant. Note: Even the speed of light is not
constant. As for radiometric dating methods: At least one of them
showed that primate skull KNM-ER 1470 was 212-230 million years old.
Even evolutionists rejected it.

14. NATURAL life can only come from life. Abiogenesis (or spontaneous
generation) is impossible.
15. The DNA double-helix, self-repair codes, self-checking system/
algorithms, structure, DNA language convention, irreducible cell
complexity, and chromosome count are enemies of evolution.

16. DNA of humans differ/vary by about 10-12% from each other. 50% of
human DNA is identical to the DNA of a banana. Humans and apes have no
common ancestor.

17. Common sense and science reveal the fact of Intelligent Design.
There are cells which are more complex than New York City or modern
space shuttles.

18. There is no real vestigial/useless organ. There is no junk DNA.
Note: Males' nipples arouse women.

19. Mutations are harmful, deadly, and destructive to genetic codes.
Example: Cancer.
20. Natural selection and Sexual selection do not eliminate
destructive genetic codes.
21. The fossil record and the Cambrian Explosion are enemies of
evolution. There were NO mice-bats with one wing or two wings each
having 25% bone structure. There were NO walking fishes.

22. The Lord gave humans a conscience, morals, and advanced
intelligence.
23. Strong evidence of a Global Flood in the past. This fact supports
the Bible. Geologic layers were formed quickly and catastrophically.
Note: Hydro-plate theory.

24. No historical record gives clues about evolution.
25. Scientists can use false or biased data. Examples: Piltdown man
deception, Lucy mistake, Archaeopteryx mistake.

26. Evolution is science fiction (a myth). It is similar to the story
of the Centaurs (horse-men) and Mermaids (fish-women). I don't believe
in Centaurs and Mermaids.

27. Philosophers love wisdom. But, only God is truly wise. Atheists
are not philosophers. They are not free-thinkers.

28. Science is closely related to knowledge or information. These
things are useless if there is no God. True scientists trust in the
Creator of the Universe.

29. Atheism or evolution does not provide a solid foundation for
morality. If there is no God, there is no good nor evil.

30. Evolution is a myth. Even if it is true, there are evolutionists
who believe in God.
31. Every time atheists and evolutionists cannot answer a valid
question, they say, It's an Unexplained Mystery. Thus, they have
blind faith.

32. Experiments with fruit flies failed to produce something else
than a fruit fly.

33. All those who have sinned deserve to suffer in Hell forever. If
God is real, atheism loses. If God is not real, atheism still loses.

Resource sites:

http://www.icr.org
http://www.christiananswers.net

[jQuery] Re: jquery tabs: changing color of unselected tabs

2007-05-15 Thread [EMAIL PROTECTED]

I downloaded a fresh copy of the CSS and applied what you said and
indeed it worked great.  However, there is one thing that is still
lingering on IE.  The DIV with class tab-container is not being
moved to the next line.  In other words, it is staying on the same
line.  I created a simplified version of the plain HTML to verify this
and it is

html
head
link rel=stylesheet type=text/css href=http://www.stilbuero.de/
jquery/tabs/jquery.tabs.css
/style
/head
body
ul class=tabs-nav
li class= id=tab1a href=#remote-tab-6spanGeneral
(7)/span/a/li
li class= id=tab6a href=#remote-tab-7spanLearning
Management (2)/span/a/li
li class= id=tab101a href=#remote-tab-8spanNew Tab
(0)/span/a/li
li class= id=tab103a href=#remote-tab-9spanclicked
(0)/span/a/li
li class=tabs-selected id=tab105a href=#remote-
tab-10spanNew Tab (0) img class=closeTab src=images/
miniclose.GIF alt=Close border=0/span/a/li
li id=tab106a href=#remote-tab-11spanNew Tab (0)/
span/a/li
/ul
div style=display: block; class=tabs-container
table align=left
tbodytrtd id=containerContent
div id=li0
div class=itemWrappertable
align=centertbodytrtdimg src=images/busy.gif alt=
align=middle border=0/tdtd Loading ... /td/tr/tbody/
table/div
/div
/td/tr
/tbody/table
/div
/body
/html


It could be me.  Your thoughts, as always, are most appreciated, -
Dave

On May 15, 3:02 pm, Klaus Hartl [EMAIL PROTECTED] wrote:
 [EMAIL PROTECTED] wrote:
  Hi,

  This should be simple, I know, but I'm having problems.  Using the
  default stylesheet that accompanies theJqueryTabs example, how do I
  change the color of unselected links?  I tried adding a color:
  directive to the .tabs-nav a class, but to no avail.  The links
  still appear as the standard link color in both IE and Firefox.

  Thanks for any advice, - Dave

 That should have worked. On line 41 ofjquery.tabs.css there is a color
 defined, which you can change of course. But if you're saying that links
 have the standard color still in both IE and Firefox I pretty much
 assume that something is wrong with your CSS.

 -- Klaus



[jQuery] Re: * Important: Repent, Completely trust in God only and, Love Him with all of your heart.

2007-05-15 Thread Christopher Jordan


Amen. Thou shall not spam mailing lists in the name of thy God. It's the 
twelfth commandment. What's the 11th? According to my high school 
algebra teacher it's Thou shall not divide by zero! ;o)


Marshall Salinger wrote:


It's a sin to spam the jQuery list!

Secret wrote:

There is a section below with the title Atheism and Evolution are
WRONG.

All those who have sinned deserve to suffer in Hell forever. Pride
is an example of a terrible sin.

1. Repent (be truly sorry for your sins; beg for God's forgiveness;
abandon sin; ask Him to help you stop sinning; and repent for His
sake).

2. Completely trust in God only; do not trust in yourself.

3. Love the Lord with all of your heart.

The Son of God (the Lord Jesus Christ) suffered and died on the cross
to pay for the sins of those who trust in Him. His blood can clean
away our sins. He was buried for three days, then lived again. There
is hope of eternal life and happiness for those who trust in God.

Your efforts and works cannot save you. Only God is truly righteous
and good. Humans are totally corrupt, but thankfully God controls all
things. Thank the Lord if He has saved you, and if His Spirit has
given you the ability to trust in Him.

-

Atheism and Evolution are wrong:

An atheist is a person who does not believe in God.

God is the Intelligent Creator of the Universe.

If you refuse to trust in God, it's not my loss.

1. Energy/matter cannot be created nor destroyed through natural
methods.

2. The Universe cannot create itself. If it created itself, then
anything can create itself; and the Universe can have a Mind of its
own.

3. Fine-tuning of the Universe.
4. Laws of physics do not order themselves. They have no goals.
5. No oscillating universe; no multiverse.
6. Universe moving towards entropy (or heat death).
7. Planets do not form through natural methods.
8. Gases scatter/dissipate quickly. Therefore, Jupiter have been
created.
9. Saturn has three rings. They have been set in place.
10. A Theory: the Earth is near the center of the Universe. This idea
supports the Bible.
11. The Earth is not millions of years old. Notes: Magnetic field
decay; Archaeology; History, other Time limiters. Note: Ancient
people were as smart as modern men. Evolutionists have no excuse.

12. Misplaced fossils; Wrong sequence of geological strata/layers;
Polystrata fossils are enemies of Uniformitarianism and Evolution.

13. Decay rates are not constant. Note: Even the speed of light is not
constant. As for radiometric dating methods: At least one of them
showed that primate skull KNM-ER 1470 was 212-230 million years old.
Even evolutionists rejected it.

14. NATURAL life can only come from life. Abiogenesis (or spontaneous
generation) is impossible.
15. The DNA double-helix, self-repair codes, self-checking system/
algorithms, structure, DNA language convention, irreducible cell
complexity, and chromosome count are enemies of evolution.

16. DNA of humans differ/vary by about 10-12% from each other. 50% of
human DNA is identical to the DNA of a banana. Humans and apes have no
common ancestor.

17. Common sense and science reveal the fact of Intelligent Design.
There are cells which are more complex than New York City or modern
space shuttles.

18. There is no real vestigial/useless organ. There is no junk DNA.
Note: Males' nipples arouse women.

19. Mutations are harmful, deadly, and destructive to genetic codes.
Example: Cancer.
20. Natural selection and Sexual selection do not eliminate
destructive genetic codes.
21. The fossil record and the Cambrian Explosion are enemies of
evolution. There were NO mice-bats with one wing or two wings each
having 25% bone structure. There were NO walking fishes.

22. The Lord gave humans a conscience, morals, and advanced
intelligence.
23. Strong evidence of a Global Flood in the past. This fact supports
the Bible. Geologic layers were formed quickly and catastrophically.
Note: Hydro-plate theory.

24. No historical record gives clues about evolution.
25. Scientists can use false or biased data. Examples: Piltdown man
deception, Lucy mistake, Archaeopteryx mistake.

26. Evolution is science fiction (a myth). It is similar to the story
of the Centaurs (horse-men) and Mermaids (fish-women). I don't believe
in Centaurs and Mermaids.

27. Philosophers love wisdom. But, only God is truly wise. Atheists
are not philosophers. They are not free-thinkers.

28. Science is closely related to knowledge or information. These
things are useless if there is no God. True scientists trust in the
Creator of the Universe.

29. Atheism or evolution does not provide a solid foundation for
morality. If there is no God, there is no good nor evil.

30. Evolution is a myth. Even if it is true, there are evolutionists
who believe in God.
31. Every time atheists and evolutionists cannot answer a valid
question, they say, It's an Unexplained Mystery. Thus, they have
blind faith.

32. Experiments with fruit flies failed to produce something else

[jQuery] jqModal Ajax question

2007-05-15 Thread Terak

I'm trying to open another jqModal window within a jqModal window and
then resize the new window.  Currently I'm using latest JQuery and
jqModal +r9. I'm having problem bringing up the modal window, and I
tried specifying trigger: false in the parameter. Here's my
Javascript.

script type=text/javascript
$(document).ready(function () {
bindModalBox = function(){
$(.modal_box).each(function(){
$(this).click(function(){
$(.jqmdWide).width(600);
$('#ex4').jqm({
ajax: '@href',
target: jqmdMSG,
modal: true,
overlay: 30,
overlayClass: 'whiteOverlay'
}).jqmShow();
return false;
});//end click
}); //end each
} //end function


});
/script
/head
body
div id=demo-external
h2External Content/h2
pa href=http://localhost/testA.php;
class=modal_boxShow Box A/a/p
pa href=http://localhost/testB.php; 
class=modal_boxShow Box
B/a/p
/div
div id=ex4 class=jqmDialog jqmdWide
div class=jqmdTCModal Dialog/div
div class=jqmdMSG
pPlease wait... img src=inc/busy.gif alt=loading //p
/div
a href=# class=jqmdX jqmCloseClose/a
/div
/body

Here's the HTML in testA.php:

ul
lia class=modal_box href=http://localhost/testC.php;Link/a/
li
lia class=modal_box href=http://localhost/testD.php;Link/a/
li
/ul
script type=text/javascript
$(document).ready(function () {
   bindModalBox();
});
/script



[jQuery] Re: * Important: Repent, Completely trust in God only and, Love Him with all of your heart.

2007-05-15 Thread Aaron Heimlich

wellthis is a first

On 5/15/07, Christopher Jordan [EMAIL PROTECTED] wrote:



Amen. Thou shall not spam mailing lists in the name of thy God. It's the
twelfth commandment. What's the 11th? According to my high school
algebra teacher it's Thou shall not divide by zero! ;o)

Marshall Salinger wrote:

 It's a sin to spam the jQuery list!

 Secret wrote:
 There is a section below with the title Atheism and Evolution are
 WRONG.

 All those who have sinned deserve to suffer in Hell forever. Pride
 is an example of a terrible sin.

 1. Repent (be truly sorry for your sins; beg for God's forgiveness;
 abandon sin; ask Him to help you stop sinning; and repent for His
 sake).

 2. Completely trust in God only; do not trust in yourself.

 3. Love the Lord with all of your heart.

 The Son of God (the Lord Jesus Christ) suffered and died on the cross
 to pay for the sins of those who trust in Him. His blood can clean
 away our sins. He was buried for three days, then lived again. There
 is hope of eternal life and happiness for those who trust in God.

 Your efforts and works cannot save you. Only God is truly righteous
 and good. Humans are totally corrupt, but thankfully God controls all
 things. Thank the Lord if He has saved you, and if His Spirit has
 given you the ability to trust in Him.

 -

 Atheism and Evolution are wrong:

 An atheist is a person who does not believe in God.

 God is the Intelligent Creator of the Universe.

 If you refuse to trust in God, it's not my loss.

 1. Energy/matter cannot be created nor destroyed through natural
 methods.

 2. The Universe cannot create itself. If it created itself, then
 anything can create itself; and the Universe can have a Mind of its
 own.

 3. Fine-tuning of the Universe.
 4. Laws of physics do not order themselves. They have no goals.
 5. No oscillating universe; no multiverse.
 6. Universe moving towards entropy (or heat death).
 7. Planets do not form through natural methods.
 8. Gases scatter/dissipate quickly. Therefore, Jupiter have been
 created.
 9. Saturn has three rings. They have been set in place.
 10. A Theory: the Earth is near the center of the Universe. This idea
 supports the Bible.
 11. The Earth is not millions of years old. Notes: Magnetic field
 decay; Archaeology; History, other Time limiters. Note: Ancient
 people were as smart as modern men. Evolutionists have no excuse.

 12. Misplaced fossils; Wrong sequence of geological strata/layers;
 Polystrata fossils are enemies of Uniformitarianism and Evolution.

 13. Decay rates are not constant. Note: Even the speed of light is not
 constant. As for radiometric dating methods: At least one of them
 showed that primate skull KNM-ER 1470 was 212-230 million years old.
 Even evolutionists rejected it.

 14. NATURAL life can only come from life. Abiogenesis (or spontaneous
 generation) is impossible.
 15. The DNA double-helix, self-repair codes, self-checking system/
 algorithms, structure, DNA language convention, irreducible cell
 complexity, and chromosome count are enemies of evolution.

 16. DNA of humans differ/vary by about 10-12% from each other. 50% of
 human DNA is identical to the DNA of a banana. Humans and apes have no
 common ancestor.

 17. Common sense and science reveal the fact of Intelligent Design.
 There are cells which are more complex than New York City or modern
 space shuttles.

 18. There is no real vestigial/useless organ. There is no junk DNA.
 Note: Males' nipples arouse women.

 19. Mutations are harmful, deadly, and destructive to genetic codes.
 Example: Cancer.
 20. Natural selection and Sexual selection do not eliminate
 destructive genetic codes.
 21. The fossil record and the Cambrian Explosion are enemies of
 evolution. There were NO mice-bats with one wing or two wings each
 having 25% bone structure. There were NO walking fishes.

 22. The Lord gave humans a conscience, morals, and advanced
 intelligence.
 23. Strong evidence of a Global Flood in the past. This fact supports
 the Bible. Geologic layers were formed quickly and catastrophically.
 Note: Hydro-plate theory.

 24. No historical record gives clues about evolution.
 25. Scientists can use false or biased data. Examples: Piltdown man
 deception, Lucy mistake, Archaeopteryx mistake.

 26. Evolution is science fiction (a myth). It is similar to the story
 of the Centaurs (horse-men) and Mermaids (fish-women). I don't believe
 in Centaurs and Mermaids.

 27. Philosophers love wisdom. But, only God is truly wise. Atheists
 are not philosophers. They are not free-thinkers.

 28. Science is closely related to knowledge or information. These
 things are useless if there is no God. True scientists trust in the
 Creator of the Universe.

 29. Atheism or evolution does not provide a solid foundation for
 morality. If there is no God, there is no good nor evil.

 30. Evolution is a myth. Even if it is true, there are evolutionists
 who believe in God.
 31. Every time atheists and 

[jQuery] Re: jqModal Ajax question

2007-05-15 Thread Benjamin Sterling

Terak, I am heading out but wanted to reply to your message.  Take a look at
http://ov-oba2.informationexperts.com/ and take at
http://ov-oba2.informationexperts.com/common/js/oba.js and the
function buildDialogBox
toward the bottom.  I had to do what you are trying to do for this app and
maybe you can see how I did it.  Take a look at oba_link_monitoroptAction at
line 131 of http://ov-oba2.informationexperts.com/common/js/oba_1.js see the
process I took.  I will be back on later if you need some explanations.


--
Benjamin Sterling
http://www.KenzoMedia.com
http://www.KenzoHosting.com


[jQuery] Re: Parse XML with IE

2007-05-15 Thread philguillard


Jake and Benjamin, thanks for help,

No success with ?xml version=1.0
encoding=utf-8? nor $(root/jquery, response).text()

In the complete callback i get my content with response.responseText 
right. I'll try to set something online for tomorrow. Mybe i should try 
with another IE6/another PC.


Anyway i'm happy to hear this can work, i was not sure it could.

Phil



Ⓙⓐⓚⓔ wrote:

the name of the program is 'test' in the root directory of the server... it
sets the header to be text/xml...

inside success, response is the xml tree of the response, not much good for
debugging. If the alert returns '' for the result, I guess there is a
problem. in the complete callback, you can check the 
response.responseXMLand

response.responseText

do you have a live link??
your code looks like it should, assuming it's actually getting the xml
result you expect..

On 5/15/07, philguillard [EMAIL PROTECTED] wrote:




Thank you guys.
I still can't manage to parse any XML data with IE6.

True it is cleaner to use dataType : 'xml' and use success, but :

Whith a basic sample, and i checked mime type was really text/xml
?xml version=1.0?
root
jqueryhello/jquery
/root

$.ajax({
type: GET,
url: /test,
dataType : 'xml',
success: function(response){
alert(A success=+response);
alert(B +typeof response);
alert(C +$(/root/jquery, response).text());
} ,
error: function(o,e1,e2){
alert(error+e1);
}
});

On [A] i have sucess=
On [B] i have object
Erro is launched on [C]
== i suppose object is empty
Works fine on firefox.

Any idea?

Phil

Ⓙⓐⓚⓔ wrote:
 Phil, your code says:

 do a get, when it's complete look for rootnode. BUT, what if the
response
 has no xml, is malformed, or got some other error. You're ignoring all
 possible errors!

 success callback calls back when you have a good result (or pretty 
good)

 error is called for most errors.
 complete needs to check what it got.

 I think we need more help for complete coding, I posted a ticket 
with my

 results... IE was not included though!

 http://dev.jquery.com/ticket/1145#preview

 On 5/15/07, philguillard [EMAIL PROTECTED] wrote:



 Hi all,

 I know IE6 (maybe 7) is known to have limited ability to parse XML but
 it seems it can.
 After an ajax call, i'd like to parse the xml file like this :

 $.ajax({
 type: GET,
 url: url,
 complete: function(response){
 var rootNode = $(/rootNode, response.responseXML);
 }
 });

 Is there a hack?, is there something specific about the XML file it 
can

 parse (ex: no node attributes).


 Regards,

 Phil











[jQuery] Re: kelvinluck - date-picker V2

2007-05-15 Thread Kelvin Luck


Hi,

Sorry about the console.log statement - I should have removed that...

I'm afraid I don't have IE7 here to test with... Can you confirm that 
you experience the problem on my demo page:


http://kelvinluck.com/assets/jquery/datePicker/v2/demo/datePickerIntoSelects.html

If you do and can give me any further information from the error then I 
can look into it. If the problem doesn't exist on my page then can you 
post a link to your page and we can try and look into it...


Thanks,

Kelvin :)

Vincent Majer wrote:


another error fixed, in the jquery.datepicker.js, line 332
i've commented console.log(c) and it runs in IE6

BUT.. (arghh)

I've still got error.. on IE 7 !!! when the page loads :
Line 790
car 1
Syntax Error


nobody uses this great plugin ??





Vincent Majer a écrit :


ok, i've found an error in my date_fr.js, it's ok now..

When i load the page i don't have an error showing in IE6, BUT...

When i click the calendar icon, i've got another pretty error message :
Line 333
Car 4
Erreur : console est indéfini
Code : 0


... ??

Does anyone know what's this error ?


Vincent Majer a écrit :


Hi,

first, sorry for my english.. not perfect..

second point, i should say thanks to kelvinluck for this great jquery 
plugin, the DatePicker V2 !


I'm trying to use it.. and i have some problems with IE6..

I've used the source from this page of example :
http://kelvinluck.com/assets/jquery/datePicker/v2/demo/datePickerIntoSelects.html 



But it seems the date.js file makes IE6 finds an error.. so it 
doesn't work..


here is my code :

First, the scripts to include :

script type='text/javascript' src='/js/jquery-1.1.2.js'/script
script type=text/javascript src=/js/date.js/script
script type=text/javascript src=/js/date_fr.js/script
script type=text/javascript 
src=/js/jquery.dimensions.pack.js/script
!--[if IE]script type=text/javascript 
src=/js/jquery.bgiframe.js/script![endif]--

script type=text/javascript src=/js/jquery.datePicker.js/script
link rel=stylesheet type=text/css media=screen 
href=/css/datePicker.css



And then :

script type=text/javascript charset=utf-8
$(function()
{
   // initialise the Select date link
$('#date-pick').datePicker(
// associate the link with a date picker
{
createButton:false,
startDate:'18/05/2007',
endDate:'11/12/2007'
}
).bind(
// when the link is clicked display the date picker
'click',
function()
{
updateSelects($(this).dpGetSelected()[0]);
$(this).dpDisplay();
return false;
}
).bind(
// when a date is selected update the SELECTs
'dateSelected',
function(e, selectedDate, $td, state)
{
updateSelects(selectedDate);
}
).bind(
'dpClosed',
function(e, selected)
{
updateSelects(selected[0]);
}
);
   var updateSelects = function (selectedDate)
{
var d = selectedDate.getDate();
var m = selectedDate.getMonth();
var y = selectedDate.getFullYear();
($('#d')[0]).selectedIndex = d - 1;
($('#m')[0]).selectedIndex = m;
($('#y')[0]).selectedIndex = y - 2007;
}
// listen for when the selects are changed and update the picker
$('#d, #m, #y')
.bind(
'change',
function()
{
var d = new Date(
$('#y').val(),
$('#m').val()-1,
$('#d').val()
);
$('#date-pick').dpSetSelected(d);
});
   // default the position of the selects to today
var today = new Date();
($('#d')[0]).selectedIndex = today.getDate() - 1;
($('#m')[0]).selectedIndex = today.getMonth();
($('#y')[0]).selectedIndex = today.getFullYear() - 2007;
// and update the datePicker to reflect it...
$('#d').trigger('change');
});
/script


It works well with Firefox But IE6 complains about a missing ] on 
line 7, car 94.. code : 0.. i don't know what to do to make it work.. 
and that line/char reference doesn't mean anything.. BUT the error 
message changes when i remove the date.js from the called scripts.. ?


Any helps or advices .. ?

Thanks !!









[jQuery] Re: * Important: Repent, Completely trust in God only and, Love Him with all of your heart.

2007-05-15 Thread ThePengwin

If you refuse to trust in God, it's not my loss.

So yeah, why are you trying to enfore your beliefs on people again?



[jQuery] return a variable after an ajax call

2007-05-15 Thread Paul Malan

Hi all, I'm sorry if this has been answered before; it seems simpler
than I'm making it.

I am validating a form field on blur by calling a function
validateField.  This function handles the ajax interaction and passes
the response to another function showIcon, which determines which icon
to display and may or may not display an error message div.

This is all working, but now I want to display only the first form
field on load.  The remainder of the form should display only if the
first field passes muster, so I'd simply like to have my validateField
function return true or false.  What could be simpler?  (a lot,
apparently!)

Here is the function.  Is there an easy way to have it return true/
false?  I don't want to interrupt the normal callback handoff to
showIcon, I just want the calling page to have access to the result.

function validateField(file, field, criteria){
$(#+field+ img.ico).attr(src,/images/office/ico-
loading.gif);
$.get(/gateway/validate-+file+.cfm,
{field: field, value: $(#+field+ 
input).val(), criteria:
criteria},
function(response){
response = eval((+response+));

showIcon(field,response.pass,response.msg);
});
}



[jQuery] Re: Text Highlighting from Search

2007-05-15 Thread Glen Lipka

On 5/15/07, Renato Formato [EMAIL PROTECTED] wrote:



 Wow, that looks robust.  Definetely let me know when it's released.
 So I assume, I would remove the search definitions and add something
like:
 [/^http:\/\/(www\.)?commadot\./i, /s=([^]+)/i],

 I get a little lost on the syntax there.
 It might be worth while in the plugin to make a simple api to create new
 ones like
 {http:true,
 https:false,
 url: *.commadot.com,
 urlVariable: s}

 or maybe allow it to take a dom element text, which would help in AJax
 situations.  Like the content of a span would be the keywords?


Thanks Glen, I know that regular expressions are not easy to use. The
idea of using an API to build the regexs is a good one and cover most of
the cases but not all, those in which the words are not in the query
string  (ex: sites using dir names to search a tag
www.my_site.com/jQuery). However I think that something better can be
done.

The plugin is based on referrer urls. It seems you need to highlight
words taking them from your current url. Another good addition to do.

Talking about brainstorming, maybe it can be done with an option like
this:

url = {
  type:referrer or current,
  schema:http,
  domain:commadot.com,
  path:,
  urlVar=s
}

Another idea can be to provide a keys option, in which you could set a
space separated list of keywords to search. When keys is set, no
regexs would be evaluated, the plugin would directly search for this keys.

Ex:
//when retrieving the keys from the url
var search = window.location.match(/s=([^]+)/i);
or
//when retrieving the keys from a DOM element
var search = jQuery(#searchTerm).text();
//go to search
options = {keys:search};
jQuery(function(){
jQuery(document).SEhighlight(options);
})

Renato





Yeah, that first option looks good.
The second one goes over my head. :)

Glen


[jQuery] Re: Parse XML with IE

2007-05-15 Thread philguillard


I finally found out when preparing a clean sample to put online, that's 
usually the case!

: the presence of the metadata plugin ! Crazy
Just the js inclusion since i was not really using it.
http://fyneworks.blogspot.com/2007/04/fix-for-jquery-bug-in-ie-working-with.html

Thanks
Phil

Ⓙⓐⓚⓔ wrote:

the name of the program is 'test' in the root directory of the server... it
sets the header to be text/xml...

inside success, response is the xml tree of the response, not much good for
debugging. If the alert returns '' for the result, I guess there is a
problem. in the complete callback, you can check the 
response.responseXMLand

response.responseText

do you have a live link??
your code looks like it should, assuming it's actually getting the xml
result you expect..

On 5/15/07, philguillard [EMAIL PROTECTED] wrote:




Thank you guys.
I still can't manage to parse any XML data with IE6.

True it is cleaner to use dataType : 'xml' and use success, but :

Whith a basic sample, and i checked mime type was really text/xml
?xml version=1.0?
root
jqueryhello/jquery
/root

$.ajax({
type: GET,
url: /test,
dataType : 'xml',
success: function(response){
alert(A success=+response);
alert(B +typeof response);
alert(C +$(/root/jquery, response).text());
} ,
error: function(o,e1,e2){
alert(error+e1);
}
});

On [A] i have sucess=
On [B] i have object
Erro is launched on [C]
== i suppose object is empty
Works fine on firefox.

Any idea?

Phil

Ⓙⓐⓚⓔ wrote:
 Phil, your code says:

 do a get, when it's complete look for rootnode. BUT, what if the
response
 has no xml, is malformed, or got some other error. You're ignoring all
 possible errors!

 success callback calls back when you have a good result (or pretty 
good)

 error is called for most errors.
 complete needs to check what it got.

 I think we need more help for complete coding, I posted a ticket 
with my

 results... IE was not included though!

 http://dev.jquery.com/ticket/1145#preview

 On 5/15/07, philguillard [EMAIL PROTECTED] wrote:



 Hi all,

 I know IE6 (maybe 7) is known to have limited ability to parse XML but
 it seems it can.
 After an ajax call, i'd like to parse the xml file like this :

 $.ajax({
 type: GET,
 url: url,
 complete: function(response){
 var rootNode = $(/rootNode, response.responseXML);
 }
 });

 Is there a hack?, is there something specific about the XML file it 
can

 parse (ex: no node attributes).


 Regards,

 Phil











[jQuery] Re: Linking each list item to respective div container.

2007-05-15 Thread Karl Rudd


Why don't you want do this without naming ids and classes?

My recommendation would be to use something like this:

$(function() {
var targets = $('[EMAIL PROTECTED]');
if ( !targets.length ) return;

var firstTarget = targets[0];
var pageLinks = $('[EMAIL PROTECTED]#]');

targets
.hide()
.each( function() {
var target = $(this);
function showTarget() {
targets.hide();
target.show();
return false;
}
$(pageLinks)
.filter('[EMAIL PROTECTED]#' + this.id + ']')
.click( showTarget );

if ( this == firstTarget )
showTarget.apply( firstTarget );
});
});

You use it like this:

html
head
script type=text/javascript src=jquery.js/script
script type=text/javascript src=hashShow.js/script
titleTest/title
/head
body
pa href=#section1Show Section 1/a/p
pa href=#section2Show Section 2/a/p
div class=hashShow id=section1
h1Section 1/h2
/div
div class=hashShow id=section2
h1Section 2/h2
/div
/body
/html

There's also an added advantage that should JavaScript be not
available the links will still work.

I'll be putting this into a more flexible plugin format a little
later. If anyone's interested let me know.

Karl Rudd

On 5/16/07, [EMAIL PROTECTED] d [EMAIL PROTECTED] wrote:


Hi there, I just started to working on jQuery and am finding it
extremely easy to use. However I've been trying to find a solution to
a simple navigation problem here..

My markup has a list with a few 'li' items. So for each click on a
list item it would show the respective div container and hide the
rest...

!-- List Menu --

div id=dropbox
  ul
liCash/li
liPersonal Assets/li
liCertificates of Deposit/li
  /ul
/div

!-- Div Containers --

div class=formcash
  h2Cash/h2
/div

div class=formpersonal
  h2Personal Assets/h2
/div

div class=formdeposit
  h2Certificates of Deposit /h2
/div

Can I some how do the toggle without naming ids and classes?

Any ideas people?




[jQuery] Re: return a variable after an ajax call

2007-05-15 Thread Erik Beeson


The easy answer is no, it doesn't work like that. I assume you mean
you want validateField to return based on the result of the $.get
callback? The whole point of the callback stuff is that the validate
function has long since finished executing by the time your code in
the callback function starts executing, which means there's no chance
for returning from validateField via your callback.

The right way to deal with this (assuming you believe your design is
sound) would be to pass a callback to validateField. So instead of:

if(validateField(...)) {
 // success stuff
} else {
 // failure stuff
}

You would do:

validateField(..., function(succeeded) {
 if(succeeded) {
   // success stuff
 } else {
   // failure stuff
 }
});

And change validateField to look something like this:

function validateField(file, field, criteria, callback){
   $(#+field+ img.ico).attr(src,/images/office/ico-loading.gif);
   $.get(/gateway/validate-+file+.cfm,
   {field: field, value: $(#+field+ input).val(), criteria: criteria},
   function(response) {
   response = eval((+response+));
   showIcon(field,response.pass,response.msg);
   if(callback) {
   callback(/* true or false */);
   }
   }
   );
}

But again, you may want to rethink your design, or maybe consider
using the jQuery validation plugin:
http://jquery.bassistance.de/validate/demo-test/

--Erik

On 5/15/07, Paul Malan [EMAIL PROTECTED] wrote:


Hi all, I'm sorry if this has been answered before; it seems simpler
than I'm making it.

I am validating a form field on blur by calling a function
validateField.  This function handles the ajax interaction and passes
the response to another function showIcon, which determines which icon
to display and may or may not display an error message div.

This is all working, but now I want to display only the first form
field on load.  The remainder of the form should display only if the
first field passes muster, so I'd simply like to have my validateField
function return true or false.  What could be simpler?  (a lot,
apparently!)

Here is the function.  Is there an easy way to have it return true/
false?  I don't want to interrupt the normal callback handoff to
showIcon, I just want the calling page to have access to the result.

function validateField(file, field, criteria){
$(#+field+ img.ico).attr(src,/images/office/ico-
loading.gif);
$.get(/gateway/validate-+file+.cfm,
{field: field, value: $(#+field+ 
input).val(), criteria:
criteria},
function(response){
response = eval((+response+));

showIcon(field,response.pass,response.msg);
});
}




[jQuery] (OT) Node.prototype

2007-05-15 Thread Sean Catchpole


Mozilla (Firefox) can extend Node, but IE cannot.

Here's a snippet of what I am trying to do:
   Node.prototype.ac = function(e) { this.appendChild(e); }

The problem is that Node is not defined in IE.
Does anyone have any bright ideas on how we can trick IE into working also?

~Sean


[jQuery] Re: * Important: Repent, Completely trust in God only and, Love Him with all of your heart.

2007-05-15 Thread Matt Stith


ha, some of this stuff is kinda funny...

On 5/15/07, ThePengwin [EMAIL PROTECTED] wrote:


If you refuse to trust in God, it's not my loss.

So yeah, why are you trying to enfore your beliefs on people again?




[jQuery] Re: * Important: Repent, Completely trust in God only and, Love Him with all of your heart.

2007-05-15 Thread Josh Nathanson


It's funny how they're so anti-science, yet without science, I doubt we'd 
have computers or email to allow them to spread the good word so easily.



- Original Message - 
From: Matt Stith [EMAIL PROTECTED]

To: jquery-en@googlegroups.com
Sent: Tuesday, May 15, 2007 4:14 PM
Subject: [jQuery] Re: * Important: Repent, Completely trust in God only and, 
Love Him with all of your heart.





ha, some of this stuff is kinda funny...

On 5/15/07, ThePengwin [EMAIL PROTECTED] wrote:


If you refuse to trust in God, it's not my loss.

So yeah, why are you trying to enfore your beliefs on people again?






[jQuery] Re: jqModal question

2007-05-15 Thread Shelane Enos
Since I was doing an ajax request, I passed the ID of the item I wanted to
change and had lasso display it on the modal¹s js.  It¹s working great.
Thanks.


On 5/15/07 2:09 PM, Shelane Enos [EMAIL PROTECTED] wrote:

 I haven¹t tried this yet, but just wondering... The image I need to load is
 based on the results of what done in the modal and what result is returned
 from the server.  Ideally, the action I perform on the modal (when something
 clicked) would also cause the modal to close.
 
 
 On 5/15/07 2:01 PM, Benjamin Sterling [EMAIL PROTECTED]
 wrote:
 
 Maybe something like below (not tested and off the top of my head)
 
 var currentObject = null;
 
 $(function(){
 $('.invited').css('cursor',
 'pointer').click(function(){
 var url = 'myserverpage.lasso?task=eventevent=1volunteer=';
 url += $(this).attr('id');
 currentObject = this;
 $('#invitation').jqm({
 ajax: url,
 onhide: function(){
 hash.o.remove();
 doSomething();
 }
 }).jqmShow(); 
 });
 });
 
 doSomething = function(){
 $(currentObject ).empty().append('img/');
 currentObject = null;
 }
 
 
 That should point you in the right direction.
 
 
  
 




  1   2   >