[jQuery] Re: Get URL from a DIV which was loaded with $.load();

2009-11-23 Thread tobias.br...@me.com
Ok, i try to be more precise:

I load via $.load(); a remote page containing only a html table with
data. I regular reload the div with new content because i've
implemented a pagination. Now i also have a delete button which
deletes selected rows from this table inside my div and right after
the delete i want to reload the currently openened url (i.e. /data/
sessions/?page=15)

Right now i've added a hidden div with the current url which i can
read with jquery and reload it with $.load()... but i wonder if there
is a more clever way :-)

Tobias

On Nov 23, 7:06 pm, Michel Belleville michel.bellevi...@gmail.com
wrote:
 Unless you store it you loose it. I suggest adding code in the .load()
 callback that'll store the url in the div.

 Michel Belleville

 2009/11/23 tobias.br...@me.com tobias.br...@me.com



  Hello,

  is there any way to get the URL from a div which was previously loaded
  via $.load(); ?

  For example from:

  $('#div').load('http://www.google.de');

  Tobias


[jQuery] Re: Get URL from a DIV which was loaded with $.load();

2009-11-23 Thread Scott Sauyet
On Nov 23, 1:15 pm, tobias.br...@me.com tobias.br...@me.com wrote:
 Right now i've added a hidden div with the current url which i can
 read with jquery and reload it with $.load()... but i wonder if there
 is a more clever way :-)

What Michel is suggesting is that you store this in the div when you
do the load.  To store and fetch the data, you can just use:

http://docs.jquery.com/Core/data#name
http://docs.jquery.com/Core/data#namevalue

So simply try:

$(#myDiv).load(myUrl, {my: data}, function (responseText) {
// ... anything else you need here.
$(this).data(url, myUrl);
});

Then later:

var url = $(#myDiv).data(url);

And that's it!

  -- Scott


[jQuery] Re: Get URL from a DIV which was loaded with $.load();

2009-11-23 Thread tobias.br...@me.com
Thanks for the reply... what i dont understand... for what do i need a
callback function? Would this work ?

$(#div).load(/data/sessions/15, { url: /data/sessions/15 });

and later

var url = $(#div).data(url);

Tobias


On Nov 23, 8:06 pm, Scott Sauyet scott.sau...@gmail.com wrote:
 On Nov 23, 1:15 pm, tobias.br...@me.com tobias.br...@me.com wrote:

  Right now i've added a hidden div with the current url which i can
  read with jquery and reload it with $.load()... but i wonder if there
  is a more clever way :-)

 What Michel is suggesting is that you store this in the div when you
 do the load.  To store and fetch the data, you can just use:

    http://docs.jquery.com/Core/data#name
    http://docs.jquery.com/Core/data#namevalue

 So simply try:

     $(#myDiv).load(myUrl, {my: data}, function (responseText) {
         // ... anything else you need here.
         $(this).data(url, myUrl);
     });

 Then later:

     var url = $(#myDiv).data(url);

 And that's it!

   -- Scott


[jQuery] Re: Get URL from a DIV which was loaded with $.load();

2009-11-23 Thread tobias.br...@me.com
Ok, this code is now working for me...


function() {
$('#sessions-' + id).load(url, function() {
$(this).data('url', url);
});
}

otherfunction() {
$('#sessions-' + id).load(url);
}


Thank you very much for your help guys :-)

Tobias

On Nov 23, 8:33 pm, tobias.br...@me.com tobias.br...@me.com wrote:
 Thanks for the reply... what i dont understand... for what do i need a
 callback function? Would this work ?

 $(#div).load(/data/sessions/15, { url: /data/sessions/15 });

 and later

 var url = $(#div).data(url);

 Tobias

 On Nov 23, 8:06 pm, Scott Sauyet scott.sau...@gmail.com wrote:



  On Nov 23, 1:15 pm, tobias.br...@me.com tobias.br...@me.com wrote:

   Right now i've added a hidden div with the current url which i can
   read with jquery and reload it with $.load()... but i wonder if there
   is a more clever way :-)

  What Michel is suggesting is that you store this in the div when you
  do the load.  To store and fetch the data, you can just use:

     http://docs.jquery.com/Core/data#name
     http://docs.jquery.com/Core/data#namevalue

  So simply try:

      $(#myDiv).load(myUrl, {my: data}, function (responseText) {
          // ... anything else you need here.
          $(this).data(url, myUrl);
      });

  Then later:

      var url = $(#myDiv).data(url);

  And that's it!

    -- Scott


[jQuery] Re: Get url from iframe

2009-10-20 Thread Jonathan Vanherpe (T T NV)

rupak mandal wrote:
no because after clicking on any search link, it was redirect to new 
web page. But src remains same.


On Mon, Oct 19, 2009 at 9:45 PM, brian zijn.digi...@gmail.com 
mailto:zijn.digi...@gmail.com wrote:



I believe you can get it from the src attirbute.

On Mon, Oct 19, 2009 at 7:37 AM, Rupak rupakn...@gmail.com
mailto:rupakn...@gmail.com wrote:

 Hi all,

 I have an ifram in a page. iframe contains google.com
http://google.com (google search).
 from there if the user search for a key word, i and click on a
 link.Is there a way to get the url of newly open page inside the
 iframe.

 Plz help me..


 thanks
 Rupak



nameofiframe.location ?

--
www.tnt.be http://www.tnt.be/?source=emailsig   *Jonathan Vanherpe*
jonat...@tnt.be mailto:jonat...@tnt.be - www.tnt.be 
http://www.tnt.be/?source=emailsig - tel.: +32 (0)9 3860441




[jQuery] Re: Get url from iframe

2009-10-19 Thread brian

I believe you can get it from the src attirbute.

On Mon, Oct 19, 2009 at 7:37 AM, Rupak rupakn...@gmail.com wrote:

 Hi all,

 I have an ifram in a page. iframe contains google.com (google search).
 from there if the user search for a key word, i and click on a
 link.Is there a way to get the url of newly open page inside the
 iframe.

 Plz help me..


 thanks
 Rupak


[jQuery] Re: Get url from iframe

2009-10-19 Thread rupak mandal
no because after clicking on any search link, it was redirect to new web
page. But src remains same.

On Mon, Oct 19, 2009 at 9:45 PM, brian zijn.digi...@gmail.com wrote:


 I believe you can get it from the src attirbute.

 On Mon, Oct 19, 2009 at 7:37 AM, Rupak rupakn...@gmail.com wrote:
 
  Hi all,
 
  I have an ifram in a page. iframe contains google.com (google search).
  from there if the user search for a key word, i and click on a
  link.Is there a way to get the url of newly open page inside the
  iframe.
 
  Plz help me..
 
 
  thanks
  Rupak



[jQuery] Re: get url?

2007-05-10 Thread Alexandre Plennevaux

Yes dear, use the Mathias' plugin getParams 

http://www.mathias-bank.de/2007/04/21/jquery-plugin-geturlparam-version-2/


Your printable info will be:

$printed_link = $(a#link_id).getUrlParam(perma_link);




Hope this helps!!

alex

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of BKDesign Solutions
Sent: jeudi 10 mai 2007 1:37
To: jquery-en@googlegroups.com
Subject: [jQuery] get url?


I've been trying to do something in php and it dawned on me that jquery
would be much easier and better.

I have an auto generated link, which when one goes to it, its a redirect to
an mp3 file. (link broken to fit.
http://www.site.com/app/fetch.app?
feed_id=29308perma_link=
http://www.anothersite.com/our-designs.php

Redirect goes to
http://www.site.com/audio/b/k/d/e/1216578.mp3

Can jquery get the second url and print it to the page?

Thanks in advance and apologise if it's a dumb ques..

Bruce Prochnau
bkdesign 


Ce message Envoi est certifié sans virus connu.
Analyse effectuée par AVG.
Version: 7.5.467 / Base de données virus: 269.6.6/795 - Date: 9/05/2007
15:07
 



[jQuery] Re: get url?

2007-05-10 Thread BKDesign Solutions

Thanks Alex,

Unfortunately I don;t know enough to pull this off.
If anyone would like to contact me off list to give an estimate to create 
this please do.

I can use curl to get the header and the filename (location) mp3 shows 
there...getting the url.mp3 link to page has proven beyond me

Thanks again

Bruce Prochnau

- Original Message - 
From: Alexandre Plennevaux [EMAIL PROTECTED]
To: jquery-en@googlegroups.com
Sent: Thursday, May 10, 2007 6:16 AM
Subject: [jQuery] Re: get url?



Yes dear, use the Mathias' plugin getParams

http://www.mathias-bank.de/2007/04/21/jquery-plugin-geturlparam-version-2/


Your printable info will be:

$printed_link = $(a#link_id).getUrlParam(perma_link);




Hope this helps!!

alex

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of BKDesign Solutions
Sent: jeudi 10 mai 2007 1:37
To: jquery-en@googlegroups.com
Subject: [jQuery] get url?


I've been trying to do something in php and it dawned on me that jquery
would be much easier and better.

I have an auto generated link, which when one goes to it, its a redirect to
an mp3 file. (link broken to fit.
http://www.site.com/app/fetch.app?
feed_id=29308perma_link=
http://www.anothersite.com/our-designs.php

Redirect goes to
http://www.site.com/audio/b/k/d/e/1216578.mp3

Can jquery get the second url and print it to the page?

Thanks in advance and apologise if it's a dumb ques..

Bruce Prochnau
bkdesign


Ce message Envoi est certifié sans virus connu.
Analyse effectuée par AVG.
Version: 7.5.467 / Base de données virus: 269.6.6/795 - Date: 9/05/2007
15:07






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