[jQuery] function not defined

2009-12-25 Thread Saledan
Hello,
it's a long time that I don't write some code with jquery.
Yesterday I wrote some lines for my photo portfolio script.
I use lightbox plugin, but also I wrote few functions to manage the
thumbnails slide show.

I include the lightbox plugin script and into the main html I add my
own functions.

From the lightbox script, into the _finish function I would like to
call an in-line function placed on main.html page.
The browser (firefox) raise me an error about myFunction is not
defined.
I supposed the different scope. So as settings for lightbox script I
passed also the this reference but it doesn't work :(

example:
$('#image_frame a').lightBox({
txtImage: 'Immagine',
txtOf: 'di',
originalCall: this,
});

and into the _finish()
settings.originalCall.myFunction()

but I received the error.

How can I solve?
Have I to create an obj with my function?

Please help me.

Many thanks
Cheers (and merry christmas)
Max


RE: [jQuery] [ask]problem with ajax

2009-12-25 Thread Rick Faircloth
Check out the .live() function in jQuery for enabling

ajax-added links to your HTML.

 

hth,

 

Rick

 

From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of PUTRA PRIMA
Sent: Friday, December 25, 2009 1:01 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] [ask]problem with ajax

 

hai jquery user ^^

i have a problem with ajax, here is the problem :

i have a list of table/data with edit and delete link in file, data.php and
i load data.php in my dashboard file named it dashboard.php

so this dashboard.php load file data.php result like this :

nameaddress control
john doe1   anonym delete/edit
john doe2  anonym delete/edit
john doe3   anonym delete/edit
john doe4   anonym delete/edit


is it possible that i use the link in data.php to trigger onclick ajax
function in dashboard.php ? if it does how ? im really confused with this
one T_T

i already try this jquery script but it doesn't work 

$(.delBtn).click(function(){
var del_id = element.attr(id);
var info = 'id=' + del_id;
$.ajax({
type:POST,
url:http://localhost/index.php/superAdmin/delete;,
data:info,
succes:function(){
  $(.helper).html(Data
deleted).fadeIn('slow').animate({opacity: 1.0}, 2000).fadeOut('slow');
}
});
return false;
});

pardon my english ^^

-- 
Putra Prima A
0410630078 Teknik Elektro Brawijaya
3 ipa 2 smunsa 2004
http://siubie.web.id/



[jQuery] Re: live event with instant execution

2009-12-25 Thread speedpac...@gmail.com
Basically execute additional javascript code based on a classname
adding functionality to these elements...
I tried the following, but it doesn't seem to be working...

jQuery('*').load(function () {
// run code
console.log(DEBUG: Initialising element  + jQuery(this));
flexinInitialiseElement(jQuery(this), false);
});

This piece of code is added to the top of the page, so I would have
expected each DOM element to be passed to the flexinInitialiseElement
method, but it doesn't...

Thanks for the much appreciated feedback on this great Christmas
day :)

David.



On 24 dec, 14:14, Šime Vidas sime.vi...@gmail.com wrote:
 What does initiating elements mean?


Re: [jQuery] using :gt - Firefox error console annouces an error

2009-12-25 Thread fran23

yes, it's just a warning, we can ignore it, but thats not fine

I'm not sure whether it make sense (or it could be useful) to continue this
thread, but I do not totally comprehend your comments:

 well, jQuery will not know what to do with the
 string, because it's neither a selector string nor a HTML code
 string but that's jQuery's problem, and not Firefox's...

jQuery works correct ... while it doesn't know what to do with the string

?

AFAI-CanSee the string .s:gt(2) is a regular string and its compliant with
jQuery's documentation. Why this warning in Firefox ?

kind regards
fran


-- 
View this message in context: 
http://old.nabble.com/using-%22%3Agt%22---Firefox-error-console-annouces-an-error-tp26905317s27240p26920384.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: function not defined

2009-12-25 Thread Saledan
I tried again with this reference, and now with
settings.originalCall.myFunction() I received that the function is not
a function :-\


[jQuery] jQuery AutoComplete plugin url problem

2009-12-25 Thread wenyus
I am using a jQuery AutoComplete plugin.
My code is not working:

var jj=$(#region_area).val();
$(#code_area).autocomplete( codearea.php?id=+jj , {autoFill:
true,matchContains: true});

This also not working:

var jj=$(#region_area).val();
jj=codearea.php?id=+jj;
$(#code_area).autocomplete( jj , {autoFill: true,matchContains:
true});

Help me pls.. and sorry for my bad english language.

Thank You


[jQuery] Slideshow Question

2009-12-25 Thread Ammar Rayess
Greetings,

Take a look at this website please:
http://new.music.yahoo.com/

You can see in the middle the flash slideshow that shows pix in
middle, overlayed with text and on the right column a title, ofcourse
clicking on different titles activate the related image with text.

I looked at the plugins available, didn't see something to do the
same, i saw many slide show plugins but i need to do a block that is
exactly like the one in the mentioned site.

Is there a plugin for it that i did not notice? is this doable in
JQuery or must it be done using flash (not a flash expert here)?

Any help is most appreciated.
Thank you


[jQuery] Read/Get Data From Other URL

2009-12-25 Thread Pram
I try use the jquery, but I have a problem.

1. I save jquery.js in the root (example www.mysite.com) and in the
bottom of jquery.js file I add this script:

$(document).ready(function(){
$.get(http://www.mysite.com/data.php;, { SearchFormName:
BalizonSearchFormName, dt: cnt }, function(data){
$('#adv').html(data);
});
});


2. FIle data.php has simple script like this:
?php echo Ajax Tested Only ?


3. And in the file .php (example: test.php) on the root, I have script
like this to show result from data.php:

div id=adv/div
script type=text/javascript
.
.
/script
script type=text/javascript src=http://www.mysite.com/jquery.js;/
script

So, if run this test.php file from the root (www.mysite.com)
successfully (show result). But if I run the test.php from sub domain
or another my web (different url) can't show the result (blank).

Can someone to help me, please?


Re: [jQuery] [ask]problem with ajax

2009-12-25 Thread PUTRA PRIMA
yes its done ^^ thx rick

On Fri, Dec 25, 2009 at 6:13 PM, Rick Faircloth r...@whitestonemedia.comwrote:

  Check out the .live() function in jQuery for enabling

 ajax-added links to your HTML.



 hth,



 Rick



 *From:* jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] *On
 Behalf Of *PUTRA PRIMA
 *Sent:* Friday, December 25, 2009 1:01 AM
 *To:* jquery-en@googlegroups.com
 *Subject:* [jQuery] [ask]problem with ajax



 hai jquery user ^^

 i have a problem with ajax, here is the problem :

 i have a list of table/data with edit and delete link in file, data.php and
 i load data.php in my dashboard file named it dashboard.php

 so this dashboard.php load file data.php result like this :

 nameaddress control
 john doe1   anonym delete/edit
 john doe2  anonym delete/edit
 john doe3   anonym delete/edit
 john doe4   anonym delete/edit


 is it possible that i use the link in data.php to trigger onclick ajax
 function in dashboard.php ? if it does how ? im really confused with this
 one T_T

 i already try this jquery script but it doesn't work

 $(.delBtn).click(function(){
 var del_id = element.attr(id);
 var info = 'id=' + del_id;
 $.ajax({
 type:POST,
 url:http://localhost/index.php/superAdmin/delete;,
 data:info,
 succes:function(){
   $(.helper).html(Data
 deleted).fadeIn('slow').animate({opacity: 1.0}, 2000).fadeOut('slow');
 }
 });
 return false;
 });

 pardon my english ^^

 --
 Putra Prima A
 0410630078 Teknik Elektro Brawijaya
 3 ipa 2 smunsa 2004
 http://siubie.web.id/




-- 
Putra Prima A
0410630078 Teknik Elektro Brawijaya
3 ipa 2 smunsa 2004
http://siubie.web.id/


[jQuery] Re: using :gt - Firefox error console annouces an error

2009-12-25 Thread Šime Vidas

I just used an rediculous string like my super selector to point out
that Firefox shoudn't care what we put inside $()

As long as you know that the string is valid for jQuery and you get
the expected results, you shoudn't care about warnings from Firefox


[jQuery] Re: live event with instant execution

2009-12-25 Thread Šime Vidas
The load event wont help you... it has to do with stuff having
finished loading, but you are creating new elements based on an AJAX
response, so the new elements are not being loaded at all.

Well, you can allways initialize the elements after you create
them I can't see the problem 

For example.

1. you get the AJAX response

2. you create new elements

3. you initialize them


[jQuery] Re: Read/Get Data From Other URL

2009-12-25 Thread johan
You can't do xhr-requests from subdomains (or other 3'rd party
domains), it's a browser restriction.
You can however achieve the same effect by some neat tricks.
Here is a good page that explains this well

http://abhinavsingh.com/blog/2009/11/making-cross-sub-domain-ajax-xhr-requests-using-mod_proxy-and-iframes/

You can also use jQuery to fetch JSON from other domains by ajax, but
that's another story.

/ Johan


On 25 Dec, 03:46, Pram acep.sudra...@gmail.com wrote:
 I try use the jquery, but I have a problem.

 1. I save jquery.js in the root (examplewww.mysite.com) and in the
 bottom of jquery.js file I add this script:

 $(document).ready(function(){
 $.get(http://www.mysite.com/data.php;, { SearchFormName:
 BalizonSearchFormName, dt: cnt }, function(data){
 $('#adv').html(data);

 });
 });

 2. FIle data.php has simple script like this:
 ?php echo Ajax Tested Only ?

 3. And in the file .php (example: test.php) on the root, I have script
 like this to show result from data.php:

 div id=adv/div
 script type=text/javascript
 .
 .
 /script
 script type=text/javascript src=http://www.mysite.com/jquery.js;/
 script

 So, if run this test.php file from the root (www.mysite.com)
 successfully (show result). But if I run the test.php from sub domain
 or another my web (different url) can't show the result (blank).

 Can someone to help me, please?


[jQuery] Re: live event with instant execution

2009-12-25 Thread Johan Borestad
Hi!
I'm not really sure of what you're trying to do, but the main problem
is that you're not passing all selectors to your
flexinInitialiseElement method.
Maybe somethingl like this will help you. It's iterationg through all
dom nodes and passing them to flexinInitialiseElement.

$(*).each(function(){
  var $this = $(this);
  flexinInitialiseElement( $this, false)
})

The entire code is really bad if performance is an issue, so maybe a
small vanilla js would do fine here, like this:

var nodes = $(*);
for (i=0; i nodes.length; i++) {
  flexinInitialiseElement( nodes[i] , false)
}


Hope this will help you somewhere :)
/ Johan

On 25 Dec, 12:57, speedpac...@gmail.com speedpac...@gmail.com
wrote:
 Basically execute additional javascript code based on a classname
 adding functionality to these elements...
 I tried the following, but it doesn't seem to be working...

 jQuery('*').load(function () {
         // run code
         console.log(DEBUG: Initialising element  + jQuery(this));
         flexinInitialiseElement(jQuery(this), false);
     });

 This piece of code is added to the top of the page, so I would have
 expected each DOM element to be passed to the flexinInitialiseElement
 method, but it doesn't...

 Thanks for the much appreciated feedback on this great Christmas
 day :)

 David.

 On 24 dec, 14:14, Šime Vidas sime.vi...@gmail.com wrote:

  What does initiating elements mean?


[jQuery] Re: Attaching an event to a non-existing element?

2009-12-25 Thread Johan Borestad
I would really recommend the listen plugin for jQuery by Aaron
Flesler. It's an excellent plugin that also fixes the focus/blur bug
in IE6. Have been using it for over two years now (before live() was
implemented), and it also have good support for the dblclick event:
http://plugins.jquery.com/project/Listen

/ Johan


On 25 Dec, 02:28, Šime Vidas sime.vi...@gmail.com wrote:
  3. I have set this response as the content of an empty div.

  That select element appears well, but maybe it doesn't appear as a DOM
  member, so that's why I can't attach an event handler to it.

 If you place HTML code inside an element that is in the DOM tree (like
 the empty DIV in your example), than the code gets parsed and all HTML
 elements inside the code are added to the DOM tree...

 Basically, if you can see it on the page, than it's in the DOM
 tree

 I noticed in your code above, you used the wrong name for the
 method... it's called change, not onchange

  $('#term2').change(function(){
    window.location = http://www.google.com/;;
  }


[jQuery] Anchor navigation /like facebook

2009-12-25 Thread malts...@gmail.com
Hi there,

I am trying to find some plugin, which can make AJAX request's by
parsing ANCHOR value, from URL...

For example I have an ajax gallery and I want to make navigation like
this

www.example.com/gallery.php#photo=1
www.example.com/gallery.php#photo=2
www.example.com/gallery.php#photo=3

Any suggestions ?


[jQuery] Re: Attaching an event to a non-existing element?

2009-12-25 Thread MorningZ
My bad for missing that the event was change

you could use the 1.4 alpha version of jQuery's .live() though  :-)

Details about .live() overhaul
http://blog.jquery.com/2009/12/04/jquery-14-alpha-1-released/

Latest version
http://blog.jquery.com/2009/12/18/jquery-14-alpha-2-released/


On Dec 25, 2:49 pm, Johan Borestad johan.bores...@gmail.com wrote:
 I would really recommend the listen plugin for jQuery by Aaron
 Flesler. It's an excellent plugin that also fixes the focus/blur bug
 in IE6. Have been using it for over two years now (before live() was
 implemented), and it also have good support for the dblclick 
 event:http://plugins.jquery.com/project/Listen

 / Johan

 On 25 Dec, 02:28, Šime Vidas sime.vi...@gmail.com wrote:

   3. I have set this response as the content of an empty div.

   That select element appears well, but maybe it doesn't appear as a DOM
   member, so that's why I can't attach an event handler to it.

  If you place HTML code inside an element that is in the DOM tree (like
  the empty DIV in your example), than the code gets parsed and all HTML
  elements inside the code are added to the DOM tree...

  Basically, if you can see it on the page, than it's in the DOM
  tree

  I noticed in your code above, you used the wrong name for the
  method... it's called change, not onchange

   $('#term2').change(function(){
     window.location = http://www.google.com/;;
   }


[jQuery] Re: Read/Get Data From Other URL

2009-12-25 Thread Pram
I see..., thanks johan!

On Dec 26, 3:20 am, johan johan.bores...@gmail.com wrote:
 You can't do xhr-requests from subdomains (or other 3'rd party
 domains), it's a browser restriction.
 You can however achieve the same effect by some neat tricks.
 Here is a good page that explains this well

 http://abhinavsingh.com/blog/2009/11/making-cross-sub-domain-ajax-xhr...

 You can also use jQuery to fetch JSON from other domains by ajax, but
 that's another story.

 / Johan

 On 25 Dec, 03:46, Pram acep.sudra...@gmail.com wrote:



  I try use the jquery, but I have a problem.

  1. I save jquery.js in the root (examplewww.mysite.com) and in the
  bottom of jquery.js file I add this script:

  $(document).ready(function(){
  $.get(http://www.mysite.com/data.php;, { SearchFormName:
  BalizonSearchFormName, dt: cnt }, function(data){
  $('#adv').html(data);

  });
  });

  2. FIle data.php has simple script like this:
  ?php echo Ajax Tested Only ?

  3. And in the file .php (example: test.php) on the root, I have script
  like this to show result from data.php:

  div id=adv/div
  script type=text/javascript
  .
  .
  /script
  script type=text/javascript src=http://www.mysite.com/jquery.js;/
  script

  So, if run this test.php file from the root (www.mysite.com)
  successfully (show result). But if I run the test.php from sub domain
  or another my web (different url) can't show the result (blank).

  Can someone to help me, please?- Hide quoted text -

 - Show quoted text -


Re: [jQuery] Anchor navigation /like facebook

2009-12-25 Thread Shawn
I don't think you quite understand what it is you are wanting.  Or maybe 
I'm just a little t drunk.. :)


navigation like that has nothing to do with Ajax.  Using URLs like that 
to request Ajax based data/content is something else.


If you really truly mean navigation, then may I suggest just making an 
anchor tag with the href attribute set to the desired URL?  As in 
standard HTML sans JavaScript.


If you mean you want to make an Ajax request to get content without 
reloading the page, well, you *could* intercept the click event of the 
anchor tag and ask for the data returned by the URL at the href.


Something like this maybe:

$(a).click( function () {
  $.ajax({
url: $(this).attr(href),
dataType: html,
success: function (response) {
  $(#mydiv).html(response);
}
  });

  return false;
});

The return false; is important.  If you don't stop the normal event 
propagation, your page will continue to navigate as if you had clicked a 
normal anchor tag.


Anyways, I really don't mean to be condescending.  I'm just not quite 
clear what you are asking for, and my impression from your message is 
that you are not either.  Hopefully my feeble attempt points you in the 
right direction... :)


Shawn

malts...@gmail.com wrote:

Hi there,

I am trying to find some plugin, which can make AJAX request's by
parsing ANCHOR value, from URL...

For example I have an ajax gallery and I want to make navigation like
this

www.example.com/gallery.php#photo=1
www.example.com/gallery.php#photo=2
www.example.com/gallery.php#photo=3

Any suggestions ?


[jQuery] How can i make a friendfeed like window scroll control system?

2009-12-25 Thread needim
When you active real-time updates, new entries dynamically adding a
div. At this stage scroll is automatically moving. This action
provides the content you do not miss on visible area.

If you want to see this action, you can also watch this screencast;
http://www.viddler.com/explore/itod/videos/45/

My method;

// Firstly, i am storing the first entry's(in view) positions in
window object;
jQuery(window).scroll(function() {
var q = 0;
jQuery(.entry).each(function (i) {
 if (jQuery(this).offset().top  jQuery
(window).scrollTop()) {
  if (q == 0) {
   window.show_id = jQuery(this).attr
(id);
   window.pos_y = jQuery(this).offset
().top - jQuery(window).scrollTop();
   q = 1;
  }
 }
});
});

// After coming to the new entry, i call this function;
function scroll_control() {
 var scroll_top = jQuery(window).scrollTop();
 if (scroll_top != 0) {
  if (jQuery('#'+window.show_id).length != 0) {
   var scr = jQuery('#'+window.show_id).offset
().top - window.pos_y;
   window.scrollTo(0, scr);
  }
 }
}

// but this is due to flashing. I guess not fast enough



[jQuery] Handling BACK button depending on hash value in URL

2009-12-25 Thread knyttr
Hello,

I am trying to handle back button on my page so a function would be
called whenever I press the button. I dynamically set the
location.hash value on the page. I was hoping to achieve the
functionality by onBeforeUnload, but it does not react on change of
hash value in url – it just reacts on changing url address.

Is there any other way? For example I am trying to achieve the
functionality like in gmail, when back button pressed.


[jQuery] menu hover question

2009-12-25 Thread slava
Hi,
I am trying to create a vertical menu with jquery.
I select the cells (divs) which have sub-menues and call .hover
function to show sub-menues on hover in and hide on hover out. That
works, but the problem is its impossible to select a sub-menu sinse
they are hidden as soon as you hover out from the parent menu cell. I
tried adding sub-menues to the hover function, but that did not make a
difference. Any ideas on how to make this work please.

thanks. Slava


[jQuery] Dialog box proble

2009-12-25 Thread k_magnai
Hi JQuery(English)
Sorry For My Bad English
I'm Developer of www.cms.mn website,you can show what this site can do
do at this url http://www.cms.mn/?pageId=156
But I have problem with jquery dialog and other tools. JQuery dialog
can't correcly working with other jquery tools For Example:My page has
resizeable div and dialog but when mouse over on the dialog it can
resize background resizeable div