[jQuery] Re: JQUERY Pagination

2009-05-19 Thread Jim D

I would check out DataTables.  It looks like it would easily be able
to do what you're talking about and much more.
http://www.sprymedia.co.uk/article/DataTables

-Jim

On May 18, 11:59 am, bharani kumar bharanikumariyer...@gmail.com
wrote:
 Hi all,
 Please refer few jquery pagination plugins ,

 Also need in the able heading with sort type ,

 for example

 Assume if i click the date , then i want sort by date , if i click subject ,
 need to sort by subject ,

  *Date*

 *Subject*

 *09-08-1984*

 Subject 1

 *10-09-1986*

 Subject 2

 *10-08-1996*

 Subject 3

 Thanks

 --
 உங்கள் நண்பன்
 பரணி  குமார்

 Regards
 B.S.Bharanikumar

 POST YOUR OPINIONhttp://bharanikumariyerphp.site88.net/bharanikumar/


[jQuery] Re: jqModal - Deactivate a register trigger

2009-05-19 Thread Jim D

I don't believe there's a removeTrigger sort of function for jqModal.
The only thing I can think of to do would be to bind a click event to
the element you want to trigger the modal instead of using the
jqmAddTrigger() method.

So instead of:
$('#data-info-div').jqmAddTrigger('a.data-info-trigger');

You could use:
$('a.data-info-trigger').click( function() {
 $('#data-info-div').jqmShow();
});

That would give you a little more control over what happens when you
click the element.  Also, if the only element that is going to trigger
the modal will be links with the data-info-trigger class, you could
consider toggling the class on those elements based on whether or not
they should trigger the modal

If you could provide a link to an example page I might be able to
provide a little more insight.  Feel free to email me if you have any
questions nofxbassist1...@gmail.com

-Jim

On May 18, 2:24 pm, Leandro Tuttini ltutt...@gmail.com wrote:
 hi,

 It is possible to deactivates trigger registered ?

 I am using :

         $('#data-info-div').jqm({
             trigger: false,
             modal: true,
             overlay: 50
         });

         $(#data-info-div).jqmAddTrigger(a.data-info-trigger);

 but I cann´t find the opposed function to jqmAddTrigger()

 Dimanically I need to assign a trigger to a link, but depending the
 logic I need to remove this assignation.
 Is possible ?

 greetings


[jQuery] Re: How to check if jquery is working?

2009-05-16 Thread Jim D

You can also check to see if $ is a function.  If the jQuery script
loaded properly, that should return true

On May 15, 2:16 pm, James james.gp@gmail.com wrote:
 Try using tools like the Web Development toolbar add-on for Firefox to
 debug. Under Information  View Javascript, you can view all of the
 Javascript that is loaded on the page, such as maybe other Javascript
 libraries that are overriding the $ variable.
 This will help you see what Javascript is on your page, and whether
 they are linked correctly or not.

 Additionally, also use the Firebug add-on to check whether your
 Javascript is spitting out any errors.

 Try also simplifying your code to something like:

 jQuery(document).ready(function(){
      alert('test');

 });

 On May 15, 6:00 am, Charlie charlie...@gmail.com wrote:

  is jquery.js included on page and is it loading (ie is path valid to 
  jquery.js)?
  heldtogether wrote:Hi, I want to try incorporate jquery in my site, but I'm 
  having some problems. The site is drawn together from various files in PHP. 
  I have added the jquery script which I would expect to work fine regardless 
  of the PHPness earlier because it is a client side script. Unfortunately 
  nothing happens. If I save the page directly to my desktop then the script 
  works fine, so I think there must be some problems with the dynamic pages. 
  Does anyone have any idea why this might be occuring? The following is what 
  gets put onto the page in the header if I view source. script 
  type=text/javascript src=jquery.js/script script 
  type=text/javascript $(document).ready(function(){ $(pHello 
  world!/p).appendTo(body); $(#onlineresources).hide(); 
  $(#onlineresourcesbutton).click(function(){ 
  $(#onlineresources).slideDown(slow); return false; }); }); /script 
  Thanks, Josh


[jQuery] Re: jqModal question in regard to IE6

2009-05-05 Thread Jim D

Rick,

Could you post an example link so I could get a better idea of what
you're talking about?  I've dealt with jqModal issues in IE6 before so
I may be able to help you out, but I would need to see the page where
all this is happening.

On May 4, 10:14 am, Rick ric...@gmail.com wrote:
 Man, this is frustrating. I'm using jqModal to submit an ajax request
 and things work fine on FF and Safari. I then got to work and tried my
 stuff on IE6 and I'm stumped... the first time you click on a link in
 a table, it goes to the server with the ajax call and returns a form
 displayed in the resulting div. Things are fine. However, when you
 click that same edit link again from the table, the modal window
 fires, but this second modal window never fires the ajax event to the
 server.

 When the modal window form submits it actually ends up doing a full
 round trip repopulating the whole page, so I don't think it's related
 to issues with events not being bound after you return from an ajax
 call.

 I even tried to bring it down to more manual control by firing some
 defined functions instead of relying it on binding to buttons. So what
 I have is...

 //A table that some links like:
 a href=javascript:editWfeGroup('${w.wfeGroupID}')Edit/a

 //The editWfeGroup function:
  function editWfeGroup(_wfeGroupID) {
                 $('#groupFormDiv').jqm({modal: true,
                     ajax:
 'WFEMaintenance.action?_eventName=getForEditGroupwfeGroupID='+_wfeGroupID
                     , ajaxText: loadingHTML})
                 $('#groupFormDiv').jqmShow();
             }

 //a div
 div id=groupFormDiv class=jqmWindow/div

 On the server side I'll only see the WFEMaintenance.action hit ONCE
 the first time you click on edit for a link in the table. You can go
 through and click on edit for all the row and the server side call is
 made, however, if you try to hit again, it doesn't fire.

 Why would I only be seeing this issue in IE6? in FF/Safari no issues.


[jQuery] Re: Protect page which loaded by $.ajax

2009-04-24 Thread Jim D

You can also check the HTTP_X_REQUESTED_WITH server variable.  If the
page is requested via $.ajax then this will be set to XMLHttpRequest
but if it is requested straight through the browser, then it will not
exist.

On 23 апр, 21:51, donb falconwatc...@comcast.net wrote:
 If you are not familiar, you need to investigate 'role based'
 security.  Users log in and are members of one or more security groups
 (roles).  Then, different areas of your application are granted access
 to appropriate roles.  This restricts access to only those users
 having the correct role assigned to them.  A basic set of roles might
 be 'guest, user, manager, admin' (in increasing order of extent of
 their access to the application.

 Since a session variable it not alterable by the user it's preferable
 to anything that's dependent upon the client side settings/parameters.

 On Apr 23, 9:08 pm, James james.gp@gmail.com wrote:

  Another thing, regarding the HTTP_REFERER, I personally don't use that
  because it's easy to be manipulated and really browser dependent.
  Also, there are a lot of tools out there that easily remove referrer
  headers (to hide tracking) and would cause your application to break
  for those users.

  On Apr 23, 3:05 pm, James james.gp@gmail.com wrote:

   Oh, one more thing. Use POST submission instead of GET if you don't
   want direct access easily. It's more work to forge a POST request than
   a GET request.

   On Apr 23, 3:04 pm, James james.gp@gmail.com wrote:

Sessions is probably the simplest way and should probably always be
used whenever possible. Other additional checks include checking the
HTTP Request Header, X-Requested-With, with the value
'XMLHttpRequest'. jQuery automatically sets this value for you when
doing AJAX, so all you need is a header check with PHP. This will help
prevent direct URL access as the browser wouldn't add this header
automatically. This header can be spoofed easily so don't rely 100% on
it. Another additional thing you can add is some kind of unique token
generated by the page that is doing the AJAX call, and pass that token
as data with the AJAX request. Then have the requested page check the
token to make sure it's valid with the calling page. (I'm sure there
are lots of resources to generating a good token.) This can help in
protecting against cross-site request forgery also.

On Apr 23, 2:46 pm, donb falconwatc...@comcast.net wrote:

 Session variables will be shared between the ajax page and the calling
 page.  So, if you log in the user somehow and store a session variable
 that indicates they are logged in, just check that the appropriate
 variable exists.

 On Apr 23, 8:30 pm, Colonel tcolo...@gmail.com wrote:

  For example I have a page:http://mysite.com/content/index.php.
  On this page I use $.ajax:
  $.ajax({
    type: GET,
    data: data=123456,
    dataType: 'html',
    url: temp.php,
    error:  function(msg) {...},
    success: function(msg) {...},
    complete: function() {...}});

  where temp.php -http://mysite.com/content/temp.php. On temp.php I 
  use
  requests for DB with param from $.ajax - data=123456.

  How I can protect page temp.php? For example, somebody 
  typinghttp://mysite.com/content/temp.php?data=123456andthenhecangetall
  results.

  I found one solution - using if($_SERVER['HTTP_REFERER'] == http://
  mysite.com/content/) {}

  But Am not shure that it can realy protect my page? Or Am not right?

  Thanks.


[jQuery] Re: Get specific content (from div, p) from $.ajax

2009-04-23 Thread Jim D

Based on the example you have here, it seems like having your php file
return a JSON object may suit your needs a little better than
returning an entire page.  However, if you wanted to get the data in
the way you're talking about, set the 'dataType' parameter to 'html'
in your $.ajax function, and then in your success function, insert the
html response into an element on the page, and then get the values
from there like you normally would with jQuery.  So in order to
achieve what you are talking about above, your ajax function would
look something like this:

$.ajax({
 url: 'temp.php',
 data: 'ID=1NUMBER=123',
 dataType: 'html',
 cache: false,
 error:  function(msg) {alert(Error Saved:  + msg);},
 success: function(html) {
  $('#ajax-response-container').html(html);
  var id = $('#ajax-response-container #header p').text();
  var number = $('#ajax-response-container #header2 p').text
();
  //whatever else you want to do with the returned values
 },
 complete: function() {$.unblockUI();} });

and then in your HTML be sure to have the element

div id=ajax-response-container/div

I did a brief test on my local machine and that seemed to work.
However, I really think that you should consider passing the values in
a JSON object instead of an entire page.  Could you perhaps provide a
link to where you are trying to implement this code?  It might help me
understand what you are trying to achieve a little better.  Please
feel free to email me if you have questions at
nofxbassist1...@gmail.com

On Apr 23, 4:55 am, Colonel tcolo...@gmail.com wrote:
 Anybody ???

 On 23 апр, 04:26, Colonel tcolo...@gmail.com wrote:

  How I can get content from remote file by $.ajax?

  For example I have some file temp.php:
  !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
  html
  head
   titleTest file/title
   meta http-equiv=Content-Type content=text/html;
  charset=windows-1251
  /head
  body
   ?
   $id = isset($_GET[ID]) ? $_GET[ID] : ;
   $number = isset($_GET[NUMBER]) ? $_GET[NUMBER] : ;
   echo pbid =/b . $id . /p;
   echo pnumber =  . $number . /p;
   ?
   div id=headerpSome text in div header - ?=$id?/p/div
   div id=header2pSome text in header2 - ?=$number?/p/div
  /body
  /html

  and Am using $.ajax:

  $.ajax({url: 'temp.php',
              data: ID=1NUMBER=123,
              cache: false,
              error:  function(msg) {alert(Error Saved:  + msg);},
              success: function(msg) {alert(Data Saved:  + msg);},
              complete: function() {$.unblockUI();}
             });

  how I can get for example content only from div with id=header2 or
  both divs (not hole data - msg)?

  Thanks.


[jQuery] Re: Problem: Thickbox context bigger then browser size - no scroll bars.

2009-04-10 Thread Jim D

I did search internet for a solution - I did not find anything that I
implemented.
I did put this code in thickbox.js , but it ignored it:
TB_WIDTH = 750;
TB_HEIGHT = 750;

On Apr 9, 8:35 pm, Vincent Nguyen kureik...@gmail.com wrote:
 Hi jwizard,
 i think we must change code of Thickbox!
 I must do since i can not google a solution!
 Did you do that? if you did, could you share it to me?
 If you didn't, i will do it share to you after completed!

 2009/4/9 Vincent Nguyen kureik...@gmail.com

  Does anyone know how to do this?
  I'm getting stuck with this, too!

  2009/4/9 Jim D jwiz...@gmail.com

  Hi. How do you deal when thickbox is displaying itself bigger then
  browser size and it does not show scroll bars, so there is no way of
  getting to the last sentences display in Thickbox?


[jQuery] Problem: Thickbox context bigger then browser size - no scroll bars.

2009-04-09 Thread Jim D

Hi. How do you deal when thickbox is displaying itself bigger then
browser size and it does not show scroll bars, so there is no way of
getting to the last sentences display in Thickbox?


[jQuery] DOM Rendering is not finished before ThickBox tried to display = Grey Screen

2009-04-03 Thread Jim D

Hi. I have a problem of getting a grey screen instead of grey screen
with JQuery ThickBox on top of that.
I need to open ThickBox on page load.
It seems that sometimes! DOM is not finished when ThickBox is trying
to modify it.

Here is a code I have at the end of my .jsp file (showWarning() just
opens a ThickBox)

/form
script
formElement = document.shippingRulesArrayForm;
window.onLoad=window.setTimeout(showWarning(), 1400);
/script

Note: even if I put this code in footer, it still sometimes gives a
grey screen.


[jQuery] Re: Jquery.js include multiple times header / footer / etc.

2009-02-03 Thread Jim D

You could check whether or not $ is a function.  If jQuery has been
included, typeof($) should return the string function otherwise it
will return undefined

On Feb 2, 11:32 am, Sébastien Richer sebastienric...@gmail.com
wrote:
 Hi,

 I tried to search around for this but have'nt had any luck, so I'll
 ask here :)

 I use jquery.js on most of my sites. And most pages have it included
 in the head part. But not all of my pages, some are very old.

 Along with jquery.js, most pages also have jquery.flash.js.

 Now I recently needed to add something to my footer (which is included
 on every page) and I need to user jquery.cookie.js, and so jquery.js.

 Since not all my pages have jquery.js, I included in my footer both
 jquery.js and jquery.cookie.js.

 The problem is that when I include jquery.js a second time, the
 initial instance (?) seams to be forgotten and now my
 jquery.flash.js seams to have stopped working. I get an unresolved
 for flash().

 Anyone had a similar issue ? (If I'm not mistaking this is an issue
 only with the latest versions of jquery.js)

 Any workarounds ?

 My backup plan will be to go around all of my pages and change the
 way I call .js files. I'll probably create a javascript.jsp file and
 include that in all my pages and control it from there. bleh... find
 and replace...

 Thanks for the help !


[jQuery] Re: Opacity for a menu background, but not for the element inside

2008-12-12 Thread Jim D

You can use the CSS 'opacity' property.  It accepts a value between
0.0 and 1.0.  For example, if you wanted to set the opacity of an
element to 40%, you would use:

opacity: 0.4;

However, in true MS style, you have to do something different to get
it to work in IE.  Internet Explorer accepts the 'filter' property.
Do make the example above work in IE, you would use:

filter: alpha(filter = 40)

You can learn a little more about it here:
http://joseph.randomnetworks.com/archives/2006/08/16/css-opacity-in-internet-explorer-ie/

Hope that helps.

On Dec 12, 6:10 am, Cyril G magiccy...@gmail.com wrote:
 Hye,

 I would like to create a menu, with a 80% opacity background, but I
 want to keep the link element at 100% opacity.

 For example :
 lia href=link.htmllorem ipsum/a/li
 I would like to have the li element at 80%, but the a element at
 100% (or 120%).

 I know that I could use PNG, but it would be great if I could do this
 with just a CSS Color and jQuery. Is there any solution ?


[jQuery] Re: Submit a form automatically

2008-12-12 Thread Jim D

Do you have an example of the code you're using to load the form?

On Dec 12, 11:02 am, Adam apcau...@gmail.com wrote:
 I have a dynamically created form that I'd like to submit
 automatically after it loads.  It doesn't look like forms have an
 onload event.  I would use the window onload, but the form isn't
 necessarily around when the window loads - it is created later in a
 jquery popup.

 Any suggestions?  I am using the jquery form plugin if it matters.


[jQuery] Re: Trouble with adding 'addClass' to an existing piece of Jquery code

2008-12-11 Thread Jim D

Oh, one more thing I forgot, change the .menu-on declaration to .menu-
on a


[jQuery] Fade() Function not Working on Flash Objects in Firefox

2008-08-26 Thread Jim D

Hello all,

I have a page with an iframe inside of a div tag.  In the iframe, I
have a page with several flash objects.  Each of the flash objects is
a button that, when clicked, will load another page into the iframe.
There is also functionality to show and hide the div containing the
iframe.  This is where my problem lies.  Right now, I am simply
calling the fadeIn() and fadeOut() functions on the container div,
which is working fine in ie, safari, and opera.  However, in Firefox,
the Flash objects are not fading out with the rest of the HTML on the
page.  They remain unchanged, then become invisible with the rest of
the div once the animation completes.  Is there a way around this
(while still keeping the Flash buttons)?  I'm sure there is, but I
haven't been able to find anything on the subject while combing
various discussion boards and documentation online.

Here is an example of what I'm talking about:

HTML:
div id=frameWrapper
 iframe id=myFrame src=page.html  style=width:886px;height:
538px; frameborder=0 scrolling=auto
 /iframe
/div
div id=hideButtonClick here to hide the div up there/div

JavaScript:
$(#hideButton).click( function() {
 $(#frameWrapper).fadeOut(slow);
});

This isn't exactly the code I'm using (and its obviously abridged for
the sake of this forum) but it's along the lines of what I'm doing.
If anyone could offer me some insight as to why Flash objects don't
fade in Firefox or could point me in the right direction I would
really appreciate it.  Thanks


[jQuery] Re: Fade() Function not Working on Flash Objects in Firefox

2008-08-26 Thread Jim D

Correction:  I am having the same problem in Safari