[jQuery] [validate] Using remote w/ data and ASMX doesn't seem to process the response

2009-03-31 Thread pbarnes

I'm trying to integrate the Validation plug-in with an ASP.NET site
using ASMX services. The service is very simple: it takes in two
strings and returns a boolean. I can see valid XML response in
Firebug, but the plugin doesn't seem to process it properly. Both true
and false return values result in no form submission and no error
message (and any previous error messages, e.g., You must enter at
least 10 numbers) are not cleared.

Here's my validation code:

$('#aspnetForm').validate({
rules: {
phoneNumber: {
required: true,
minlength: 5,
remote: {
url: 
'CorpSiteService.asmx/ValidatePhoneNumber',
data: {
countryId: function() {
return 
$('#ctl00_ContentPlaceHolderBody_uxCountryDropDown').val
();
}
}
}
}
},
messages: {
phoneNumber: {
required: A mobile number is required.,
minlength: $.format(Enter at least {0} 
characters),
remote: Invalid phone number for this carrier.
}
}
});

The response from the ASMX service is:

?xml version=1.0 encoding=utf-8?
boolean xmlns=http://svc.picdial.com/WebServices/;true/boolean

The end result is the same whether the Web service returns true or
false.


[jQuery] Re: Selecting dynamic elements

2009-03-31 Thread schickb

Thanks

On Mar 27, 3:02 pm, James james.gp@gmail.com wrote:
 Try it out:
 $inner = $elems.find(#inner);
 alert( $inner.text() );


[jQuery] Re: Work on one specific node and not on the window.document

2009-03-31 Thread xPheRe

To locate a node with id myId that is a descendant of another one,
in a var called myNode, use:
$('#myId', myNode)
Hope it helps :)

On 30 mar, 17:20, tij_dev tijmas...@googlemail.com wrote:
 Hi guys !

 I assume this is a really basic question but I'm a JQuery rookie :) so
 please be indulgent :)

 I would like to get an element by its id but just on a specific node.
 I only see on the web things like that : $(#myId). That is the
 equivalent of window.document.getElementById(myId). But for me that
 should be something like myNode.getElementById(myId).

 Is that clear?...

 Thanks in advance


[jQuery] Re: Work on one specific node and not on the window.document

2009-03-31 Thread Steven Yang
do you have a special reason to find an element by id in a specific node?isn't
id suppose to be unique in the whole document?


[jQuery] Re: My code which use keydown(fn) don't work on IE?? help

2009-03-31 Thread liec

Thanks, Hector  :)

On Mar 31, 9:55 am, Hector Virgen djvir...@gmail.com wrote:
 Try observing window.document instead of window.
 -Hector

 On Mon, Mar 30, 2009 at 5:30 PM, liec lie...@gmail.com wrote:

  $(window).keydown(function(e){
        if (e.keyCode == 13)
                sendmsg();
  });

  $(window).keydown(function(ke){
         switch (ke.keyCode)
                 {
                 case 13:
                         alert('enter');
                         sendmsg();
                         break;
                 }
  });

  They work well on firefox and chrome
  but It is not work on IE7.0 ?


[jQuery] Re: [validate] Select box help

2009-03-31 Thread Jörn Zaefferer

Just set a required-rule for the select.

See http://jquery.bassistance.de/validate/demo/tabs/ (second tab)

Jörn

On Mon, Mar 30, 2009 at 10:51 PM, Matt pyrophr...@gmail.com wrote:

 I have a form that has a few select boxes and have been unsuccessful
 at getting them to validate on change, or tabbing away from the field.
 The first field is a month field, and the first option is blank the
 select is designed like so
 select name=dobmonth id=dobmonth class=inputNormal style=width:
 199px;
        option value=Month/option
        option value=1January/option
        option value=2February/option
        option value=3March/option
        option value=4April/option
        option value=5May/option
        option value=6June/option
        option value=7July/option
        option value=8August/option
        option value=9September/option
        option value=10October/option
        option value=11November/option
        option value=12December/option
 /select
 i have tried multiple ways to no success any help would be greatly
 appreciated.



[jQuery] Re: [validate] Using remote w/ data and ASMX doesn't seem to process the response

2009-03-31 Thread Jörn Zaefferer
The plugin expects a JSON true/false response, which you don't
provide. You could set the dataFilter-ajax-option (see
http://docs.jquery.com/Ajax/jQuery.ajax#options) to postprocess the
response.

remote: {
  url: webservice...,
  dataFilter: function(data) {
 return process(data);
  }
}

Jörn

On Tue, Mar 31, 2009 at 7:05 AM, pbarnes pmbar...@gmail.com wrote:

 I'm trying to integrate the Validation plug-in with an ASP.NET site
 using ASMX services. The service is very simple: it takes in two
 strings and returns a boolean. I can see valid XML response in
 Firebug, but the plugin doesn't seem to process it properly. Both true
 and false return values result in no form submission and no error
 message (and any previous error messages, e.g., You must enter at
 least 10 numbers) are not cleared.

 Here's my validation code:

        $('#aspnetForm').validate({
                rules: {
                        phoneNumber: {
                                required: true,
                                minlength: 5,
                                remote: {
                                        url: 
 'CorpSiteService.asmx/ValidatePhoneNumber',
                                        data: {
                                                countryId: function() {
                                                        return 
 $('#ctl00_ContentPlaceHolderBody_uxCountryDropDown').val
 ();
                                                }
                                        }
                                }
                        }
                },
                messages: {
                        phoneNumber: {
                                required: A mobile number is required.,
                                minlength: $.format(Enter at least {0} 
 characters),
                                remote: Invalid phone number for this 
 carrier.
                        }
                }
        });

 The response from the ASMX service is:

 ?xml version=1.0 encoding=utf-8?
 boolean xmlns=http://svc.picdial.com/WebServices/;true/boolean

 The end result is the same whether the Web service returns true or
 false.


[jQuery] Re: Jquery - Weird Issue with Node cannot be inserted at the specified point...

2009-03-31 Thread Michael Geary

I do believe that is more nbsp;'s and quot;'s than I have ever seen at one
time.

Is there a way to get that more readable? Maybe a link to your test page?

-Mike

 From: ckoeber
 
 Hello,
 
 I am trying to create a JSON service and everything seems to 
 work well until I am pulling the actual data from gthe 
 service to be inserted into a DIV element on a page.
 
 Here is the code for the JSON service (client side):
 
 
 
 
 
   nbsp;if (Drupal.jsEnabled) {
 
 nbsp;nbsp; nbsp;$(document).ready(
 
 nbsp;nbsp; nbsp;nbsp;nbsp; 
 nbsp;nbsp;nbsp; nbsp;function(){
 
 nbsp;nbsp; nbsp;nbsp;nbsp; 
 nbsp;nbsp;nbsp; nbsp;nbsp;nbsp; 
 nbsp;$(quot;#portfolio_quotes_div_form_blockquot;).html('lt;form
 id=quot;frmPortfolioSymbolsBlockquot;
 name=quot;frmPortfolioAddSymbolBlockquot; 
 method=quot;postquot; 
 action=quot;quot;gt;lt;labelgt;Symbollt;input
 name=quot;txtSymbolquot; type=quot;textquot; 
 id=quot;txtSymbolquot; size=quot;10quot; 
 /gt;lt;/labelgt;lt;labelgt;lt;input
 type=quot;submitquot; name=quot;cmdAddquot; 
 id=quot;cmdAddquot; value=quot;Addquot; 
 /gt;lt;/labelgt;lt;labelgt;lt;input
 type=quot;submitquot; name=quot;cmdReloadSymbolsquot; 
 id=quot;cmdReloadSymbolsquot; value=quot;Refreshquot; 
 /gt;lt;/labelgt;lt;/formgt;');
 
 nbsp;nbsp; nbsp;nbsp;nbsp; 
 nbsp;nbsp;nbsp; nbsp;nbsp;nbsp; 
 nbsp;//Drupal.settings.portfolio_json_getquotes.uid
 
 nbsp;nbsp; nbsp;nbsp;nbsp; 
 nbsp;nbsp;nbsp; nbsp;nbsp;nbsp; nbsp;nbsp;nbsp; 
 nbsp;nbsp;nbsp; 
 nbsp;$.post(Drupal.settings.portfolio_json_getquotes.ajaxUrl,
 {uid:Drupal.settings.portfolio_json_getquotes.uid},
 
 nbsp;nbsp; nbsp;nbsp;nbsp; 
 nbsp;nbsp;nbsp; nbsp;nbsp;nbsp; 
 nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;
 function (data) {
 
 nbsp;nbsp; nbsp;nbsp;nbsp; 
 nbsp;nbsp;nbsp; nbsp;nbsp;nbsp; 
 nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;n
 bsp; var result = Drupal.parseJson(data);
 
 nbsp;nbsp; nbsp;nbsp;nbsp; 
 nbsp;nbsp;nbsp; nbsp;nbsp;nbsp; 
 nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;
 $(quot;#portfolio_quotes_div_blockquot;).html(result);
 
 nbsp;nbsp; nbsp;nbsp;nbsp; 
 nbsp;nbsp;nbsp; nbsp;nbsp;nbsp; 
 nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;
 });
 
 nbsp;nbsp; nbsp;nbsp;nbsp; 
 nbsp;nbsp;nbsp; nbsp;nbsp;nbsp; 
 nbsp;$(quot;#cmdReloadSymbolsquot;).bind(quot;clickquot;,
  function() {
 
 nbsp;nbsp; nbsp;nbsp;nbsp; 
 nbsp;nbsp;nbsp; nbsp;nbsp;nbsp; 
 nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;
 $.post(Drupal.settings.portfolio_json_getquotes.ajaxUrl,{uid:D
 rupal.settings.portfolio_json_getquotes.uid},
 
 nbsp;nbsp; nbsp;nbsp;nbsp; 
 nbsp;nbsp;nbsp; nbsp;nbsp;nbsp; 
 nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;
 function (data) {
 
 nbsp;nbsp; nbsp;nbsp;nbsp; 
 nbsp;nbsp;nbsp; nbsp;nbsp;nbsp; nbsp;nbsp;nbsp; 
 nbsp;nbsp;nbsp; nbsp;nbsp; var result = Drupal.parseJson(data);
 
 nbsp;nbsp; nbsp;nbsp;nbsp; 
 nbsp;nbsp;nbsp; nbsp;nbsp;nbsp; nbsp;nbsp;nbsp; 
 nbsp;nbsp;nbsp; nbsp;nbsp;nbsp; 
 $(quot;#portfolio_quotes_div_blockquot;).html(result);
 
 nbsp;nbsp; nbsp;nbsp;nbsp; 
 nbsp;nbsp;nbsp; nbsp;nbsp;nbsp; 
 nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;
 });
 
 nbsp;nbsp; nbsp;nbsp;nbsp; 
 nbsp;nbsp;nbsp; nbsp;nbsp;nbsp; nbsp;nbsp;nbsp; 
 nbsp;nbsp; return false;
 
 nbsp;nbsp; nbsp;nbsp;nbsp; 
 nbsp;nbsp;nbsp; nbsp;nbsp;nbsp; nbsp;});
 
 nbsp;nbsp; nbsp;nbsp;nbsp; nbsp;nbsp;nbsp; nbsp;}
 
 nbsp;nbsp; nbsp;)
 
 }
 
 
 
 nbsp;And here is a sample of the data returned from the 
 working service (the code below is formatted for js):
 
 
 
 
 
   
 
 
 quot;\x3ctable id=\quot;portfolio_quotes_table_block\quot;
 width=\quot;100%\quot; border=\quot;0\quot; 
 cellspacing=\quot;0\quot; cellpadding 
 =\quot;0\quot;\x3e\x3ctr\x3e\x3cth
 scope=\quot;col\quot;\x3eSymbol\x3c/th\x3e\x3cth
 scope=\quot;col\quot;\x3eLast\x3c/th\x3e
 \x3cth
 scope=\quot;col\quot;\x3eChange\x3c/th\x3e\x3c/tr\x3e\x3ctr\
 x3e\x3cth
 scope=\quot;row\quot;\x3eMSFT\x3c/th\x3e
 \x3ctd\x3e17.44\x3c/td\x3e\x3ctd\x3e-0.69\x3c/td\x3e\x3c/tr\x3
 e\x3ctr\x3e\x3cth
 scope=\quot;row\quot;\x3e\x3c
 /th\x3e\x3ctd\x3e\x3c/td\x3e\x3ctd\x3e\x3c/td\x3e\x3c/tr\x3e\x
 3c/table\x3equot;
 
 
 
 
 
 nbsp;Essentially what I am looking for is a table that will 
 be inserted inside a DIV element on the first loading of a 
 page as well as when the refresh button on the form by the JS 
 code above. The code runs but I get the following message:
 
 
 
 
 
   uncaught exception: Node cannot be inserted at 
 the specified point in the hierarchy 
 (NS_ERROR_DOM_HIERARCHY_REQUEST_ERR)
 
 
 
 Any ideas?
 
 Thank you for your time.
 
 Regards,
 
 Christopher Koeber
 
 nbsp;
 



[jQuery] Re: Work on one specific node and not on the window.document

2009-03-31 Thread Klaus Hartl

On 31 Mrz., 08:38, Steven Yang kenshin...@gmail.com wrote:
 do you have a special reason to find an element by id in a specific node?isn't
 id suppose to be unique in the whole document?

Could think of: It may have different behavior depending on wether
it's in the main content or the sidebar.


[jQuery] Re: AJAX - ignore mime type

2009-03-31 Thread the_woodsman

Thanks for your responses guys.

James - I think I'm trying to do the opposite, my ajax call returns
XML, and I want to treat it like plain HTML - but I'll look at your
link and see if it helps, thanks!

Klaus - the API exists already and is used by other client technology,
I don't have free reign to change it...  and I shouldn't have to,
everything works fine when i send XML without the mime type!
I just need to ignore the XML mime type, and everything would be
sorted!!!






On Mar 31, 6:30 am, Klaus Hartl klaus.ha...@googlemail.com wrote:
 I am wondering why the server would not serve html in the first place.

 --Klaus

 On 30 Mrz., 15:37, the_woodsman elwood.ca...@gmail.com wrote:

  Hi,

  My ajax requests return xml, with the corresponding mime type.

  I'm using $.get, as so:

          $.get(
                                                  $(this).attr('href'),
                                                  function(data, textStatus)
                                                  {
                                                          
  $('#requestArea').val(data);
                                                  },
                                                  'html' //type, correct?
                                          );

  $('#requestArea').val(data) sets a text area to say [object
  XMLDocument]

  So it seems my setting the type to html does nothing!

  I've played around with this a bit, including using other ajax methods
  apart from .get(), with the same results.

  Am I missing something here?

  Thanks in advance!


[jQuery] Re: fastest way to create a million div's?

2009-03-31 Thread Shedokan

And how do i get my hands on one of those?

On 31 מרץ, 01:47, Hector Virgen djvir...@gmail.com wrote:
 IMHO Canvas is still the best choice for pixel editing. Take a look at some
 of Google's achievements with the canvas 
 tag:http://www.chromeexperiments.com/detail/javascript-canvas-raytracer/

 -Hector

 On Sun, Mar 29, 2009 at 10:50 PM, Shedokan shedo...@yahoo.com wrote:

  thanks for all of your comments, I will try them all.

  As for canvas, I can't really use it because I want to support pixel
  editing and when resizing the canvas I'll need to re render it again
  and again.

  and as for flash, when I try to add that much pixels it gives me a
  warning about stopping the script.

  but I am looking at all possible ways.


[jQuery] Re: fastest way to create a million div's?

2009-03-31 Thread donb

Just as an aside, 1 million 'divs' would require 11 megabytes of
memory just to create them empty:  'div/div' x 10^6

On Mar 31, 5:09 am, Shedokan shedo...@yahoo.com wrote:
 And how do i get my hands on one of those?

 On 31 מרץ, 01:47, Hector Virgen djvir...@gmail.com wrote:

  IMHO Canvas is still the best choice for pixel editing. Take a look at some
  of Google's achievements with the canvas 
  tag:http://www.chromeexperiments.com/detail/javascript-canvas-raytracer/

  -Hector

  On Sun, Mar 29, 2009 at 10:50 PM, Shedokan shedo...@yahoo.com wrote:

   thanks for all of your comments, I will try them all.

   As for canvas, I can't really use it because I want to support pixel
   editing and when resizing the canvas I'll need to re render it again
   and again.

   and as for flash, when I try to add that much pixels it gives me a
   warning about stopping the script.

   but I am looking at all possible ways.


[jQuery] SUPERFISH - Possible to Animate LI's within UL?

2009-03-31 Thread Martin Evans

Hi everyone,

I've been playing with Joel's fantastic menu plugin and was wondering
if anyone knows if it's possible to animate the LI's at the same time
the containing UL is being animated?

I've got a simple demo running that *almost* does what I want:

http://www.retropolis.com/clients/etc/superfish/example_martin.html

I'm making the UL's fade-in, fly up and bounce using the the animation
object to alter margin-top and onShow callback to get the bounce. What
I'd also like to do is animate the css height property of the LI's as
they rise, starting out spaced apart and having them come together at
the end of their travel, and do the opposite in reverse. Is this
possible to do by passing a parameter, or will editing of the core
script be required?

Thank you for reading!

Martin


[jQuery] captions and jcarousel

2009-03-31 Thread Jason

Forgive my ignorance first of all, but i have a horizontal
carousel (not sure of the technical term) with images. Is it
possible to include a caption(text) above and below each image?
Secondly, is the size of each image only limited to 75x75? Many thanks


jason


[jQuery] Display google.com in a Div

2009-03-31 Thread emilien.hum...@gmail.com

Dear all,

I am trying to create a sort of slidebar containing a list of links
[google.fr/yahoo.fr/facebook.com;...;...;...]
The idea is to display in a div the slidebar and in another div the
website.


The slidebar is ok, but I have not found the way to display the site
into the second div.

Someone has an idea ?


!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=utf-8 /
titleSliding Side Bar/title

script type=text/javascript src=js/jquery-1.2.3.pack.js/script
script type=text/javascript src=js/side-bar.js/script
link type=text/css href=css/index.css rel=stylesheet /

/head

body

div id=sideBar

a href=# id=sideBarTabimg src=images/slide-button.png
alt=sideBar title=sideBar //a

div id=sideBarContents style=width:0px;
div id=sideBarContentsInner
h2Quick links/h2
ul
  lia href=http://www.google.fr; img
src=http://www.google.com/s2/favicons?domain=www.google.fr; //a/
li
/ul
/div
/div

/div

div id=webPage
phop/p
/div





[jQuery] Re: Form no longer works with upgrade to 1.3.2

2009-03-31 Thread Kathryn

John,

Thanks for the tip. Validation did find some errors, but even after I
fixed them it didn't work.

But by trial and error (after getting some sleep! :) ) I discovered
the offending jQuery line. With the upgrade, I had the wrong syntax
for the name attribute. In trying to fix it, I found some funky answer
on the web last night which apparently caused the problem.  But this
morning I found the right answer (i.e., $(input[name='dept']).click
(function() { etc etc...) and the problem's solved.

Thanks again for your time. I don't know if you get tired of hearing
it (hopefully not!) but jQuery ROCKS! I'm just learning it, but it has
simplified my coding and put wonderful enhancements within easy reach.
THANK YOU!!!

Kathryn


On Mar 30, 10:16 pm, John Resig jere...@gmail.com wrote:
 Well, without being able to see the form in question - does your page
 validate? If everything is going into a single input that sounds like
 a problem with malformed HTML markup.

 --John

 2009/3/30 Kathryn kathry...@gmail.com:



  I'm working on a web form and had to upgrade to 1.3.2 tonight to solve
  some problems. Unfortunately, I now have a much worse problem. Not by
  my choice, I have to use ASP. With the lower version of jQuery, the
  form was working fine and I could process it as usual...e.g.,

  HTML:
  input name = dept
  input name = employee
  etc. (There are around 40 fields on this form)

  ASP:
  dim dept, employee
  dept = request.form(dept)
  employee = request.form(employee)
  etc.

  However, since upgrading, when I submit the form and response.write
  the results on the ASP page, the contents of ALL form fields are
  contained in the dept variable and all the other variables are empty.
  I know it's not a problem with the ASP code, because it was working
  immediately before the upgrade and I haven't changed it.

  Has anyone else had this happen, and if so, what did you do about it?

  Thanks in advance,

  Kathryn


[jQuery] Re: Display google.com in a Div

2009-03-31 Thread sliver

I think you should read up on what an img tag is
http://www.w3.org/TR/REC-html40/struct/objects.html#h-13.2

And then to solve your problem, read up on the iframe tag
http://www.w3.org/TR/html401/present/frames.html#h-16.5

Essentially, swap out the img tag with an iframe tag.

On Mar 31, 5:15 am, emilien.hum...@gmail.com
emilien.hum...@gmail.com wrote:
 Dear all,

 I am trying to create a sort of slidebar containing a list of links
 [google.fr/yahoo.fr/facebook.com;...;...;...]
 The idea is to display in a div the slidebar and in another div the
 website.

 The slidebar is ok, but I have not found the way to display the site
 into the second div.

 Someone has an idea ?

 !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=utf-8 /
 titleSliding Side Bar/title

 script type=text/javascript src=js/jquery-1.2.3.pack.js/script
 script type=text/javascript src=js/side-bar.js/script
 link type=text/css href=css/index.css rel=stylesheet /

 /head

 body

 div id=sideBar

         a href=# id=sideBarTabimg src=images/slide-button.png
 alt=sideBar title=sideBar //a

         div id=sideBarContents style=width:0px;
                 div id=sideBarContentsInner
                         h2Quick links/h2
                         ul
                               lia href=http://www.google.fr; img
 src=http://www.google.com/s2/favicons?domain=www.google.fr; //a/
 li
                         /ul
                 /div
         /div

 /div

 div id=webPage
 phop/p
 /div


[jQuery] How To Extend a jQuery: Plugins versus Other?

2009-03-31 Thread Alan Gutierrez

I've created a first jQuery plugin. I'm working in a project that uses  
ColdFusion 5, and I'm being lazy about learning ColdFusion. I'm able  
to spit out simple plain/text of this format from a database using  
ColdFusion:

person.firstName=Alan
person.lastName=Gutierrez
person.address.city=New Orleans

And I convert them into hashes when they arrive from a $.get. I end up  
with this JavaScript object expressed below in JSON.

var hash = {
   person: {
 firstName: Alan,
 lastName: Gutierrez,
 address: {
 city: New Orleans
 }
   }
};

I extend jQuery by extending the $.get method to detect a hash type  
and wrap the callback in a function that will translate the property  
file into a hash.

$.get( 'data.cfm?id=' + id, function( hash ) {
 alert('Hello ' + hash.person.firstName + ' ' +  
hash.person.lastName);
}, hash );

http://snipplr.com/view/13622/jquery-plugin-extend-get-to-parse-plain-text-properties-file-to-a-hash/

Best practice? Is there a better way to extend such core  
functionality? I'm wondering how one goes about creating jQuery  
extensions. It always bothered me that jQuery had such a small  
namespace.

Alan Gutierrez


[jQuery] Re: Enable a disabled button by id

2009-03-31 Thread Karthikraj



On Mar 30, 7:44 pm, Thierry lamthie...@gmail.com wrote:
 I can disable button with specific id with the following code:

 jQuery(#click_me:button).attr(disabled, true);

 If I want to re-enable the button, the following doesn't work:

 jQuery(#click_me:button).attr(disabled, false);

 Does anyone know what I'm missing?


instead of
jQuery(#click_me:button).attr(disabled, false);

try this

jQuery(#click_me:button).attr(disabled, false);


[jQuery] Full window carrousel??????

2009-03-31 Thread tom.fur...@googlemail.com

Hi All,

I am looking for any help or suggestions in trying to create a full
window carrousel like the one this guy uses to display his portfolio
http://www.tomhoops.com/fashion.html

I have started to use one that i found here
http://sorgalla.com/jcarousel/

You can see how far i have got with this one here 
http://83.170.105.221/~joannave/x.html

My main issue is to how to make the ul the full width of the
window.

Any help is greatly appreciated.

Thanks,
Tom


[jQuery] sortable serialize doesn't work

2009-03-31 Thread shichuanr

I have a strange problem with sortable serialize

ul id=sortable1
li class=ui-state-defaultItem 1/li
li class=ui-state-defaultItem 2/li
li class=ui-state-defaultItem 3/li
li class=ui-state-defaultItem 4/li
li class=ui-state-defaultItem 5/li
/ul
script type=text/javascriptserial = $('#sortable1').sortable
(serialize); alert(serial);/script

To alert sortable serialize doesn't return any value? I received alert
'undefined'. What could be wrong?


[jQuery] Problem getting selected value from drop-down

2009-03-31 Thread LinkGuru

Hi, Can anyone help with the following? With JQuery, I can't
successfully grab the selected value from a drop-down. The alert just
shows an empty message. At least it is not showing undefined (as it
was for my other attempts - you can see what these were from the
commented out code), but I would expect it to display one of the
values One-way, Reciprocal or Other. Perhaps I have to do some
conversion on the result. Your contributions to this post will be
greatly appreciated.

In my HTML I have:

select name=dllViewSelector
onchange=showSelectedView(this, allViews, 
allSections,4,10)

option id=oneway_4 value=one selected=selectedOne-
way/option
option id=recip_4 value=twoReciprocal/option
option id=other_4 value=threeOther/option
/select
.
.
.
span id=Add_0 class=actionOptAdd input type=button
name=btnOk_AddToProject_0 class=button-click-grey value=Add to
Project //span
.
.
.
And in my JQuery I have 

$(.actionOptAdd).bind(click,
function()
{
p_viewSelector=$(#dllViewSelector 
option:selected).text();
alert(p_viewSelector);
// Also get blank message for:
//  p_viewSelector=$(#dllViewSelector 
option:selected,this).text
();
// (Also tried - getting undefined as a result)
//  
p_viewSelector=$(#dllViewSelector).selectedIndex;
//  
p_viewSelector=$(#dllViewSelector).attr(selectedIndex);


[jQuery] Re: AJAX - ignore mime type

2009-03-31 Thread Klaus Hartl

You should be able to use the XmlHttpRequest.responseText property,
it'll give you the server response as string...

--Klaus



On 31 Mrz., 10:43, the_woodsman elwood.ca...@gmail.com wrote:
 Thanks for your responses guys.

 James - I think I'm trying to do the opposite, my ajax call returns
 XML, and I want to treat it like plain HTML - but I'll look at your
 link and see if it helps, thanks!

 Klaus - the API exists already and is used by other client technology,
 I don't have free reign to change it...  and I shouldn't have to,
 everything works fine when i send XML without the mime type!
 I just need to ignore the XML mime type, and everything would be
 sorted!!!

 On Mar 31, 6:30 am, Klaus Hartl klaus.ha...@googlemail.com wrote:

  I am wondering why the server would not serve html in the first place.

  --Klaus

  On 30 Mrz., 15:37, the_woodsman elwood.ca...@gmail.com wrote:

   Hi,

   My ajax requests return xml, with the corresponding mime type.

   I'm using $.get, as so:

           $.get(
                                                   $(this).attr('href'),
                                                   function(data, textStatus)
                                                   {
                                                           
   $('#requestArea').val(data);
                                                   },
                                                   'html' //type, correct?
                                           );

   $('#requestArea').val(data) sets a text area to say [object
   XMLDocument]

   So it seems my setting the type to html does nothing!

   I've played around with this a bit, including using other ajax methods
   apart from .get(), with the same results.

   Am I missing something here?

   Thanks in advance!




[jQuery] Re: sortable serialize doesn't work

2009-03-31 Thread Richard D. Worth
Your LIs need IDs. See

http://docs.jquery.com/UI/Sortable#method-serialize

If you have any further questions about jQuery UI plugins, please post here:

http://groups.google.com/group/jquery-ui

- Richard

On Tue, Mar 31, 2009 at 3:13 AM, shichuanr shichu...@gmail.com wrote:


 I have a strange problem with sortable serialize

 ul id=sortable1
li class=ui-state-defaultItem 1/li
li class=ui-state-defaultItem 2/li
li class=ui-state-defaultItem 3/li
li class=ui-state-defaultItem 4/li
li class=ui-state-defaultItem 5/li
 /ul
 script type=text/javascriptserial = $('#sortable1').sortable
 (serialize); alert(serial);/script

 To alert sortable serialize doesn't return any value? I received alert
 'undefined'. What could be wrong?



[jQuery] how to access the data from $.getJSON(ur,pa rams,function(data)(){}‏

2009-03-31 Thread neil

Hello,

 I am using struts2 and Jquery now.

 And who can please tell me how to access the sorttiervo from the
'data'$.getJSON('SortTiersAction',params,function(data)(){}



 data.sorttiervo? or other ways?











  public class SortTiersAction extends BaseActionS2 implements
ModelDriven {
   SortTierService  sorttierservice = new SortTierService();
   private SortTierVO sorttiervo  = new SortTierVO();

   public void setModel(SortTierVO sorttiervo) {
 this.sorttiervo = sorttiervo;
}

 public Object getModel() {
return this.sorttiervo;
   }

  public String execute() throws DefaultException {



  //do someting here;



  }





in struts.xml file



action name=SortTierQueryAction
class=com.qic.system.action.SortTiersAction
   result type=json
   param name=noCachetrue/param
   /result
/action


[jQuery] Re: Work on one specific node and not on the window.document

2009-03-31 Thread tij_dev

Thanks xPheRe this exactly what I wanted.

Precisely my issue was that I wanted to print a specific part of a
page. To do so i load that content into a hidden iframe I, then, print
it. That's why I want to work only on the dom content of this iframe
and not on the whole window.document.

Thanks to all ;)


[jQuery] Re: Display google.com in a Div

2009-03-31 Thread emilien.hum...@gmail.com

Hello Silver,

 I think you should read up on what an img tag 
 ishttp://www.w3.org/TR/REC-html40/struct/objects.html#h-13.2
Thank you ... Just for info img  src=http://www.google.com/s2/
favicons?domain=www.google.fr / allows me to display the favicon...
I am not trying to link anything.

 And then to solve your problem, read up on the iframe 
 taghttp://www.w3.org/TR/html401/present/frames.html#h-16.5
The idea was [if it s possible] to avoid using an Iframe. But maybe it
is the only solution.

I found a lot of way to replace an iFrame using div, but I was only
able to display external pages stored on my server, but no external
website, like yahoo or google ...

Sorry if it was not clear

Another Idea ?

Regards
Emilien


On 31 mar, 13:39, sliver sliver2...@gmail.com wrote:
 I think you should read up on what an img tag 
 ishttp://www.w3.org/TR/REC-html40/struct/objects.html#h-13.2

 And then to solve your problem, read up on the iframe 
 taghttp://www.w3.org/TR/html401/present/frames.html#h-16.5

 Essentially, swap out the img tag with an iframe tag.

 On Mar 31, 5:15 am, emilien.hum...@gmail.com

 emilien.hum...@gmail.com wrote:
  Dear all,

  I am trying to create a sort of slidebar containing a list of links
  [google.fr/yahoo.fr/facebook.com;...;...;...]
  The idea is to display in a div the slidebar and in another div the
  website.

  The slidebar is ok, but I have not found the way to display the site
  into the second div.

  Someone has an idea ?

  !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=utf-8 /
  titleSliding Side Bar/title

  script type=text/javascript src=js/jquery-1.2.3.pack.js/script
  script type=text/javascript src=js/side-bar.js/script
  link type=text/css href=css/index.css rel=stylesheet /

  /head

  body

  div id=sideBar

          a href=# id=sideBarTabimg src=images/slide-button.png
  alt=sideBar title=sideBar //a

          div id=sideBarContents style=width:0px;
                  div id=sideBarContentsInner
                          h2Quick links/h2
                          ul
                                lia href=http://www.google.fr; img
  src=http://www.google.com/s2/favicons?domain=www.google.fr; //a/
  li
                          /ul
                  /div
          /div

  /div

  div id=webPage
  phop/p
  /div


[jQuery] Mobile Ajax

2009-03-31 Thread Alaa

Hello,

I have a question which could be a very beginner question, This is
because I am a beginner,
Can we use jQuery framework to build Mobile Applications, or I have to
use a Mobile specific frameworks like Mojax or Frost.

Thanks alot,


[jQuery] Re: Stop on mouseover, restart on mouseout

2009-03-31 Thread flcarneiro

Anyone? Bueller? =)


[jQuery] Re: Catching document.forms['formid'].submit() with jquery validator

2009-03-31 Thread Yeuker

Thanks so much for the reply Jorn (and the great plugin).  My problem
is a little more complicated as the jsf controls put more javascript
statements than the document.forms['asdf'].submit() in the onclick
handler.  More troubling yet, sometimes the form submit (again with
other js) is in the href.  I've tried a few things but what works for
me is below.  Basically, i catch the onmousedown event (which has no
code in it).  If the form is valid, i allow the onclick to run (by not
setting it to '').  If it is not valid, I put the onclick function in
a temp variable and set it to '', so that it won't run.  Works pretty
slick.

/** = **/
/** Use to escape : and . in jsf id's **/
/** = **/
function jq(myid) {
return # + myid.replace(/:/g,\\:).replace(/\./g,\\.);
}
/** = **/
/** Use to escape : and . in jsf id's used in strings **/
/** = **/
function esc(myid) {
return myid.replace(/:/g,:).replace(/\./g,.);
}

var debug = true;


/** = **/
/** Run (jquery) when the document is loaded  **/
/** = **/
$(document).ready(function(){

if (debug) {
$(form).submit(
function() {
//alert(Submit Pressed);
}
);
}



// validate each form
$(form).each(function( intIndex ){
$(this).validate();
});



$(a).each(function( intIndex ){
var onclick = '';
if ($(this).attr(onclick) != undefined  $(this).attr
(onclick).toString().search(/\.submit\(\)/)  -1 ) {

$(this).mousedown(function(event){
var $target = $(event.target);
if ($target.hasClass(cancel) || 
$(this).parents('form').valid())
{
if (onclick != '') {
$target.attr('onclick',onclick);
}
} else {
if ($target.attr('onclick') != '') {
onclick = 
$target.attr('onclick');
$target.attr('onclick','');
}
}
});

}


if ($(this).attr(href) != undefined  $(this).attr
(href).toString().search(/\.submit\(\)/)  -1 ) {
var href = '#';
$(this).mousedown(function(event){
var $target = $(event.target);
if ($target.hasClass(cancel) || 
$(this).parents('form').valid())
{
if (href != '#') {
$target.attr('href',href);
}
} else {
if ($target.attr('href') != '#') {
href = $target.attr('href');
$target.attr('href','#');
}
}
});

}
});

}); // $(document).ready(function(){



On Mar 30, 2:23 pm, Jörn Zaefferer joern.zaeffe...@googlemail.com
wrote:
 The only approach I see is to find all those inline event handlers and
 replace them with something that goes through the jQuery event chain,
 including validation.

 Something like this:

 $(a[onclick]).each(function() {
   this.onclick = function() {};
   $(#form).submit();

 });

 Jörn

 On Mon, Mar 30, 2009 at 3:57 PM, Yeuker yeu...@gmail.com wrote:

  For those of you who frequent the jqueryhelp.com pages, forgive my
  question here as well.

  I am using the excellent jquery validation plugin found here:

 http://docs.jquery.com/Plugins/Validation

  It works incredibly well and am very happy with it (thanks).  My
  problem is that sometimes my forms are submitted via document.forms
  ['formid'].submit().  I have no control over this statement as it is
  generated for me by jsf when it is rendering the element, which in my
  case is an anchor.

  Because it is getting submitted via document.forms['formid'].submit(),
  the jquery validation plugin does not catch this submit, therefor does
  not validate, therefor submits the form when it shouldn't.  I've been
  stuck here for quite some time and could really use some help on how
  to get jquery to 

[jQuery] Re: $(document).ready and Firefox 3

2009-03-31 Thread chrsan

Hi!

If someone has an answer to this problem I would be very glad to get
some input.
I'm out of clues on how to solve this my self.

Thanks in advance,
Christer

On 24 Mar, 13:55, chrsan chr...@gmail.com wrote:
 Hi!

 We've just started to use jQuery in a project where we use it to load
 an external plugin based on what kind of browser the user is on. When
 loading the plugin we insert object-tags via JavaScript etc.
 Everything is working as expected regarding the loading and usage of
 the plugin except for one small thing. In Chrome, Safari and IE the
 page content is displayed before the plugin dialog is popped up (it's
 a plugin used to authenticate), but in Firefox the page content is
 displayed after the user has pressed submit or cancel in the plugin
 dialog.

 Maybe this has something to do with the behaviour regarding to when
 the DOM is ready or not. I've searched this mailing list and the
 internet and tried a couple of solutions. Putting the script-tag
 that loads our JavaScript at the bottom of the page, changed $
 (document).ready() to jQuery(function() {} etc. None of those
 solutions seem to work.

 Does anyone have a clue how to solve this? It would be much
 appreciated!

 Tanks,
 Christer


[jQuery] Increase / Decrease Font Size

2009-03-31 Thread Dan Vega

I am using the following code to allow the user to increase / decrease
the font size  of the document. I have tested it in many browsers and
in all of the following it comes back with a starting font size of
16px.

Firefox 3.0.8
Google Chrome 1.0.1
Safari Win 4 Public Beta

In IE 6/7 the font size is always coming back 1243px. Why is there
such a difference and is there anyway to get around this besides hard
coding the starting size?


script type=text/javascript language=javascript
$(document).ready(function(){

var originalFontSize = getFontSize();

$(.resetFont).click(function(){
setFontSize(originalFontSize);
$(#changeFont).fadeToggle(fast);
return false;
});

$(.increaseFont).click(function(){
var fontSize = getFontSize();
var newFontSize = fontSize + 1;
setFontSize(newFontSize);
return false;
});

$(.decreaseFont).click(function(){
var fontSize = getFontSize();
var newFontSize = fontSize - 1;
setFontSize(newFontSize);
return false;
});

});

function getFontSize() {
var currentSize = $(html).css(font-size);
var currentSizeNumber = parseFloat(currentSize, 12);
if(currentSizeNumber  20) {
currentSizeNumber = 20;
}
return currentSizeNumber;
}
function setFontSize(size) {
$(html).css(font-size, size);
}
/script


[jQuery] Are pigs flying? because IE8.1 + Firebug is coming

2009-03-31 Thread MorningZ

Friend of mine shot me this link this morning

http://www.smashingmagazine.com/2009/03/31/breaking-internet-explorer-81-eagle-eyes-leaked/

--
Eagle Eyes’s most exciting (and highly anticipated by developers)
feature is its wide support of Mozilla-based add-ons. Though IE 8.1
duly notes that not all plugins will work perfectly, we have tested
four popular Firefox plugins (Firebug, Web Developer, Tab Mix Plus,
and No-Script) and they worked flawlessly (some of the developers even
claim that – in terms of performance – they work much better under IE
8.1 versus Firefox 3).
--

I admittedly sometimes neglect worrying about IE8 because it's just
such a pain in the __ to test/debug... Firebug just makes it so bloody
easy to debug my jQuery calls and logic...

this would change everything  :-)


[jQuery] Re: draggable/droppable pick some

2009-03-31 Thread CTek

I'm starting to believe that there are no solution to my problem.
This seems to be the place where all the answers are, and no solution
(or even suggestion) for almost two weeks?

Too bad. The suggestion Richard made (and I had already implemented)
will have to be enough then.

/Stefan


On 19 Mar, 09:55, CTek stefan.bergfe...@ctek.se wrote:
 Hi Richard

 Thank you for your answer, but the example you showed was exactly what
 I've accomplished myself.
 What's missing is that I want the original box (draggable) to move
 into the droppable, and leave an empty spot among the draggables.
 I also want that draggable to return to its original location whenever
 another draggable is dropped in the same droppable.
 Coming with this is also that I don't want to let the user drop the
 same draggable in two droppables.

 /Stefan

 On 18 Mar, 16:20, Richard D. Worth rdwo...@gmail.com wrote:

  This should get you started:

 http://jsbin.com/ixeca

  - Richard

  On Wed, Mar 18, 2009 at 7:38 AM, CTek stefan.bergfe...@ctek.se wrote:

   I'm having a headache because I'm trying to make an on-line test.
   The graphics department wanted to make it all flash, but I said jQuery
   would do the trick, so please help me prove them wrong.

   I have a question, with six options, represented as six draggables.
   I expect three answers, represented as three droppables.

   The user is supposed to drag three draggables into the three
   droppables, and then click a button to check answers.

   What I want is for the draggable to be placed in the middle of the
   droppable when dropped.

   I also want the draggable to return to its original position when (if)
   another draggable is dropped in the same droppable. It'd also be nice
   if I could drop the draggable outside the droppables and have it
   returned to its original position.

   I also need to know which draggables are currently dropped, so I can
   check if the answer is correct. That's not a problem yet, but I'm
   afraid it will be.


[jQuery] Re: Are pigs flying? because IE8.1 + Firebug is coming

2009-03-31 Thread Martijn Houtman


You nearly fooled me there! :-)

On Mar 31, 2009, at 3:24 PM, MorningZ wrote:



Friend of mine shot me this link this morning

http://www.smashingmagazine.com/2009/03/31/breaking-internet- 
explorer-81-eagle-eyes-leaked/


--
Eagle Eyes’s most exciting (and highly anticipated by developers)
feature is its wide support of Mozilla-based add-ons. Though IE 8.1
duly notes that not all plugins will work perfectly, we have tested
four popular Firefox plugins (Firebug, Web Developer, Tab Mix Plus,
and No-Script) and they worked flawlessly (some of the developers even
claim that – in terms of performance – they work much better under IE
8.1 versus Firefox 3).
--

I admittedly sometimes neglect worrying about IE8 because it's just
such a pain in the __ to test/debug... Firebug just makes it so bloody
easy to debug my jQuery calls and logic...

this would change everything  :-)




[jQuery] Re: JQuery Cycle

2009-03-31 Thread gmca...@gmail.com

After rebooting everything works. Thanks :)

On Mar 30, 9:23 pm, Mike Alsup mal...@gmail.com wrote:
  Well even this doesnt work in IE...http://www.malsup.com/jquery/cycle/

  Which isn't my code obviously... only the
  first pic loads, it says in the status bar the other images are
  loading in IE
  so its not just my code. I haven't tried it on another machine yet
  either but
  what would cause that if it we're only happening on one machine ?

 That page works just fine for me.  Not sure what's causing your
 problem.  Reboot?


[jQuery] Re: Are pigs flying? because IE8.1 + Firebug is coming

2009-03-31 Thread brian

Isn't that tomorrow?

On Tue, Mar 31, 2009 at 9:33 AM, Martijn Houtman
martijn.hout...@gmail.com wrote:

 You nearly fooled me there! :-)

 On Mar 31, 2009, at 3:24 PM, MorningZ wrote:


 Friend of mine shot me this link this morning


 http://www.smashingmagazine.com/2009/03/31/breaking-internet-explorer-81-eagle-eyes-leaked/

 --
 Eagle Eyes’s most exciting (and highly anticipated by developers)
 feature is its wide support of Mozilla-based add-ons. Though IE 8.1
 duly notes that not all plugins will work perfectly, we have tested
 four popular Firefox plugins (Firebug, Web Developer, Tab Mix Plus,
 and No-Script) and they worked flawlessly (some of the developers even
 claim that – in terms of performance – they work much better under IE
 8.1 versus Firefox 3).
 --

 I admittedly sometimes neglect worrying about IE8 because it's just
 such a pain in the __ to test/debug... Firebug just makes it so bloody
 easy to debug my jQuery calls and logic...

 this would change everything  :-)




[jQuery] Re: Are pigs flying? because IE8.1 + Firebug is coming

2009-03-31 Thread MorningZ

You can chalk it up as:  wishful f-ing thinking, heh heh

it's weird looking back how getting in jQuery has changed absolutely
everything I code   IE8's dev panel is pretty close to Firebug
though


[jQuery] Re: Are pigs flying? because IE8.1 + Firebug is coming

2009-03-31 Thread Martijn Houtman


On Mar 31, 2009, at 3:47 PM, brian wrote:


Isn't that tomorrow?


Early preparements, I'd assume :-)

[jQuery] Re: Problem getting selected value from drop-down

2009-03-31 Thread Rob

One thing I see wrong there:

You are referencing dllViewSelector as an id in your jQuery, but you
only have that as a name in your html. either add the id attribute to
the select tag, or reference it as $(select[name='dllViewSelector']
option:selected) in your jQuery.

On Mar 31, 6:51 am, LinkGuru i...@legalanalytics.co.uk wrote:
 Hi, Can anyone help with the following? With JQuery, I can't
 successfully grab the selected value from a drop-down. The alert just
 shows an empty message. At least it is not showing undefined (as it
 was for my other attempts - you can see what these were from the
 commented out code), but I would expect it to display one of the
 values One-way, Reciprocal or Other. Perhaps I have to do some
 conversion on the result. Your contributions to this post will be
 greatly appreciated.

 In my HTML I have:

 select name=dllViewSelector
                             onchange=showSelectedView(this, allViews, 
 allSections,4,10)

             option id=oneway_4 value=one selected=selectedOne-
 way/option
             option id=recip_4 value=twoReciprocal/option
             option id=other_4 value=threeOther/option
                     /select
 .
 .
 .
 span id=Add_0 class=actionOptAdd input type=button
 name=btnOk_AddToProject_0 class=button-click-grey value=Add to
 Project //span
 .
 .
 .
 And in my JQuery I have 

                 $(.actionOptAdd).bind(click,
                         function()
                         {
                                 p_viewSelector=$(#dllViewSelector 
 option:selected).text();
                                 alert(p_viewSelector);
 // Also get blank message for:
 //                              p_viewSelector=$(#dllViewSelector 
 option:selected,this).text
 ();
 // (Also tried - getting undefined as a result)
 //                              
 p_viewSelector=$(#dllViewSelector).selectedIndex;
 //                              
 p_viewSelector=$(#dllViewSelector).attr(selectedIndex);


[jQuery] Re: Are pigs flying? because IE8.1 + Firebug is coming

2009-03-31 Thread Liam Byrne


Eagle Eyes (the name is fitting in this context) will let you view the 
server-side source code of a web page =-O


Considering that that source code would potentially include database 
passwords, etc, it had better be an April 1st spoof!



brian wrote:

Isn't that tomorrow?

On Tue, Mar 31, 2009 at 9:33 AM, Martijn Houtman
martijn.hout...@gmail.com wrote:
  

You nearly fooled me there! :-)

On Mar 31, 2009, at 3:24 PM, MorningZ wrote:



Friend of mine shot me this link this morning


http://www.smashingmagazine.com/2009/03/31/breaking-internet-explorer-81-eagle-eyes-leaked/

--
Eagle Eyes’s most exciting (and highly anticipated by developers)
feature is its wide support of Mozilla-based add-ons. Though IE 8.1
duly notes that not all plugins will work perfectly, we have tested
four popular Firefox plugins (Firebug, Web Developer, Tab Mix Plus,
and No-Script) and they worked flawlessly (some of the developers even
claim that – in terms of performance – they work much better under IE
8.1 versus Firefox 3).
--

I admittedly sometimes neglect worrying about IE8 because it's just
such a pain in the __ to test/debug... Firebug just makes it so bloody
easy to debug my jQuery calls and logic...

this would change everything  :-)
  





No virus found in this incoming message.
Checked by AVG - www.avg.com 
Version: 8.0.238 / Virus Database: 270.11.34/2032 - Release Date: 03/31/09 06:02:00


  




[jQuery] Re: Are pigs flying? because IE8.1 + Firebug is coming

2009-03-31 Thread Martijn Houtman


On Mar 31, 2009, at 4:00 PM, Liam Byrne wrote:

Eagle Eyes (the name is fitting in this context) will let you view  
the server-side source code of a web page =-O


Heh yeah, especially that gave the joke away ...

Considering that that source code would potentially include  
database passwords, etc, it had better be an April 1st spoof!


I've seen PHP-based websites where someone forgot to add the mod_php  
module and corresponding handlers to Apache, serving the PHP pages as  
plain text. They had the database passwords etc inside the PHP,  
making them readable to everyone. That's why one should always put  
private data _outside_ of the webroot :-)


Regards,
--
Martijn.

[jQuery] Re: captions and jcarousel

2009-03-31 Thread MorningZ

You can put anything you want inside the li items

and to get larger than 75x75, go into the CSS and change it  :-)



On Mar 31, 1:08 am, Jason jas...@satx.rr.com wrote:
 Forgive my ignorance first of all, but i have a horizontal
 carousel (not sure of the technical term) with images. Is it
 possible to include a caption(text) above and below each image?
 Secondly, is the size of each image only limited to 75x75? Many thanks

 jason


[jQuery] Re: Are pigs flying? because IE8.1 + Firebug is coming

2009-03-31 Thread Chucho

I just don't buy it. I have to seen with my eyes. Well, i'm not a
windows user :P so i don't know how long will it take to se it working
well.

i'm amazed actually how microsoft is now giving more and more field to
use other software, mainly open source, for their projects.

On Mar 31, 8:05 am, Martijn Houtman martijn.hout...@gmail.com wrote:
 On Mar 31, 2009, at 4:00 PM, Liam Byrne wrote:

  Eagle Eyes (the name is fitting in this context) will let you view  
  the server-side source code of a web page =-O

 Heh yeah, especially that gave the joke away ...

  Considering that that source code would potentially include  
  database passwords, etc, it had better be an April 1st spoof!

 I've seen PHP-based websites where someone forgot to add the mod_php  
 module and corresponding handlers to Apache, serving the PHP pages as  
 plain text. They had the database passwords etc inside the PHP,  
 making them readable to everyone. That's why one should always put  
 private data _outside_ of the webroot :-)

 Regards,
 --
 Martijn.


[jQuery] Re: Problem getting selected value from drop-down

2009-03-31 Thread LinkGuru

Thanks, but that does not seem to make any difference. Also, the name
must be enough because I've got HTML such as input type=hidden
name=txtProjectHomeLink_0 size=30 value=a dummy value
class=ProjectHomeLink_0 / with JQuery x=$
(input.ProjectHomeLink_0).val(); and it gets the value successfully.
It's just with the selector I'm having trouble. Note that it is not
coming back with undefined, so it is getting data - it's just that
it's a null string.

On Mar 31, 2:56 pm, Rob rbarthl...@gmail.com wrote:
 One thing I see wrong there:

 You are referencing dllViewSelector as an id in your jQuery, but you
 only have that as a name in your html. either add the id attribute to
 the select tag, or reference it as $(select[name='dllViewSelector']
 option:selected) in your jQuery.

 On Mar 31, 6:51 am, LinkGuru i...@legalanalytics.co.uk wrote:

  Hi, Can anyone help with the following? With JQuery, I can't
  successfully grab the selected value from a drop-down. The alert just
  shows an empty message. At least it is not showing undefined (as it
  was for my other attempts - you can see what these were from the
  commented out code), but I would expect it to display one of the
  values One-way, Reciprocal or Other. Perhaps I have to do some
  conversion on the result. Your contributions to this post will be
  greatly appreciated.

  In my HTML I have:

  select name=dllViewSelector
                              onchange=showSelectedView(this, allViews, 
  allSections,4,10)

              option id=oneway_4 value=one selected=selectedOne-
  way/option
              option id=recip_4 value=twoReciprocal/option
              option id=other_4 value=threeOther/option
                      /select
  .
  .
  .
  span id=Add_0 class=actionOptAdd input type=button
  name=btnOk_AddToProject_0 class=button-click-grey value=Add to
  Project //span
  .
  .
  .
  And in my JQuery I have 

                  $(.actionOptAdd).bind(click,
                          function()
                          {
                                  p_viewSelector=$(#dllViewSelector 
  option:selected).text();
                                  alert(p_viewSelector);
  // Also get blank message for:
  //                              p_viewSelector=$(#dllViewSelector 
  option:selected,this).text
  ();
  // (Also tried - getting undefined as a result)
  //                              
  p_viewSelector=$(#dllViewSelector).selectedIndex;
  //                              
  p_viewSelector=$(#dllViewSelector).attr(selectedIndex);


[jQuery] Re: text not right with fade

2009-03-31 Thread simon

Thanks James, I pressed submit before I could then write Only in
IE :-)

Si

On Mar 27, 8:52 pm, James james.gp@gmail.com wrote:
 I believe this only happens in Internet Explorer. Most of the time
 setting a CSS background-color to the element your text sits on will
 solve the issue.

 On Mar 27, 2:29 am,simonsi...@uvfx.tv wrote:



  I have noticed that when i fade my text in to 100% its not just right
  at all it looks pixelated any suggestions.

  I am using the following:

  ???.fadeIn('slow'); method

  many thanks Si- Hide quoted text -

 - Show quoted text -


[jQuery] Re: fastest way to create a million div's?

2009-03-31 Thread Ricardo

I don't know much about AS, but creating pixels as objects is likely
not the fastest approach. You should take advantage of vector drawing
tools and bitmaps. Take a look at this stuff:

http://www.flashvault.net/tutorial.asp?ID=52
http://www.bytearray.org/?p=67

Optimized DHTML drawing:
http://www.walterzorn.com/jsgraphics/jsgraphics_e.htm

SVG/VML is also an alternative, with something like raphaeljs.com

good luck!
- ricardo

On Mar 30, 2:50 am, Shedokan shedo...@yahoo.com wrote:
 thanks for all of your comments, I will try them all.

 As for canvas, I can't really use it because I want to support pixel
 editing and when resizing the canvas I'll need to re render it again
 and again.

 and as for flash, when I try to add that much pixels it gives me a
 warning about stopping the script.

 but I am looking at all possible ways.


[jQuery] jcarousel not working with latest jQuery

2009-03-31 Thread Tal

Hi All,

I've found a very odd thing. I tried to upgrade my jQuery to the
latest (v. 1.3.2) but then jcarousel is not working.

The left and right arrows don't show.

Anyone has any idea as to why would that be?

Regards,
Tal.


[jQuery] Re: Problem getting selected value from drop-down

2009-03-31 Thread Ricardo

The val() method returns the selected option for the element:

$('[name=dllViewSelector]').val()

'selectedIndex' is a property of the select node. When you call $
('#dllViewSelector') (ignoring the fact that this selector is wrong)
you get a jQuery object with a reference to the element, not the
element itself. You can access it like in an array:
$(#dllViewSelector)[0].selectedIndex;


On Mar 31, 7:51 am, LinkGuru i...@legalanalytics.co.uk wrote:
 Hi, Can anyone help with the following? With JQuery, I can't
 successfully grab the selected value from a drop-down. The alert just
 shows an empty message. At least it is not showing undefined (as it
 was for my other attempts - you can see what these were from the
 commented out code), but I would expect it to display one of the
 values One-way, Reciprocal or Other. Perhaps I have to do some
 conversion on the result. Your contributions to this post will be
 greatly appreciated.

 In my HTML I have:

 select name=dllViewSelector
                             onchange=showSelectedView(this, allViews, 
 allSections,4,10)

             option id=oneway_4 value=one selected=selectedOne-
 way/option
             option id=recip_4 value=twoReciprocal/option
             option id=other_4 value=threeOther/option
                     /select
 .
 .
 .
 span id=Add_0 class=actionOptAdd input type=button
 name=btnOk_AddToProject_0 class=button-click-grey value=Add to
 Project //span
 .
 .
 .
 And in my JQuery I have 

                 $(.actionOptAdd).bind(click,
                         function()
                         {
                                 p_viewSelector=$(#dllViewSelector 
 option:selected).text();
                                 alert(p_viewSelector);
 // Also get blank message for:
 //                              p_viewSelector=$(#dllViewSelector 
 option:selected,this).text
 ();
 // (Also tried - getting undefined as a result)
 //                              
 p_viewSelector=$(#dllViewSelector).selectedIndex;
 //                              
 p_viewSelector=$(#dllViewSelector).attr(selectedIndex);


[jQuery] Re: Display google.com in a Div

2009-03-31 Thread Ricardo

It's not possible to 'steal' some other page's content without an
iframe, only, as you discovered, using a local copy or proxy. This is
one of the uses iframes were made for, why do you want to avoid it?

On Mar 31, 9:23 am, emilien.hum...@gmail.com
emilien.hum...@gmail.com wrote:
 Hello Silver,

  I think you should read up on what an img tag 
  ishttp://www.w3.org/TR/REC-html40/struct/objects.html#h-13.2

 Thank you ... Just for info img  src=http://www.google.com/s2/
 favicons?domain=www.google.fr / allows me to display the favicon...
 I am not trying to link anything.

  And then to solve your problem, read up on the iframe 
  taghttp://www.w3.org/TR/html401/present/frames.html#h-16.5

 The idea was [if it s possible] to avoid using an Iframe. But maybe it
 is the only solution.

 I found a lot of way to replace an iFrame using div, but I was only
 able to display external pages stored on my server, but no external
 website, like yahoo or google ...

 Sorry if it was not clear

 Another Idea ?

 Regards
 Emilien

 On 31 mar, 13:39, sliver sliver2...@gmail.com wrote:

  I think you should read up on what an img tag 
  ishttp://www.w3.org/TR/REC-html40/struct/objects.html#h-13.2

  And then to solve your problem, read up on the iframe 
  taghttp://www.w3.org/TR/html401/present/frames.html#h-16.5

  Essentially, swap out the img tag with an iframe tag.

  On Mar 31, 5:15 am, emilien.hum...@gmail.com

  emilien.hum...@gmail.com wrote:
   Dear all,

   I am trying to create a sort of slidebar containing a list of links
   [google.fr/yahoo.fr/facebook.com;...;...;...]
   The idea is to display in a div the slidebar and in another div the
   website.

   The slidebar is ok, but I have not found the way to display the site
   into the second div.

   Someone has an idea ?

   !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=utf-8 /
   titleSliding Side Bar/title

   script type=text/javascript src=js/jquery-1.2.3.pack.js/script
   script type=text/javascript src=js/side-bar.js/script
   link type=text/css href=css/index.css rel=stylesheet /

   /head

   body

   div id=sideBar

           a href=# id=sideBarTabimg src=images/slide-button.png
   alt=sideBar title=sideBar //a

           div id=sideBarContents style=width:0px;
                   div id=sideBarContentsInner
                           h2Quick links/h2
                           ul
                                 lia href=http://www.google.fr; img
   src=http://www.google.com/s2/favicons?domain=www.google.fr; //a/
   li
                           /ul
                   /div
           /div

   /div

   div id=webPage
   phop/p
   /div


[jQuery] Re: $(document).ready and Firefox 3

2009-03-31 Thread Ricardo

Do you have a public page we can look at? It's hard to guess without
seeing a line of code.

cheers,
- ricardo

On Mar 31, 10:16 am, chrsan chr...@gmail.com wrote:
 Hi!

 If someone has an answer to this problem I would be very glad to get
 some input.
 I'm out of clues on how to solve this my self.

 Thanks in advance,
 Christer

 On 24 Mar, 13:55, chrsan chr...@gmail.com wrote:

  Hi!

  We've just started to use jQuery in a project where we use it to load
  an external plugin based on what kind of browser the user is on. When
  loading the plugin we insert object-tags via JavaScript etc.
  Everything is working as expected regarding the loading and usage of
  the plugin except for one small thing. In Chrome, Safari and IE the
  page content is displayed before the plugin dialog is popped up (it's
  a plugin used to authenticate), but in Firefox the page content is
  displayed after the user has pressed submit or cancel in the plugin
  dialog.

  Maybe this has something to do with the behaviour regarding to when
  the DOM is ready or not. I've searched this mailing list and the
  internet and tried a couple of solutions. Putting the script-tag
  that loads our JavaScript at the bottom of the page, changed $
  (document).ready() to jQuery(function() {} etc. None of those
  solutions seem to work.

  Does anyone have a clue how to solve this? It would be much
  appreciated!

  Tanks,
  Christer


[jQuery] Re: fastest way to create a million div's?

2009-03-31 Thread Michael Geary

Sorry to be the bearer of bad news, but you're really not going to be able
to get acceptable performance with a million pixel divs manipulated in
JavaScript.

-Mike

 From: Shedokan
 
 thanks for all of your comments, I will try them all.
 
 As for canvas, I can't really use it because I want to 
 support pixel editing and when resizing the canvas I'll need 
 to re render it again and again.
 
 and as for flash, when I try to add that much pixels it gives 
 me a warning about stopping the script.
 
 but I am looking at all possible ways.
 



[jQuery] superfish

2009-03-31 Thread mijen...@googlemail.com

Is my dropdown menus do not work correctly...  any ideas


[jQuery] Cool Flash-like Menu Effect

2009-03-31 Thread DesignerNotCoder

http://www.alexbuga.com/v8/

Notice the menu to the upper right and how it slides as it follows the
mouse across the icons. I have been searching for an open source for
this, but I'm not sure how to define it. Any ideas? Thx


[jQuery] jQuery Validation plugin and ASP.NET postbacks

2009-03-31 Thread johanders...@gmail.com

Hi,

Have anyone been able to use the jQuery validation script and been
able to make the buttonclick cause a post back?  The form validates
fine but the post is never made. If I add the option submitHandler on
the plugin it goes in there, but that does not really help as i dont
want to do a ajax submit. What i want is to make the postback continue
as normal if the validation is true.

Anyone else manged to work around this problem?

Regards,
Johan


[jQuery] Menu hides with IE7

2009-03-31 Thread JuanDBB

Hello!

I have a problem as the drop menu works great on Firefox but on IE7 it
hides under the content below. I would appreciate your help on this,
thanks a lot on advance


[jQuery] Bug in IE8 seting an attribute in a tag

2009-03-31 Thread Abzenga

When I set an attribute or a Data in the option  tag and try get it
back, it dosent work in IE8 but works in IE6, IE7 and Firefox 3.

Something like this:

select id=ID1
option value=sample 1 selectedSample 1/option
/select

javascript
//set
$(#ID1  option[selected]).attr(dados, new attr);
//or
$(#ID1  option[selected]).data(dados, new attr);

//get (dosent work in IE8 :(  )
var test1 = $(#ID1  option[selected]).attr(dados);
//or
var test1 = $(#ID1  option[selected]).data(dados);


/javascript


[jQuery] Re: Display google.com in a Div

2009-03-31 Thread sliver

Missed that bit on what it serves... but this simple code works:
http://jsbin.com/uguki

does your html validate?


On Mar 31, 8:23 am, emilien.hum...@gmail.com
emilien.hum...@gmail.com wrote:
 Hello Silver,

  I think you should read up on what an img tag 
  ishttp://www.w3.org/TR/REC-html40/struct/objects.html#h-13.2

 Thank you ... Just for info img  src=http://www.google.com/s2/
 favicons?domain=www.google.fr / allows me to display the favicon...
 I am not trying to link anything.

  And then to solve your problem, read up on the iframe 
  taghttp://www.w3.org/TR/html401/present/frames.html#h-16.5

 The idea was [if it s possible] to avoid using an Iframe. But maybe it
 is the only solution.

 I found a lot of way to replace an iFrame using div, but I was only
 able to display external pages stored on my server, but no external
 website, like yahoo or google ...

 Sorry if it was not clear

 Another Idea ?

 Regards
 Emilien

 On 31 mar, 13:39, sliver sliver2...@gmail.com wrote:

  I think you should read up on what an img tag 
  ishttp://www.w3.org/TR/REC-html40/struct/objects.html#h-13.2

  And then to solve your problem, read up on the iframe 
  taghttp://www.w3.org/TR/html401/present/frames.html#h-16.5

  Essentially, swap out the img tag with an iframe tag.

  On Mar 31, 5:15 am, emilien.hum...@gmail.com

  emilien.hum...@gmail.com wrote:
   Dear all,

   I am trying to create a sort of slidebar containing a list of links
   [google.fr/yahoo.fr/facebook.com;...;...;...]
   The idea is to display in a div the slidebar and in another div the
   website.

   The slidebar is ok, but I have not found the way to display the site
   into the second div.

   Someone has an idea ?

   !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=utf-8 /
   titleSliding Side Bar/title

   script type=text/javascript src=js/jquery-1.2.3.pack.js/script
   script type=text/javascript src=js/side-bar.js/script
   link type=text/css href=css/index.css rel=stylesheet /

   /head

   body

   div id=sideBar

           a href=# id=sideBarTabimg src=images/slide-button.png
   alt=sideBar title=sideBar //a

           div id=sideBarContents style=width:0px;
                   div id=sideBarContentsInner
                           h2Quick links/h2
                           ul
                                 lia href=http://www.google.fr; img
   src=http://www.google.com/s2/favicons?domain=www.google.fr; //a/
   li
                           /ul
                   /div
           /div

   /div

   div id=webPage
   phop/p
   /div


[jQuery] Re: passing variables to a Jquery function

2009-03-31 Thread Abdullah Rubiyath

Hi,

I believe you can use the following approach:

Since you are requesting to another page, you can use the server-side
script (PHP) to return the id, type, and success message in JSON
format and then use them from jQuery, and instead of $.get, you can
use $.getJSON or $.ajax, Using this approach would also allow you to
show an error message should any error occur in server side.

http://docs.jquery.com/Ajax/jQuery.getJSON
http://docs.jquery.com/Ajax/jQuery.ajax

Also,  just a thought, using class 'doit' instead of id would allow to
you assign it to multiple Tags/elements on the page.

[html]
a href=something.php?id=123type=456 class=doit title=Do itdo
it/a

a href=something.php?id=788type=457 class=doit title=Do itdo
it/a

[js]

$(.doit).click(function(){
   var $this = $(this);  // store this reference for future use
   $.getJSON(this.href, function(data) {
if( data.success == '1') {
//  successful from server-side
$this.replaceWith('I\'ve been there (a href=something.undo.php?
id='+data.id+'type='+data.type+'undo/a)');
 }  else {
// not successful, show error or do something else
 }
   });
return false;
});

[php /server-side script]

// process the request and then IF Successful, then echo in JSON
format,
header('Content-Type: text/plain');
echo '{ success : 1 , id : '.$_GET['id'].' , type: .$_GET
['type'].' }';
// or you can use json_encode (requires PHP 5.2)
exit;


// PHP - json_encode,
http://ca.php.net/json_encode


There are several other alternative approach... I hope it helps,


Thanks,
Abdullah.

On Mar 30, 10:44 am, Peter Van Dijck petervandi...@gmail.com wrote:
 Hi all,I couldn't find a good answer to this, although it has probably been
 answered before, apologies!

 I have a link
 a id=doit href=/bla/something.php?id=123type=456do it/a

 And some jQuery code

 $(#doit).click(function(){ // upon click
 $.get(this.href); // call the URL
 $('#doit').replaceWith(I've been there (a
 href=/bla/something.undo.php?id=123type=456'undo/a));
 return false;
  });

 My problem is that I want to populate the URL that's in replaceWith with
 the correct id, depending on the id that was in the original link. I've
 thought of using a fake attribute in the link somehow (a type=456
 id=doit), but I can't seem to get it to work, and I'm not sure this is the
 right approach...

 What would be the jquery-like best way to do this?

 Thanks!
 Peter

 --
 me:http://petervandijck.com
 blog:http://poorbuthappy.com/ease/
 global UX consulting:http://290s.com
 free travel guides:http://poorbuthappy.com
 Belgium: (+32) 03/325 88 70
 Skype id: peterkevandijck


[jQuery] Re: Cool Flash-like Menu Effect

2009-03-31 Thread Sam Sherlock
*not exaclty that but this could be a lead for you
**www.cssjuice.com/lavalamp-jquery-sliding-menu/

and Nathan Borror's playgroundblues.com has a menu vertical but simular to
the Aex Buga site
*
look at the animate functions

- S


2009/3/31 DesignerNotCoder thecoopersm...@gmail.com


 http://www.alexbuga.com/v8/

 Notice the menu to the upper right and how it slides as it follows the
 mouse across the icons. I have been searching for an open source for
 this, but I'm not sure how to define it. Any ideas? Thx



[jQuery] Timeout

2009-03-31 Thread Elledinho

Hi guys.

Can you tell me how to make a ajax-script witch is running in the
background?

I want a script witch reloads a .php-file every 10th second.

How can I do this? :-)


[jQuery] Re: Problem getting selected value from drop-down

2009-03-31 Thread LinkGuru

Apologies to Rob (I had only tried his 'add the id attribute to
the select tag' suggestion), I now find that if I write p_viewSelector=
$(select[name='dllViewSelector'] option:selected).text(); it works
fine. Thanks Rob (and also Ricardo).

On Mar 31, 3:53 pm, Ricardo ricardob...@gmail.com wrote:
 The val() method returns the selected option for the element:

 $('[name=dllViewSelector]').val()

 'selectedIndex' is a property of the select node. When you call $
 ('#dllViewSelector') (ignoring the fact that this selector is wrong)
 you get a jQuery object with a reference to the element, not the
 element itself. You can access it like in an array:
 $(#dllViewSelector)[0].selectedIndex;

 On Mar 31, 7:51 am, LinkGuru i...@legalanalytics.co.uk wrote:

  Hi, Can anyone help with the following? With JQuery, I can't
  successfully grab the selected value from a drop-down. The alert just
  shows an empty message. At least it is not showing undefined (as it
  was for my other attempts - you can see what these were from the
  commented out code), but I would expect it to display one of the
  values One-way, Reciprocal or Other. Perhaps I have to do some
  conversion on the result. Your contributions to this post will be
  greatly appreciated.

  In my HTML I have:

  select name=dllViewSelector
                              onchange=showSelectedView(this, allViews, 
  allSections,4,10)

              option id=oneway_4 value=one selected=selectedOne-
  way/option
              option id=recip_4 value=twoReciprocal/option
              option id=other_4 value=threeOther/option
                      /select
  .
  .
  .
  span id=Add_0 class=actionOptAdd input type=button
  name=btnOk_AddToProject_0 class=button-click-grey value=Add to
  Project //span
  .
  .
  .
  And in my JQuery I have 

                  $(.actionOptAdd).bind(click,
                          function()
                          {
                                  p_viewSelector=$(#dllViewSelector 
  option:selected).text();
                                  alert(p_viewSelector);
  // Also get blank message for:
  //                              p_viewSelector=$(#dllViewSelector 
  option:selected,this).text
  ();
  // (Also tried - getting undefined as a result)
  //                              
  p_viewSelector=$(#dllViewSelector).selectedIndex;
  //                              
  p_viewSelector=$(#dllViewSelector).attr(selectedIndex);


[jQuery] Re: ajax problem in IE

2009-03-31 Thread Ricardo

$('#myspan').text( $('#partnum').val() );
http://docs.jquery.com/Attributes

On Mar 29, 6:07 pm, webguy262 webguy...@yahoo.com wrote:
 I have two forms on a page (www.eastexhaust.com/inventory.php).

 One uses ajax to generate a part number by selecting values from a series of
 selection boxes.

 The other form emails the part number so we can reply with a quote.

 Everything works fine in FFox, but does not work in IE.

 Therefore, I have had to make things harder by asking the user to copy and
 paste their part number into the email form instead of having it entered
 there automatically.

 To display the part number to the user, I'm using this in the JS...

 document.getElementById('myspan').innerHTML = result;

 ...and this in the html...

 To get the variable in the email form, I'm using this in the JS...

 document.getElementById('partnum').value= result;

 ...and this in the html...

 input type=text name=partnum id=partnum readonly

 As I said, this works everywhere but not in IE.

 How can I use Jquery to make it work across the board?

 Thanks!
 --
 View this message in 
 context:http://www.nabble.com/ajax-problem-in-IE-tp22772776s27240p22772776.html
 Sent from the jQuery General Discussion mailing list archive at Nabble.com.


[jQuery] Re: Jquery - Weird Issue with Node cannot be inserted at the specified point...

2009-03-31 Thread Ricardo

You are trying to parse the response as JSON, but it looks like XML.
JSON is JavaScript Object Notation (http://www.json.org/js.html).

cheers,
- ricardo

On Mar 30, 4:08 pm, ckoeber ckoe...@gmail.com wrote:
 Hello,

 I am trying to create a JSON service and everything seems to work well until
 I am pulling the actual data from gthe service to be inserted into a DIV
 element on a page.

 Here is the code for the JSON service (client side):

                 nbsp;if (Drupal.jsEnabled) {

             nbsp;nbsp; nbsp;$(document).ready(

             nbsp;nbsp; nbsp;nbsp;nbsp; nbsp;nbsp;nbsp;
 nbsp;function(){

             nbsp;nbsp; nbsp;nbsp;nbsp; nbsp;nbsp;nbsp;
 nbsp;nbsp;nbsp;
 nbsp;$(quot;#portfolio_quotes_div_form_blockquot;).html('lt;form
 id=quot;frmPortfolioSymbolsBlockquot;
 name=quot;frmPortfolioAddSymbolBlockquot; method=quot;postquot;
 action=quot;quot;gt;lt;labelgt;Symbollt;input
 name=quot;txtSymbolquot; type=quot;textquot; id=quot;txtSymbolquot;
 size=quot;10quot; /gt;lt;/labelgt;lt;labelgt;lt;input
 type=quot;submitquot; name=quot;cmdAddquot; id=quot;cmdAddquot;
 value=quot;Addquot; /gt;lt;/labelgt;lt;labelgt;lt;input
 type=quot;submitquot; name=quot;cmdReloadSymbolsquot;
 id=quot;cmdReloadSymbolsquot; value=quot;Refreshquot;
 /gt;lt;/labelgt;lt;/formgt;');

             nbsp;nbsp; nbsp;nbsp;nbsp; nbsp;nbsp;nbsp;
 nbsp;nbsp;nbsp; nbsp;//Drupal.settings.portfolio_json_getquotes.uid

             nbsp;nbsp; nbsp;nbsp;nbsp; nbsp;nbsp;nbsp;
 nbsp;nbsp;nbsp; nbsp;nbsp;nbsp; nbsp;nbsp;nbsp;
 nbsp;$.post(Drupal.settings.portfolio_json_getquotes.ajaxUrl,{uid:Drupal.settings.portfolio_json_getquotes.uid},

             nbsp;nbsp; nbsp;nbsp;nbsp; nbsp;nbsp;nbsp;
 nbsp;nbsp;nbsp; nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;
 function (data) {

             nbsp;nbsp; nbsp;nbsp;nbsp; nbsp;nbsp;nbsp;
 nbsp;nbsp;nbsp;
 nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp; var
 result = Drupal.parseJson(data);

             nbsp;nbsp; nbsp;nbsp;nbsp; nbsp;nbsp;nbsp;
 nbsp;nbsp;nbsp;
 nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;
 $(quot;#portfolio_quotes_div_blockquot;).html(result);

             nbsp;nbsp; nbsp;nbsp;nbsp; nbsp;nbsp;nbsp;
 nbsp;nbsp;nbsp; nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;

 });

             nbsp;nbsp; nbsp;nbsp;nbsp; nbsp;nbsp;nbsp;
 nbsp;nbsp;nbsp;
 nbsp;$(quot;#cmdReloadSymbolsquot;).bind(quot;clickquot;, function() {

             nbsp;nbsp; nbsp;nbsp;nbsp; nbsp;nbsp;nbsp;
 nbsp;nbsp;nbsp; nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;
 $.post(Drupal.settings.portfolio_json_getquotes.ajaxUrl,{uid:Drupal.settings.portfolio_json_getquotes.uid},

             nbsp;nbsp; nbsp;nbsp;nbsp; nbsp;nbsp;nbsp;
 nbsp;nbsp;nbsp; nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;
 function (data) {

             nbsp;nbsp; nbsp;nbsp;nbsp; nbsp;nbsp;nbsp;
 nbsp;nbsp;nbsp; nbsp;nbsp;nbsp; nbsp;nbsp;nbsp; nbsp;nbsp; var
 result = Drupal.parseJson(data);

             nbsp;nbsp; nbsp;nbsp;nbsp; nbsp;nbsp;nbsp;
 nbsp;nbsp;nbsp; nbsp;nbsp;nbsp; nbsp;nbsp;nbsp; nbsp;nbsp;nbsp;
 $(quot;#portfolio_quotes_div_blockquot;).html(result);

             nbsp;nbsp; nbsp;nbsp;nbsp; nbsp;nbsp;nbsp;
 nbsp;nbsp;nbsp; nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;

 });

             nbsp;nbsp; nbsp;nbsp;nbsp; nbsp;nbsp;nbsp;
 nbsp;nbsp;nbsp; nbsp;nbsp;nbsp; nbsp;nbsp; return false;

             nbsp;nbsp; nbsp;nbsp;nbsp; nbsp;nbsp;nbsp;
 nbsp;nbsp;nbsp; nbsp;});

             nbsp;nbsp; nbsp;nbsp;nbsp; nbsp;nbsp;nbsp; nbsp;}

             nbsp;nbsp; nbsp;)

             }

 nbsp;And here is a sample of the data returned from the working service
 (the code below is formatted for js):

 quot;\x3ctable id=\quot;portfolio_quotes_table_block\quot;
 width=\quot;100%\quot; border=\quot;0\quot; cellspacing=\quot;0\quot;
 cellpadding
 =\quot;0\quot;\x3e\x3ctr\x3e\x3cth
 scope=\quot;col\quot;\x3eSymbol\x3c/th\x3e\x3cth
 scope=\quot;col\quot;\x3eLast\x3c/th\x3e
 \x3cth
 scope=\quot;col\quot;\x3eChange\x3c/th\x3e\x3c/tr\x3e\x3ctr\x3e\x3cth
 scope=\quot;row\quot;\x3eMSFT\x3c/th\x3e
 \x3ctd\x3e17.44\x3c/td\x3e\x3ctd\x3e-0.69\x3c/td\x3e\x3c/tr\x3e\x3ctr\x3e\x3cth
 scope=\quot;row\quot;\x3e\x3c
 /th\x3e\x3ctd\x3e\x3c/td\x3e\x3ctd\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3equot;

 nbsp;Essentially what I am looking for is a table that will be inserted
 inside a DIV element on the first loading of a page as well as when the
 refresh button on the form by the JS code above. The code runs but I get the
 following message:

                 uncaught exception: Node cannot be inserted at the specified
 point in the hierarchy (NS_ERROR_DOM_HIERARCHY_REQUEST_ERR)

 Any ideas?

 Thank you for your time.

 Regards,

 Christopher Koeber

 nbsp;

 --
 View this message in 
 context:http://www.nabble.com/Jquery---Weird-Issue-with-%22Node-cannot-be-ins...
 Sent from the jQuery General Discussion mailing list archive at Nabble.com.


[jQuery] Re: Cool Flash-like Menu Effect

2009-03-31 Thread Andy Matthews

The Lava Lamp plugin is the one you want:

http://www.gmarwaha.com/blog/2007/08/23/lavalamp-for-jquery-lovers/ 

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of DesignerNotCoder
Sent: Tuesday, March 31, 2009 8:36 AM
To: jQuery (English)
Subject: [jQuery] Cool Flash-like Menu Effect


http://www.alexbuga.com/v8/

Notice the menu to the upper right and how it slides as it follows the mouse
across the icons. I have been searching for an open source for this, but I'm
not sure how to define it. Any ideas? Thx




[jQuery] Wrap all center tags

2009-03-31 Thread tij_dev

Hello everybody,

I have a doc xml (which is not my window.document) which contains some
center tags and I would like to wrap all of them with a specific
div element.

I tried doing :

$(center,pDocument).wrapAll(div class='wrap'/div);

pDocment is my xml dom. but it says Non valid argument... :(

Please HELP !

Thanks a lot :)


[jQuery] Re: IE error with Jquery

2009-03-31 Thread om


i found that this happens when modifyin the dom of th HEAD tag.
this post might help
http://blog.dotsmart.net/2008/04/21/ie-6-bug-causes-jquery-globaleval-error/

ondra

On Mar 23, 2:16 pm, mjstenbe mikan.dsp...@gmail.com wrote:
 Im getting the following error with IE 6 and IE 8 beta and Jquery.

 Unexpected call to method or property access
 Line: 12, Char 2305
 Code: 0

 The problem seems to be this declaration:

 this.appendChild(E)}})},

 Im using the latest Jquery taken from the site today.

 Any help would be greatly appreciated,
 Mika


[jQuery] Re: can someone take a look please...

2009-03-31 Thread webguy262


Jack

I think I've got that, don't I?

From my post...

 input type=text name=partnum id=partnum readonly

Am I missing something?


Jack Killpatrick wrote:
 
 
 try adding id=partnum to the form field that has name=partnum.
 
 - Jack
 
 webguy262 wrote:


 webguy262 wrote:
   
 I have two forms on a page (www.eastexhaust.com/inventory.php).

 One uses ajax to generate a part number by selecting values from a
 series
 of selection boxes.

 The other form emails the part number so we can reply with a quote.

 Everything works fine in FFox, but does not work in IE.

 Therefore, I have had to make things harder by asking the user to copy
 and
 paste their part number into the email form instead of having it entered
 there automatically.

 To display the part number to the user, I'm using this in the JS...

 document.getElementById('myspan').innerHTML = result;

 ...and this in the html...



 To get the variable in the email form, I'm using this in the JS...

 document.getElementById('partnum').value= result;

 ...and this in the html...

 input type=text name=partnum id=partnum readonly

 As I said, this works everywhere but not in IE.

 How can I use Jquery to make it work across the board?

 Thanks! 

 

   
 
 
 

-- 
View this message in context: 
http://www.nabble.com/ajax-problem-in-IE-tp22772776s27240p22805217.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: Problem getting selected value from drop-down

2009-03-31 Thread Rob

I should have expounded more on the rest of it, but I had to run to a
meeting. My apologies. :(

On Mar 31, 11:21 am, LinkGuru i...@legalanalytics.co.uk wrote:
 Apologies to Rob (I had only tried his 'add the id attribute to
 the select tag' suggestion), I now find that if I write p_viewSelector=
 $(select[name='dllViewSelector'] option:selected).text(); it works
 fine. Thanks Rob (and also Ricardo).

 On Mar 31, 3:53 pm, Ricardo ricardob...@gmail.com wrote:

  The val() method returns the selected option for the element:

  $('[name=dllViewSelector]').val()

  'selectedIndex' is a property of the select node. When you call $
  ('#dllViewSelector') (ignoring the fact that this selector is wrong)
  you get a jQuery object with a reference to the element, not the
  element itself. You can access it like in an array:
  $(#dllViewSelector)[0].selectedIndex;

  On Mar 31, 7:51 am, LinkGuru i...@legalanalytics.co.uk wrote:

   Hi, Can anyone help with the following? With JQuery, I can't
   successfully grab the selected value from a drop-down. The alert just
   shows an empty message. At least it is not showing undefined (as it
   was for my other attempts - you can see what these were from the
   commented out code), but I would expect it to display one of the
   values One-way, Reciprocal or Other. Perhaps I have to do some
   conversion on the result. Your contributions to this post will be
   greatly appreciated.

   In my HTML I have:

   select name=dllViewSelector
                               onchange=showSelectedView(this, allViews, 
   allSections,4,10)

               option id=oneway_4 value=one selected=selectedOne-
   way/option
               option id=recip_4 value=twoReciprocal/option
               option id=other_4 value=threeOther/option
                       /select
   .
   .
   .
   span id=Add_0 class=actionOptAdd input type=button
   name=btnOk_AddToProject_0 class=button-click-grey value=Add to
   Project //span
   .
   .
   .
   And in my JQuery I have 

                   $(.actionOptAdd).bind(click,
                           function()
                           {
                                   p_viewSelector=$(#dllViewSelector 
   option:selected).text();
                                   alert(p_viewSelector);
   // Also get blank message for:
   //                              p_viewSelector=$(#dllViewSelector 
   option:selected,this).text
   ();
   // (Also tried - getting undefined as a result)
   //                              
   p_viewSelector=$(#dllViewSelector).selectedIndex;
   //                              
   p_viewSelector=$(#dllViewSelector).attr(selectedIndex);


[jQuery] Re: Work on one specific node and not on the window.document

2009-03-31 Thread riotbrrd

By way of explanation, this works because the jQuery selector function
has an optional context parameter: $(expression, [context]) . See the
docs here: http://docs.jquery.com/Core/jQuery#expressioncontext.

-Kim

On Mar 30, 11:18 pm, xPheRe xpher...@gmail.com wrote:
 To locate a node with id myId that is a descendant of another one,
 in a var called myNode, use:
 $('#myId', myNode)
 Hope it helps :)

 On 30 mar, 17:20, tij_dev tijmas...@googlemail.com wrote:



  Hi guys !

  I assume this is a really basic question but I'm a JQuery rookie :) so
  please be indulgent :)

  I would like to get an element by its id but just on a specific node.
  I only see on the web things like that : $(#myId). That is the
  equivalent of window.document.getElementById(myId). But for me that
  should be something like myNode.getElementById(myId).

  Is that clear?...

  Thanks in advance- Hide quoted text -

 - Show quoted text -


[jQuery] A general Javascript question: duplicate IDs in a document?

2009-03-31 Thread riotbrrd

I realize this is not jQuery specific, but I figured you guys might
have some good advice...

I often find myself wanting to assign the same ID to multiple elements
in a document -- typically when there are several versions of an
element which display at different times. Is there a good reason NOT
to do this? If so, what's a better practice?

thanks,
Kim


[jQuery] Re: A general Javascript question: duplicate IDs in a document?

2009-03-31 Thread Andy Matthews

It's against the W3c spec for the DOM. The whole point of an ID is that it's
unique on the page. Duplicate IDs lead to potential errors.

If you need to have more than one of a thing on a page, then use a class. 

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of riotbrrd
Sent: Tuesday, March 31, 2009 11:24 AM
To: jQuery (English)
Subject: [jQuery] A general Javascript question: duplicate IDs in a
document?


I realize this is not jQuery specific, but I figured you guys might have
some good advice...

I often find myself wanting to assign the same ID to multiple elements in a
document -- typically when there are several versions of an element which
display at different times. Is there a good reason NOT to do this? If so,
what's a better practice?

thanks,
Kim




[jQuery] Re: A general Javascript question: duplicate IDs in a document?

2009-03-31 Thread brian

An ID should be unique. That's why it's callled an ID (IDentifier).
Repeating an ID in a page will cause problems for any DOM work.

For your purposes, you might do something like:

div class=Foo id=foo_1/div
div class=Bar id=bar_1/div
div class=Foo id=foo_2/div
div class=Bar id=bar_2/div


On Tue, Mar 31, 2009 at 12:24 PM, riotbrrd k...@riotbrrd.com wrote:

 I realize this is not jQuery specific, but I figured you guys might
 have some good advice...

 I often find myself wanting to assign the same ID to multiple elements
 in a document -- typically when there are several versions of an
 element which display at different times. Is there a good reason NOT
 to do this? If so, what's a better practice?

 thanks,
 Kim


[jQuery] Re: Timeout

2009-03-31 Thread MorningZ

setTimeout(Run, 1);

function Run() {
 $.ajax(..)
}

On Mar 31, 11:18 am, Elledinho elledi...@gmail.com wrote:
 Hi guys.

 Can you tell me how to make a ajax-script witch is running in the
 background?

 I want a script witch reloads a .php-file every 10th second.

 How can I do this? :-)


[jQuery] Re: Timeout

2009-03-31 Thread MorningZ

Oops.. pressed enter too early

$(document).ready(function() {

setTimeout(Run, 1);

});

function Run() {
 $.ajax(
.
success: function() {
  setTimeout(Run, 1);
}

 );

}

On Mar 31, 12:39 pm, MorningZ morni...@gmail.com wrote:
 setTimeout(Run, 1);

 function Run() {
      $.ajax(..)

 }

 On Mar 31, 11:18 am, Elledinho elledi...@gmail.com wrote:

  Hi guys.

  Can you tell me how to make a ajax-script witch is running in the
  background?

  I want a script witch reloads a .php-file every 10th second.

  How can I do this? :-)


[jQuery] cycle plugin - background color in IE?

2009-03-31 Thread option8

the page in question:

http://www.tiftmerritt.com/index.php?page_id=393

it seems that the cycle plugin (i'm using v2.63) is adding a white
background to my slideshow DIVs in IE 6 and 7. i'm putting my
slideshow on top of an image background, so i'd like to keep my DIVs
transparent.

the only place i can think it's happening is in the clearTypeFix
function - which blows, since i'd really like to have my image caption
text look nice during the fade. i thought the cleartype issue was only
with IE6?

any suggestions for a fix?

--charles.



[jQuery] Re: Modifying CSS classes with jQuery (or '.live()' for '.css')

2009-03-31 Thread Lars Schöning

What I have is a number of divs, belonging to several categories.
These divs come and go. The color of a div should be determined by the
color defined for the category they belong to; category colors change
as well.

Say we're dealing with just a single category, colored red. One div
might be present:
div class=cat_1/

We use the command you used to set the color to red $('.cat_1').css
('color', '#ff');
With this method, when another div belonging to the same category is
added, the command will have to be called again. Or a div changes
category, which can happen, the command will have to be called again.

The problem is that the .css() function merely sets the style
attribute of every element matched. Instead would like to change the
stylesheet definition for '.cat_1', requiring only one call (when a
category color is set).

On Mar 30, 8:32 pm, James james.gp@gmail.com wrote:
 Documentation:http://docs.jquery.com/CSS

 $(#myElem).css('color', '#ff');

 It would probably be better if 'cat_[id]' is the element's ID rather
 than a CLASS, provided that it's unique in the whole document:
 div id=cat_12.../div

 Using that, you can easily update a whole set of 'cat_[id]' in one
 call (if that's what you want to do):
 $([id^=cat_]).css('color', '#ff');
 This will update every element with IDs that begin with 'cat_'.

 Theoretically you can do that with CLASS also, but when the CLASS
 attribute also allows definition of multipleclasses, such as:
 class=header cat_45
 in which case would require a bit more work to locate because it would
 not fall in the criteria of begins with cat_ anymore.

 On Mar 29, 4:23 am, Lars Schöning tahp...@gmail.com wrote:

  Hello,

  Apologies if this turns out to be a trivial question. I currently am
  working withjQueryon a set of elements assigned to colored
  categories via a 'cat_[id]' class. Categories can change colors and if
  they do I want to update the color of every elements belonging to it.
  I want the same to be true in all new events added.

  I would believe that the easiest solution to this problem would be
  changing the 'color' attribute directly in theCSSclass 'cat_[id]',
  but have found no way to do so. As I am fairly new tojQueryI might
  also be overseeing a much more elegant solution. Can anyone clarify?

  Thanks in advance,
  Lars


[jQuery] Re: cycle plugin - background color in IE?

2009-03-31 Thread option8

yeah. it's the cleartype fix.

i added
cleartype:  0, // disable cleartype corrections

to my cycle function, and the background went away.

meh.

--charles.


[jQuery] $.fadeTo() vs. MSIE6 through 8

2009-03-31 Thread Nekura Neko

So, despite how perfectly .fadeTo works with FF and how easy opacity:
0.40; is to write, it seems like MSIE is lost and confused.

In MSIE 8, with compatibility mode off, then .fadeTo process appears
to be roundly ignored (at least for jquery 1.3.1).

If you turn compatibility mode on, it behaves in the same manner as
MSIE 6 and 7, which is this:

Given an inline span with a background color, some margin (2/4/0/0),
some padding (1/8/1/8), and a word bounded by a border (1px), MSIE
will apparently add ~2px of padding to the top and bottom of the
element, and then correctly apply the fade.  Problem, of course, being
that the extra 4px of padding makes the item that is fading out stand
out from its smaller peer elements.

If I had to take a guess, I'd expect that the resizing problem is the
elem.zoom = 1; (line 1031 in v1.3.1) as that allows/forces MSIE to
think about things have been rendered and potentially re-render them.
But it's just a guess at the moment.  Anybody got a better theory as
to what's going on (and how to resolve it)?


[jQuery] table filtering

2009-03-31 Thread Bob O

I have a YUI datatable that im live filtering from a text field. The
problem im having is when i get a lot of records, its really slow..Ive
only been using jQuery for a few months now, so im a bit of a noob.
Any help refactoring this to make it run smoother would be great.

**HTML**
  **search field
  div class=search_member_wrap
label for=dt_inputSearch: /label
input id=dt_input type=text class=member_search_input
value=search members
  /div

i dont have the table HTML cause it could prove to be more confusing.
but basically im filtering by 2 different td values set by YUI of
Phone Number and Name.

**Script**
// This is the member data table search filter
$(document).ready(function () {
  var searchbox = $('.member_search_input');
  var member_row = $('#members_data_table_wrap table tbody tr');
  searchbox.click(function() {
$(this).val('');
  });
   searchbox.bind('change keyup', function() {
  member_row.each(function() {
var number = $(this).find('.yui-dt0-col-PhoneNumber div').text
();
var name = $(this).find('.yui-dt0-col-Name div').text();
var search_check_value = (name + number);
var search_value = searchbox.val();
 if (search_check_value.indexOf(search_value)  -1) {
   $(this).show();
  } else {
  $(this).hide();
}
  });
});
});


[jQuery] JQuery variable usage with single/double quote problem

2009-03-31 Thread LinkGuru

Can anyone help on this one? .

The following statement is proven to work:

p_viewSelector=$(select[name='dllViewSelector_Search_0']
option:selected).text();

But now I need to adapt it so the Search_0 component is replaced by a
variable (because it isn't always going to be Search_0 at that point.
So I've got

curSelector=ddlViewSelector+idCurrent;
p_viewSelector=$(select[name='+curSelector+']
option:selected).text();// single quote just before the 1st + and
just after the 2nd +
//idCurrent might be Search_0, but
could be Search_any integer

(and also tried lots of other combinations e.g.

curSelector='ddlViewSelector'+idCurrent;// 
dbl quote sing
quote sing quote dble quote
p_viewSelector=$(select[name=+curSelector+]
option:selected).text();
)

So, if anyone is expert with jquery variables, quotes, string
contenation etc. who can solve this one, it would be greatly
appreciated!


[jQuery] Re: [validate] Using remote w/ data and ASMX doesn't seem to process the response

2009-03-31 Thread pbindagorge

Thank you very much for your response! I've gotten it working with
your help. I added the following and it works just fine:

dataFilter: function(dataXML) {
 return $(dataXML, 'boolean').text();
}

On Mar 31, 12:55 am, Jörn Zaefferer joern.zaeffe...@googlemail.com
wrote:
 The plugin expects a JSON true/false response, which you don't
 provide. You could set the dataFilter-ajax-option 
 (seehttp://docs.jquery.com/Ajax/jQuery.ajax#options) to postprocess the
 response.

 remote: {
   url: webservice...,
   dataFilter: function(data) {
      return process(data);
   }

 }

 Jörn

 On Tue, Mar 31, 2009 at 7:05 AM, pbarnes pmbar...@gmail.com wrote:

  I'm trying to integrate the Validation plug-in with an ASP.NET site
  using ASMX services. The service is very simple: it takes in two
  strings and returns a boolean. I can see valid XML response in
  Firebug, but the plugin doesn't seem to process it properly. Both true
  and false return values result in no form submission and no error
  message (and any previous error messages, e.g., You must enter at
  least 10 numbers) are not cleared.

  Here's my validation code:

         $('#aspnetForm').validate({
                 rules: {
                         phoneNumber: {
                                 required: true,
                                 minlength: 5,
                                 remote: {
                                         url: 
  'CorpSiteService.asmx/ValidatePhoneNumber',
                                         data: {
                                                 countryId: function() {
                                                         return 
  $('#ctl00_ContentPlaceHolderBody_uxCountryDropDown').val
  ();
                                                 }
                                         }
                                 }
                         }
                 },
                 messages: {
                         phoneNumber: {
                                 required: A mobile number is required.,
                                 minlength: $.format(Enter at least {0} 
  characters),
                                 remote: Invalid phone number for this 
  carrier.
                         }
                 }
         });

  The response from the ASMX service is:

  ?xml version=1.0 encoding=utf-8?
  boolean xmlns=http://svc.picdial.com/WebServices/;true/boolean

  The end result is the same whether the Web service returns true or
  false.


[jQuery] Re: JQuery Cycle

2009-03-31 Thread gmca...@gmail.com

Actually i tried to run it in IE again a few minutes ago and its doing
the same thing. on the code i wrote and the original site. IT just
sits there and tries to load the pictures. I can see the animation
happening but its just empty pics... ? any other ideas ???

On Mar 31, 8:37 am, gmca...@gmail.com gmca...@gmail.com wrote:
 After rebooting everything works. Thanks :)

 On Mar 30, 9:23 pm, Mike Alsup mal...@gmail.com wrote:

   Well even this doesnt work in IE...http://www.malsup.com/jquery/cycle/

   Which isn't my code obviously... only the
   first pic loads, it says in the status bar the other images are
   loading in IE
   so its not just my code. I haven't tried it on another machine yet
   either but
   what would cause that if it we're only happening on one machine ?

  That page works just fine for me.  Not sure what's causing your
  problem.  Reboot?


[jQuery] Re: JQuery Cycle

2009-03-31 Thread gmca...@gmail.com

After looking at it the viewer in IE7 only seems to work with jpg.
When i try to use gif or png it just clocks trying to load the
images. In firefox it works fine tho...

On Mar 31, 8:37 am, gmca...@gmail.com gmca...@gmail.com wrote:
 After rebooting everything works. Thanks :)

 On Mar 30, 9:23 pm, Mike Alsup mal...@gmail.com wrote:

   Well even this doesnt work in IE...http://www.malsup.com/jquery/cycle/

   Which isn't my code obviously... only the
   first pic loads, it says in the status bar the other images are
   loading in IE
   so its not just my code. I haven't tried it on another machine yet
   either but
   what would cause that if it we're only happening on one machine ?

  That page works just fine for me.  Not sure what's causing your
  problem.  Reboot?


[jQuery] Re: JQuery variable usage with single/double quote problem

2009-03-31 Thread James

Is it your missing underscore in:
curSelector=ddlViewSelector+idCurrent;
?

But essentially what you're doing looks right.

var idCurrent = 'Search_0';
var p_viewSelector = $(select[name='dllViewSelector_+idCurrent+']
option:selected).text();


On Mar 31, 7:47 am, LinkGuru i...@legalanalytics.co.uk wrote:
 Can anyone help on this one? .

 The following statement is proven to work:

 p_viewSelector=$(select[name='dllViewSelector_Search_0']
 option:selected).text();

 But now I need to adapt it so the Search_0 component is replaced by a
 variable (because it isn't always going to be Search_0 at that point.
 So I've got

                                 curSelector=ddlViewSelector+idCurrent;
                                 
 p_viewSelector=$(select[name='+curSelector+']
 option:selected).text();// single quote just before the 1st + and
 just after the 2nd +
                                 //idCurrent might be Search_0, but
 could be Search_any integer

 (and also tried lots of other combinations e.g.

                                 curSelector='ddlViewSelector'+idCurrent;// 
 dbl quote sing
 quote sing quote dble quote
                                 p_viewSelector=$(select[name=+curSelector+]
 option:selected).text();
 )

 So, if anyone is expert with jquery variables, quotes, string
 contenation etc. who can solve this one, it would be greatly
 appreciated!


[jQuery] Re: Timeout

2009-03-31 Thread James

Just a little fix. Use setInterval() instead of setTimeout().
setTimeout() only executes once.
I get that mixed up sometimes too. :p

On Mar 31, 6:41 am, MorningZ morni...@gmail.com wrote:
 Oops.. pressed enter too early

 $(document).ready(function() {

     setTimeout(Run, 1);

 });

 function Run() {
      $.ajax(
         .
         success: function() {
               setTimeout(Run, 1);
         }

      );

 }

 On Mar 31, 12:39 pm, MorningZ morni...@gmail.com wrote:

  setTimeout(Run, 1);

  function Run() {
       $.ajax(..)

  }

  On Mar 31, 11:18 am, Elledinho elledi...@gmail.com wrote:

   Hi guys.

   Can you tell me how to make a ajax-script witch is running in the
   background?

   I want a script witch reloads a .php-file every 10th second.

   How can I do this? :-)




[jQuery] Re: JQuery Cycle

2009-03-31 Thread gmca...@gmail.com

I did notice that in IE7 it doesnt like png type images any reason
for that ?

On Mar 31, 8:37 am, gmca...@gmail.com gmca...@gmail.com wrote:
 After rebooting everything works. Thanks :)

 On Mar 30, 9:23 pm, Mike Alsup mal...@gmail.com wrote:

   Well even this doesnt work in IE...http://www.malsup.com/jquery/cycle/

   Which isn't my code obviously... only the
   first pic loads, it says in the status bar the other images are
   loading in IE
   so its not just my code. I haven't tried it on another machine yet
   either but
   what would cause that if it we're only happening on one machine ?

  That page works just fine for me.  Not sure what's causing your
  problem.  Reboot?


[jQuery] Re: Using remote w/ data and ASMX doesn't seem to process the response

2009-03-31 Thread pbindagorge

Turns out there's an issue with the IE7 returning an empty string when
text() is invoked. So I decided to convert to JSON using
jqXMLUtils_beta3.js at  http://www.terracoder.com/download.html, and
now it works cross-browser. The final code is:

dataFilter: function(dataXML) {
 return $.xmlToJSON(dataXML).Text;
}

On Mar 31, 11:19 am, pbindagorge pmbar...@gmail.com wrote:
 Thank you very much for your response! I've gotten it working with
 your help. I added the following and it works just fine:

 dataFilter: function(dataXML) {
      return $(dataXML, 'boolean').text();

 }

 On Mar 31, 12:55 am, Jörn Zaefferer joern.zaeffe...@googlemail.com
 wrote:

  The plugin expects a JSON true/false response, which you don't
  provide. You could set the dataFilter-ajax-option 
  (seehttp://docs.jquery.com/Ajax/jQuery.ajax#options) to postprocess the
  response.

  remote: {
    url: webservice...,
    dataFilter: function(data) {
       return process(data);
    }

  }

  Jörn

  On Tue, Mar 31, 2009 at 7:05 AM, pbarnes pmbar...@gmail.com wrote:

   I'm trying to integrate the Validation plug-in with an ASP.NET site
   using ASMX services. The service is very simple: it takes in two
   strings and returns a boolean. I can see valid XML response in
   Firebug, but the plugin doesn't seem to process it properly. Both true
   and false return values result in no form submission and no error
   message (and any previous error messages, e.g., You must enter at
   least 10 numbers) are not cleared.

   Here's my validation code:

          $('#aspnetForm').validate({
                  rules: {
                          phoneNumber: {
                                  required: true,
                                  minlength: 5,
                                  remote: {
                                          url: 
   'CorpSiteService.asmx/ValidatePhoneNumber',
                                          data: {
                                                  countryId: function() {
                                                          return 
   $('#ctl00_ContentPlaceHolderBody_uxCountryDropDown').val
   ();
                                                  }
                                          }
                                  }
                          }
                  },
                  messages: {
                          phoneNumber: {
                                  required: A mobile number is required.,
                                  minlength: $.format(Enter at least {0} 
   characters),
                                  remote: Invalid phone number for this 
   carrier.
                          }
                  }
          });

   The response from the ASMX service is:

   ?xml version=1.0 encoding=utf-8?
   boolean xmlns=http://svc.picdial.com/WebServices/;true/boolean

   The end result is the same whether the Web service returns true or
   false.


[jQuery] Jquery Media Plugs (Malsup): How to tell when video is completed

2009-03-31 Thread Blaine

Hey I'm trying to use the Malsup plugin and determine when the video
is completed playing so that I can hide it or use the space for
something else.

Anyone know how to determine if the video is complete?



[jQuery] Re: A general Javascript question: duplicate IDs in a document?

2009-03-31 Thread Eric Garside

A best practice I've adopted is to utilize classes and ref/rel
attributes on dom elements for situations like you're describing.

div class=event-phase rel=1/div
div class=event-phase rel=2/div
div class=event-phase rel=3/div
div class=event-phase rel=4/div
div class=event-phase rel=5/div

Instead of

div id=event-phase-1/div
div id=event-phase-2/div
div id=event-phase-3/div
div id=event-phase-4/div
div id=event-phase-5/div

On Mar 31, 12:31 pm, brian bally.z...@gmail.com wrote:
 An ID should be unique. That's why it's callled an ID (IDentifier).
 Repeating an ID in a page will cause problems for any DOM work.

 For your purposes, you might do something like:

 div class=Foo id=foo_1/div
 div class=Bar id=bar_1/div
 div class=Foo id=foo_2/div
 div class=Bar id=bar_2/div

 On Tue, Mar 31, 2009 at 12:24 PM, riotbrrd k...@riotbrrd.com wrote:

  I realize this is not jQuery specific, but I figured you guys might
  have some good advice...

  I often find myself wanting to assign the same ID to multiple elements
  in a document -- typically when there are several versions of an
  element which display at different times. Is there a good reason NOT
  to do this? If so, what's a better practice?

  thanks,
  Kim


[jQuery] Re: $.fadeTo() vs. MSIE6 through 8

2009-03-31 Thread Nekura Neko

MSIE8 ignoring the .fadeTo directive is apparently tied to using !
DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd which puts MSIE
into standards mode, whereby it doesn't have the actual standard of
opacity but doesn't admit to having filter: alpha(opacity) either.

List of doctypes that put MSIE 8 into standards mode is over at
http://msdn.microsoft.com/en-us/library/ms535242(VS.85).aspx and
testing between

!DOCTYPE html PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
(standards off) and
!DOCTYPE html PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
http://www.w3.org/TR/html4/loose.dtd; (standards on)

would seem to confirm that MSIE 8 believes that disabling features
improves standards compliance.

I don't have any additional information on where the vertical shift is
coming from when MSIE does admit to having opacity capabilities.


[jQuery] Re: A general Javascript question: duplicate IDs in a document?

2009-03-31 Thread Andy Matthews

One problem with that approach is that you're polluting the DOM with invalid
markup.  Rel is not a valid attribute of the div tag.


andy

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Eric Garside
Sent: Tuesday, March 31, 2009 1:57 PM
To: jQuery (English)
Subject: [jQuery] Re: A general Javascript question: duplicate IDs in a
document?


A best practice I've adopted is to utilize classes and ref/rel attributes on
dom elements for situations like you're describing.

div class=event-phase rel=1/div
div class=event-phase rel=2/div
div class=event-phase rel=3/div
div class=event-phase rel=4/div
div class=event-phase rel=5/div

Instead of

div id=event-phase-1/div
div id=event-phase-2/div
div id=event-phase-3/div
div id=event-phase-4/div
div id=event-phase-5/div

On Mar 31, 12:31 pm, brian bally.z...@gmail.com wrote:
 An ID should be unique. That's why it's callled an ID (IDentifier).
 Repeating an ID in a page will cause problems for any DOM work.

 For your purposes, you might do something like:

 div class=Foo id=foo_1/div
 div class=Bar id=bar_1/div
 div class=Foo id=foo_2/div
 div class=Bar id=bar_2/div

 On Tue, Mar 31, 2009 at 12:24 PM, riotbrrd k...@riotbrrd.com wrote:

  I realize this is not jQuery specific, but I figured you guys might 
  have some good advice...

  I often find myself wanting to assign the same ID to multiple 
  elements in a document -- typically when there are several versions 
  of an element which display at different times. Is there a good 
  reason NOT to do this? If so, what's a better practice?

  thanks,
  Kim




[jQuery] Re: JQuery variable usage with single/double quote problem

2009-03-31 Thread Michael Geary

 jquery variables, quotes, string contenation etc.

jQuery doesn't *have* variables, quotes, or string concatenation.

Those are part of JavaScript, not jQuery.

I'm not being nitpicky. If you keep this fact in mind it will make it much
easier to troubleshoot.

You could spend days throwing thing at jQuery and seeing if they work or
not, without ever stumbling upon the real problem.

Instead, since you have one known good string, take advantage of the fact
that you're simply trying to create another string identical to that one:

  var good = select[name='dllViewSelector_Search_0'] option:selected;
  var test = ... your test concatenation here ...;
  alert(
  '{' + good + '}\n' +
  '{' + test + '}\n' +
  ( good === test )
  );

Now you should get an alert box with two strings, one above the other, and
true or false at the bottom. I put curly braces around both strings in the
alert box to make sure any leading or trailing whitespace is visible.
(jQuery would ignore those anyway, but it's a good habit if you're doing
something like this.)

This should make it much more visible where your string concatenation is
going wrong. If you get two identical strings in the alert box with a true
at the bottom, then you can be sure that your code will work with jQuery as
well.

-Mike

 From: LinkGuru
 
 The following statement is proven to work:
 
 p_viewSelector=$(select[name='dllViewSelector_Search_0']
option:selected).text();
 
 But now I need to adapt it so the Search_0 component is replaced by a
 variable (because it isn't always going to be Search_0 at that point.
 So I've got
 
   curSelector=ddlViewSelector+idCurrent;
   
 p_viewSelector=$(select[name='+curSelector+']
option:selected).text();// single quote just before the 1st + and
 just after the 2nd +
 //idCurrent might be Search_0, but
 could be Search_any integer
 
 (and also tried lots of other combinations e.g.
 
   
 curSelector='ddlViewSelector'+idCurrent;// dbl quote sing
 quote sing quote dble quote
   
 p_viewSelector=$(select[name=+curSelector+]
 option:selected).text();
 )
 
 So, if anyone is expert with jquery variables, quotes, string
 contenation etc. who can solve this one, it would be greatly
 appreciated!
 



[jQuery] Re: A general Javascript question: duplicate IDs in a document?

2009-03-31 Thread Eric Garside

It is indeed an invalid tag, but given the list of valid div tags is,
iirc, class,id,title, there isn't a lot of wiggle-room there. Non-
functional attribute declarations on a div usually provide an easier
and faster method of dynamic event access than traversing full-
declaration classes or generic identifiers, near as I've been able to
tell.

Is there any major problems you're aware of with this kind of dom
pollution that have a negative impact on ease or performance?

On Mar 31, 3:05 pm, Andy Matthews li...@commadelimited.com wrote:
 One problem with that approach is that you're polluting the DOM with invalid
 markup.  Rel is not a valid attribute of the div tag.

 andy

 -Original Message-
 From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On

 Behalf Of Eric Garside
 Sent: Tuesday, March 31, 2009 1:57 PM
 To: jQuery (English)
 Subject: [jQuery] Re: A general Javascript question: duplicate IDs in a
 document?

 A best practice I've adopted is to utilize classes and ref/rel attributes on
 dom elements for situations like you're describing.

 div class=event-phase rel=1/div
 div class=event-phase rel=2/div
 div class=event-phase rel=3/div
 div class=event-phase rel=4/div
 div class=event-phase rel=5/div

 Instead of

 div id=event-phase-1/div
 div id=event-phase-2/div
 div id=event-phase-3/div
 div id=event-phase-4/div
 div id=event-phase-5/div

 On Mar 31, 12:31 pm, brian bally.z...@gmail.com wrote:
  An ID should be unique. That's why it's callled an ID (IDentifier).
  Repeating an ID in a page will cause problems for any DOM work.

  For your purposes, you might do something like:

  div class=Foo id=foo_1/div
  div class=Bar id=bar_1/div
  div class=Foo id=foo_2/div
  div class=Bar id=bar_2/div

  On Tue, Mar 31, 2009 at 12:24 PM, riotbrrd k...@riotbrrd.com wrote:

   I realize this is not jQuery specific, but I figured you guys might
   have some good advice...

   I often find myself wanting to assign the same ID to multiple
   elements in a document -- typically when there are several versions
   of an element which display at different times. Is there a good
   reason NOT to do this? If so, what's a better practice?

   thanks,
   Kim


[jQuery] Re: table filtering

2009-03-31 Thread Matt Kruse

On Mar 31, 12:36 pm, Bob O sngndn...@gmail.com wrote:
 I have a YUI datatable that im live filtering from a text field. The
 problem im having is when i get a lot of records, its really slow..

When you are trying to enhance performance, the best way to accomplish
it is to start moving away from the generalized jQuery way of doing
things are start coding POJS (plain old javascript) that manipulates
objects at the lowest possible level.

 Any help refactoring this to make it run smoother would be great.

I'll give you a few tips, but depending on your specific situation it
may not be enough to actually improve performance enough to matter.

 $(document).ready(function () {
    searchbox.bind('change keyup', function() {
       member_row.each(function() {
         var number = $(this).find('.yui-dt0-col-PhoneNumber div').text();
         var name = $(this).find('.yui-dt0-col-Name div').text();

Avoid repeated calls to $() on the same object. Create a variable
reference instead.
If the phone number field has a match, there is no need to check the
name, so you can potentially avoid that lookup.

         var search_check_value = (name + number);
         var search_value = searchbox.val();

No need to do this with every loop iteration. Doing it once at the top
would be enough.

          if (search_check_value.indexOf(search_value)  -1) {
            $(this).show();
           } else {
           $(this).hide();

Again, use a cached reference to $(this). Using show() and hide() will
be slower than working at a lower level.

I haven't tested this, and I don't normally use contains() so I hope
I got the syntax right, but take a look:

searchbox.bind('change keyup', function() {
  var search_value = searchbox.val();
  member_row.each(function() {
var $tr = $(this);
if ($tr.find('.yui-dt0-col-PhoneNumber div').contains
(search_value).length0 ||
$tr.find('.yui-dt0-col-Name div').contains
(search_value).length0) {
  $tr[0].style.display='none';
else {
  $tr[0].style.display='';
}
  });
});

Personally, I would also avoid using each(), and avoid the find()
calls by using native DOM methods if this doesn't offer any speed-up.

Matt Kruse


[jQuery] Re: simplemodal help - dynamic load of modal content breaks close button

2009-03-31 Thread dbonneville

Ha! I got that to work! BUT...it does not work correctly for IE6. It
loads snappy in all modern browsers and works, but it take up to 15
seconds for IE to unfreeze. Why? We have a strange corporate version
of IE6 that is slower than mud and all caching is turned off. The HTML
i'm loading is 50 records with a 4 graphics each, so it stacks up 200
calls to the server. You can see the calls in the footer. The graphics
are all the same too. But this only seems to be an issue with get.
The close button binds just fine, but since IE6 is a corporate
standard still where I work, I can't use this method.

The second example above loads perfectly snappy in IE6 because it's
using load. I thought load was really just a masked get, but for
whatever reason, it works perfect. BUT the button is not bound
correctly in that version. Here is the code again:

$(#button-sales).click(function(event) {


$(#modalContentInstSales).load(includes/institutional-
sales.html);

$('#modalContentInstSales').modal({
onClose: modalClose,
onOpen: modalOpen,
containerCss: {
height: 420,
width: 342
},
onShow: function (dialog){
$(#modalContentInstSales 
.simplemodal-close).click(function (e)
{
$.modal.close();
});
}
});
});

I'm trying a few ways to get at the div with the simplemodal-close
class on it, but no luck yet. Any clues? So close...

Doug



On Mar 30, 11:15 pm, Eric Martin emarti...@gmail.com wrote:
 Doug,

 In your first example, the data is not in the DOM yet. Try something
 like:

 $(#button-sales).click(function(e) {
         e.preventDefault();
         $.get(includes/institutional-sales.html, function(data){
                 // create a modal dialog with the data
                 $('div' + data + '/div').modal({
                         onClose: modalClose,
                         onOpen: modalOpen,
                         containerCss: {
                                 height: 420,
                                 width: 342
                         }
                 }); // contains a button with simplemodal-close class
         });

 });

 If that doesn't work, let me know ;)

 -Eric

 On Mar 30, 1:07 pm, dbonneville doug.bonnevi...@gmail.com wrote:

  I have this example too. I have the data loaded, and onShow will
  trigger an alert if I put one in, but the close button still does not
  work:

  $(#button-sales).click(function(event) {

                          
  $(#modalContentInstSales).load(includes/institutional-
  sales.html);

                          $('#modalContentInstSales').modal({
                                  onClose: modalClose,
                                  onOpen: modalOpen,
                                  containerCss: {
                                          height: 420,
                                          width: 342
                                  },
                                  onShow: function (dialog){
                                          $(.simplemodal-close, 
  dialog.data).click(function (e) {
                                                  e.preventDefault();
                                                  $.modal.close();
                                          });
                                  }
                          });
                  });


[jQuery] Re: Timeout

2009-03-31 Thread Ricardo

In his code the timeout is called again in the callback. For this
application it really doesn't matter which one you use.

setInterval(function(){
$.ajax({...});
}, 1);

On Mar 31, 3:44 pm, James james.gp@gmail.com wrote:
 Just a little fix. Use setInterval() instead of setTimeout().
 setTimeout() only executes once.
 I get that mixed up sometimes too. :p

 On Mar 31, 6:41 am, MorningZ morni...@gmail.com wrote:

  Oops.. pressed enter too early

  $(document).ready(function() {

      setTimeout(Run, 1);

  });

  function Run() {
       $.ajax(
          .
          success: function() {
                setTimeout(Run, 1);
          }

       );

  }

  On Mar 31, 12:39 pm, MorningZ morni...@gmail.com wrote:

   setTimeout(Run, 1);

   function Run() {
        $.ajax(..)

   }

   On Mar 31, 11:18 am, Elledinho elledi...@gmail.com wrote:

Hi guys.

Can you tell me how to make a ajax-script witch is running in the
background?

I want a script witch reloads a .php-file every 10th second.

How can I do this? :-)


[jQuery] Re: Jquery - Weird Issue with Node cannot be inserted at the specified point...

2009-03-31 Thread Ricardo

(taking a deeper look)

Your response is HTML. You can drop the whole JSON stuff and use $
(#portfolio_quotes_div_block).html(data) in the callback directly,
no need to parse anything.

This is simple AJAX (or AHAH as some would call it), I think you mixed
up ajax/json/jsonp.

On Mar 31, 12:45 pm, Ricardo ricardob...@gmail.com wrote:
 You are trying to parse the response as JSON, but it looks like XML.
 JSON is JavaScript Object Notation (http://www.json.org/js.html).

 cheers,
 - ricardo

 On Mar 30, 4:08 pm, ckoeber ckoe...@gmail.com wrote:

  Hello,

  I am trying to create a JSON service and everything seems to work well until
  I am pulling the actual data from gthe service to be inserted into a DIV
  element on a page.

  Here is the code for the JSON service (client side):

                  nbsp;if (Drupal.jsEnabled) {

              nbsp;nbsp; nbsp;$(document).ready(

              nbsp;nbsp; nbsp;nbsp;nbsp; nbsp;nbsp;nbsp;
  nbsp;function(){

              nbsp;nbsp; nbsp;nbsp;nbsp; nbsp;nbsp;nbsp;
  nbsp;nbsp;nbsp;
  nbsp;$(quot;#portfolio_quotes_div_form_blockquot;).html('lt;form
  id=quot;frmPortfolioSymbolsBlockquot;
  name=quot;frmPortfolioAddSymbolBlockquot; method=quot;postquot;
  action=quot;quot;gt;lt;labelgt;Symbollt;input
  name=quot;txtSymbolquot; type=quot;textquot; id=quot;txtSymbolquot;
  size=quot;10quot; /gt;lt;/labelgt;lt;labelgt;lt;input
  type=quot;submitquot; name=quot;cmdAddquot; id=quot;cmdAddquot;
  value=quot;Addquot; /gt;lt;/labelgt;lt;labelgt;lt;input
  type=quot;submitquot; name=quot;cmdReloadSymbolsquot;
  id=quot;cmdReloadSymbolsquot; value=quot;Refreshquot;
  /gt;lt;/labelgt;lt;/formgt;');

              nbsp;nbsp; nbsp;nbsp;nbsp; nbsp;nbsp;nbsp;
  nbsp;nbsp;nbsp; nbsp;//Drupal.settings.portfolio_json_getquotes.uid

              nbsp;nbsp; nbsp;nbsp;nbsp; nbsp;nbsp;nbsp;
  nbsp;nbsp;nbsp; nbsp;nbsp;nbsp; nbsp;nbsp;nbsp;
  nbsp;$.post(Drupal.settings.portfolio_json_getquotes.ajaxUrl,{uid:Drupal.settings.portfolio_json_getquotes.uid},

              nbsp;nbsp; nbsp;nbsp;nbsp; nbsp;nbsp;nbsp;
  nbsp;nbsp;nbsp; nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;
  function (data) {

              nbsp;nbsp; nbsp;nbsp;nbsp; nbsp;nbsp;nbsp;
  nbsp;nbsp;nbsp;
  nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp; var
  result = Drupal.parseJson(data);

              nbsp;nbsp; nbsp;nbsp;nbsp; nbsp;nbsp;nbsp;
  nbsp;nbsp;nbsp;
  nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;
  $(quot;#portfolio_quotes_div_blockquot;).html(result);

              nbsp;nbsp; nbsp;nbsp;nbsp; nbsp;nbsp;nbsp;
  nbsp;nbsp;nbsp; nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;

  });

              nbsp;nbsp; nbsp;nbsp;nbsp; nbsp;nbsp;nbsp;
  nbsp;nbsp;nbsp;
  nbsp;$(quot;#cmdReloadSymbolsquot;).bind(quot;clickquot;, function() {

              nbsp;nbsp; nbsp;nbsp;nbsp; nbsp;nbsp;nbsp;
  nbsp;nbsp;nbsp; nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;
  $.post(Drupal.settings.portfolio_json_getquotes.ajaxUrl,{uid:Drupal.settings.portfolio_json_getquotes.uid},

              nbsp;nbsp; nbsp;nbsp;nbsp; nbsp;nbsp;nbsp;
  nbsp;nbsp;nbsp; nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;
  function (data) {

              nbsp;nbsp; nbsp;nbsp;nbsp; nbsp;nbsp;nbsp;
  nbsp;nbsp;nbsp; nbsp;nbsp;nbsp; nbsp;nbsp;nbsp; nbsp;nbsp; var
  result = Drupal.parseJson(data);

              nbsp;nbsp; nbsp;nbsp;nbsp; nbsp;nbsp;nbsp;
  nbsp;nbsp;nbsp; nbsp;nbsp;nbsp; nbsp;nbsp;nbsp; nbsp;nbsp;nbsp;
  $(quot;#portfolio_quotes_div_blockquot;).html(result);

              nbsp;nbsp; nbsp;nbsp;nbsp; nbsp;nbsp;nbsp;
  nbsp;nbsp;nbsp; nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;

  });

              nbsp;nbsp; nbsp;nbsp;nbsp; nbsp;nbsp;nbsp;
  nbsp;nbsp;nbsp; nbsp;nbsp;nbsp; nbsp;nbsp; return false;

              nbsp;nbsp; nbsp;nbsp;nbsp; nbsp;nbsp;nbsp;
  nbsp;nbsp;nbsp; nbsp;});

              nbsp;nbsp; nbsp;nbsp;nbsp; nbsp;nbsp;nbsp; nbsp;}

              nbsp;nbsp; nbsp;)

              }

  nbsp;And here is a sample of the data returned from the working service
  (the code below is formatted for js):

  quot;\x3ctable id=\quot;portfolio_quotes_table_block\quot;
  width=\quot;100%\quot; border=\quot;0\quot; cellspacing=\quot;0\quot;
  cellpadding
  =\quot;0\quot;\x3e\x3ctr\x3e\x3cth
  scope=\quot;col\quot;\x3eSymbol\x3c/th\x3e\x3cth
  scope=\quot;col\quot;\x3eLast\x3c/th\x3e
  \x3cth
  scope=\quot;col\quot;\x3eChange\x3c/th\x3e\x3c/tr\x3e\x3ctr\x3e\x3cth
  scope=\quot;row\quot;\x3eMSFT\x3c/th\x3e
  \x3ctd\x3e17.44\x3c/td\x3e\x3ctd\x3e-0.69\x3c/td\x3e\x3c/tr\x3e\x3ctr\x3e\x3cth
  scope=\quot;row\quot;\x3e\x3c
  /th\x3e\x3ctd\x3e\x3c/td\x3e\x3ctd\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3equot;

  nbsp;Essentially what I am looking for is a table that will be inserted
  inside a DIV element on the first loading of a page as well as when the
  refresh button on the form by the JS code above. The code runs but I get the
  following message:

                  uncaught exception: Node cannot be inserted at the specified
  point in the 

[jQuery] Re: A general Javascript question: duplicate IDs in a document?

2009-03-31 Thread Mauricio (Maujor) Samy Silva



Is there any major problems you're aware of with this kind of dom
pollution that have a negative impact on ease or performance?


My thoughts:

Firstly: Validate!
But I think that negative impact on whatever isn't the point.
Suppose:
Option 1 - font size=7bHeading level 1/font/b
Option 2 - h1Heading level 1/h1
What option should we use?

So, the point goes beyond validation: It's a semantic issue too.

Specs says: http://www.w3.org/TR/REC-html40/struct/links.html#adef-rel
rel attribute: This attribute describes the relationship from the current 
document to the anchor specified by the href attribute


and says more: http://www.w3.org/TR/REC-html40/index/attributes.html

rel attribute is allowed for A and LINK elements only
---

div class=event-phase rel=1/div
div class=event-phase rel=2/div
div class=event-phase rel=3/div



Instead of



div id=event-phase-1/div
div id=event-phase-2/div
div id=event-phase-3/div


I think that 2nd approach is better not only because  validades but it is a 
easy way to target each element using a counter in the loop.

Something like:

$('.event-phase-' + i)

PS: If you have control over the id name use a shorter one like: evph1, 
evph2 etc...


Regards
Maurício

---




[jQuery] Re: Wrap all center tags

2009-03-31 Thread Ricardo

You can't treat XML as HTML, and jQuery's methods are meant for HTML
only. I think you'll have to create your own wrapping function.

cheers,
- ricardo

On Mar 31, 12:53 pm, tij_dev tijmas...@googlemail.com wrote:
 Hello everybody,

 I have a doc xml (which is not my window.document) which contains some
 center tags and I would like to wrap all of them with a specific
 div element.

 I tried doing :

 $(center,pDocument).wrapAll(div class='wrap'/div);

 pDocment is my xml dom. but it says Non valid argument... :(

 Please HELP !

 Thanks a lot :)


  1   2   >