[jQuery] Re: Back Button

2008-12-01 Thread OhNoMrBill

I found a way to work with Klaus's plugin. But, one problem has come
up.

My URLS work - and look like this:

a href=/Alfredo title=Alfredo class=remote
onclick=$.Content_SearchTag('Pasta','Alfredo');Alfredo/a

However, the destination behind this link also has similar links on
it. When it is delivered into the proper div area on the layout, the
links that come with it replace the page instead if staying scoped in
the div.

I did try calling $.ajaxHistory.initialize(); again after the div is
loaded. No impact. Anyone have any ideas/experience on that? The
examples on Klaus's site do not have sublinks.

Thanks much!

On Nov 26, 10:11 pm, Brian Cherne [EMAIL PROTECTED] wrote:
 Both history plug-ins apply the onclick logic for you.

 http://www.mikage.to/jquery/jquery_history.html
 With Mikage's history plug-in you'll need a pageload function (see the
 source code) and edit it according to the hash values of your anchor tags.
 I'd recommend replacing his if(hash) statement with a switch(hash) statement
 if you're going to be handling each hash differently. However, note in the
 off-course part of this thread another user mentioned having trouble with
 IE7 and Mikage's plug-in. YMMV.

 http://stilbuero.de/jquery/history/
 Klaus' more recent history plug-in looks much more like jQuery syntax. You
 target an anchor tag using regular old jQuery selectors and the .history
 method takes a function as its parameter. So an anchor tag like:

 a id=linkToHome href=#homeHome/a

 ...could be accessed using:
 $('#linkToHome').history( showHome() );

 Klaus' history plug-in also has a built in remote method that pulls the
 HTML file that is linked to in the anchor tag. You can use that if it works
 better in your situation.

 Good luck,
 Brian.



 On Wed, Nov 26, 2008 at 6:46 AM, OhNoMrBill [EMAIL PROTECTED] wrote:

  I am bounding this follow-on question up...thread kind of went off
  course.

  The bit about links makes sense; but then how do I bind the javacsript
  onclick functions to the links?

  On Nov 24, 5:29 am, OhNoMrBill [EMAIL PROTECTED] wrote:
   That makes sense; but then how do I bind the functions to the links?

   The functions represent a large block of black-boxed code that is an
   AJAX handler that pushes content into destination divs.

   On Nov 24, 2:52 am, Brian Cherne [EMAIL PROTECTED] wrote:

Take a look at the history plug-in page code again:
http://www.mikage.to/jquery/jquery_history.html

A really important concept to understand is that the history plug-in
  (any
history plug-in) is listening / watching for the URL to change. Any
  change
you want it to make going Back you will need to let it make going
Forward (and on click) as well. You basically relinquish control to
  the
history plug-in (actually to the pageload function if you're
  following the
example URL to the letter). It works like this:

- user clicks link with an #home href
- url changes to page.html#home
- history plug-in notices url change, calls pageload function
- pageload function does something based on home

- user clicks link with an #products href
- url changes to page.html#products
- history plug-in notices url change, calls pageload function
- pageload function does something based on products

- user clicks browser's Back button
- url changes to page.html#home
- history plug-in notices url change, calls pageload function
- pageload function does something based on home

- user clicks browser's Forward button
- url changes to page.html#products
- history plug-in notices url change, calls pageload function
- pageload function does something based on products

I hope this makes sense. You will need to:

1) remove the inline onclick for each of your links. That overrides the
history plug-in and you won't be able to work around it (cleanly).

2) make the href hash values different for each of your links.

So, instead of:
a href=# onclick=showHome()Home/a

You'll need something more like:
a href=#homeHome/a
a href=#productsProducts/a

I hope this helps.

Brian.

On Sun, Nov 23, 2008 at 10:51 PM, OhNoMrBill [EMAIL PROTECTED]
  wrote:

 Anyone have an ideal on this?

 On Nov 22, 8:15 pm, OhNoMrBill [EMAIL PROTECTED] wrote:
  I am in a real bind on this issue. Is anyone able to answer? Help
  would be greatly appreciated if you can!!

  On Nov 22, 10:50 am, OhNoMrBill [EMAIL PROTECTED] wrote:

   Here is the scenario I am trying to deal with currently:

   I have a link that looks like:

   a href=# onClick=$.Content_Home();Some Link/a

   All the url links in this site look like this...onclick
  overrides.

   What I need to do is ensure that when a user clicks back, the
  actual
   prior jQuery function is called, and not the entire page.

   I tried the history plugin, and can not seem to get it to pick
  this
   kind of thing 

[jQuery] Re: Back Button

2008-11-30 Thread OhNoMrBill

OK, I think most iof this makes sense. The one bit where there is a
gap for me is as follows:

We have both:

a id=linkToHome href=#homeHome/a

and

$('#linkToHome').history( showHome() );

Ho do I associate  showHome() with the link linkToHome in the
first place?

On Nov 26, 10:11 pm, Brian Cherne [EMAIL PROTECTED] wrote:
 Both history plug-ins apply the onclick logic for you.

 http://www.mikage.to/jquery/jquery_history.html
 With Mikage's history plug-in you'll need a pageload function (see the
 source code) and edit it according to the hash values of your anchor tags.
 I'd recommend replacing his if(hash) statement with a switch(hash) statement
 if you're going to be handling each hash differently. However, note in the
 off-course part of this thread another user mentioned having trouble with
 IE7 and Mikage's plug-in. YMMV.

 http://stilbuero.de/jquery/history/
 Klaus' more recent history plug-in looks much more like jQuery syntax. You
 target an anchor tag using regular old jQuery selectors and the .history
 method takes a function as its parameter. So an anchor tag like:

 a id=linkToHome href=#homeHome/a

 ...could be accessed using:
 $('#linkToHome').history( showHome() );

 Klaus' history plug-in also has a built in remote method that pulls the
 HTML file that is linked to in the anchor tag. You can use that if it works
 better in your situation.

 Good luck,
 Brian.



 On Wed, Nov 26, 2008 at 6:46 AM, OhNoMrBill [EMAIL PROTECTED] wrote:

  I am bounding this follow-on question up...thread kind of went off
  course.

  The bit about links makes sense; but then how do I bind the javacsript
  onclick functions to the links?

  On Nov 24, 5:29 am, OhNoMrBill [EMAIL PROTECTED] wrote:
   That makes sense; but then how do I bind the functions to the links?

   The functions represent a large block of black-boxed code that is an
   AJAX handler that pushes content into destination divs.

   On Nov 24, 2:52 am, Brian Cherne [EMAIL PROTECTED] wrote:

Take a look at the history plug-in page code again:
http://www.mikage.to/jquery/jquery_history.html

A really important concept to understand is that the history plug-in
  (any
history plug-in) is listening / watching for the URL to change. Any
  change
you want it to make going Back you will need to let it make going
Forward (and on click) as well. You basically relinquish control to
  the
history plug-in (actually to the pageload function if you're
  following the
example URL to the letter). It works like this:

- user clicks link with an #home href
- url changes to page.html#home
- history plug-in notices url change, calls pageload function
- pageload function does something based on home

- user clicks link with an #products href
- url changes to page.html#products
- history plug-in notices url change, calls pageload function
- pageload function does something based on products

- user clicks browser's Back button
- url changes to page.html#home
- history plug-in notices url change, calls pageload function
- pageload function does something based on home

- user clicks browser's Forward button
- url changes to page.html#products
- history plug-in notices url change, calls pageload function
- pageload function does something based on products

I hope this makes sense. You will need to:

1) remove the inline onclick for each of your links. That overrides the
history plug-in and you won't be able to work around it (cleanly).

2) make the href hash values different for each of your links.

So, instead of:
a href=# onclick=showHome()Home/a

You'll need something more like:
a href=#homeHome/a
a href=#productsProducts/a

I hope this helps.

Brian.

On Sun, Nov 23, 2008 at 10:51 PM, OhNoMrBill [EMAIL PROTECTED]
  wrote:

 Anyone have an ideal on this?

 On Nov 22, 8:15 pm, OhNoMrBill [EMAIL PROTECTED] wrote:
  I am in a real bind on this issue. Is anyone able to answer? Help
  would be greatly appreciated if you can!!

  On Nov 22, 10:50 am, OhNoMrBill [EMAIL PROTECTED] wrote:

   Here is the scenario I am trying to deal with currently:

   I have a link that looks like:

   a href=# onClick=$.Content_Home();Some Link/a

   All the url links in this site look like this...onclick
  overrides.

   What I need to do is ensure that when a user clicks back, the
  actual
   prior jQuery function is called, and not the entire page.

   I tried the history plugin, and can not seem to get it to pick
  this
   kind of thing up. Anyone with direct experience on this kind of
  thing,
   please chime in with some suggestions.- Hide quoted text -

  - Show quoted text -- Hide quoted text -

- Show quoted text -- Hide quoted text -

   - Show quoted text -- Hide quoted text -

 - Show quoted text -


[jQuery] Re: Back Button

2008-11-26 Thread OhNoMrBill

I am bounding this follow-on question up...thread kind of went off
course.

The bit about links makes sense; but then how do I bind the javacsript
onclick functions to the links?


On Nov 24, 5:29 am, OhNoMrBill [EMAIL PROTECTED] wrote:
 That makes sense; but then how do I bind the functions to the links?

 The functions represent a large block of black-boxed code that is an
 AJAX handler that pushes content into destination divs.

 On Nov 24, 2:52 am, Brian Cherne [EMAIL PROTECTED] wrote:



  Take a look at the history plug-in page code again:
  http://www.mikage.to/jquery/jquery_history.html

  A really important concept to understand is that the history plug-in (any
  history plug-in) is listening / watching for the URL to change. Any change
  you want it to make going Back you will need to let it make going
  Forward (and on click) as well. You basically relinquish control to the
  history plug-in (actually to the pageload function if you're following the
  example URL to the letter). It works like this:

  - user clicks link with an #home href
  - url changes to page.html#home
  - history plug-in notices url change, calls pageload function
  - pageload function does something based on home

  - user clicks link with an #products href
  - url changes to page.html#products
  - history plug-in notices url change, calls pageload function
  - pageload function does something based on products

  - user clicks browser's Back button
  - url changes to page.html#home
  - history plug-in notices url change, calls pageload function
  - pageload function does something based on home

  - user clicks browser's Forward button
  - url changes to page.html#products
  - history plug-in notices url change, calls pageload function
  - pageload function does something based on products

  I hope this makes sense. You will need to:

  1) remove the inline onclick for each of your links. That overrides the
  history plug-in and you won't be able to work around it (cleanly).

  2) make the href hash values different for each of your links.

  So, instead of:
  a href=# onclick=showHome()Home/a

  You'll need something more like:
  a href=#homeHome/a
  a href=#productsProducts/a

  I hope this helps.

  Brian.

  On Sun, Nov 23, 2008 at 10:51 PM, OhNoMrBill [EMAIL PROTECTED] wrote:

   Anyone have an ideal on this?

   On Nov 22, 8:15 pm, OhNoMrBill [EMAIL PROTECTED] wrote:
I am in a real bind on this issue. Is anyone able to answer? Help
would be greatly appreciated if you can!!

On Nov 22, 10:50 am, OhNoMrBill [EMAIL PROTECTED] wrote:

 Here is the scenario I am trying to deal with currently:

 I have a link that looks like:

 a href=# onClick=$.Content_Home();Some Link/a

 All the url links in this site look like this...onclick overrides.

 What I need to do is ensure that when a user clicks back, the actual
 prior jQuery function is called, and not the entire page.

 I tried the history plugin, and can not seem to get it to pick this
 kind of thing up. Anyone with direct experience on this kind of thing,
 please chime in with some suggestions.- Hide quoted text -

- Show quoted text -- Hide quoted text -

  - Show quoted text -- Hide quoted text -

 - Show quoted text -


[jQuery] Re: Back Button

2008-11-26 Thread Brian Cherne
Both history plug-ins apply the onclick logic for you.

http://www.mikage.to/jquery/jquery_history.html
With Mikage's history plug-in you'll need a pageload function (see the
source code) and edit it according to the hash values of your anchor tags.
I'd recommend replacing his if(hash) statement with a switch(hash) statement
if you're going to be handling each hash differently. However, note in the
off-course part of this thread another user mentioned having trouble with
IE7 and Mikage's plug-in. YMMV.

http://stilbuero.de/jquery/history/
Klaus' more recent history plug-in looks much more like jQuery syntax. You
target an anchor tag using regular old jQuery selectors and the .history
method takes a function as its parameter. So an anchor tag like:

a id=linkToHome href=#homeHome/a

...could be accessed using:
$('#linkToHome').history( showHome() );

Klaus' history plug-in also has a built in remote method that pulls the
HTML file that is linked to in the anchor tag. You can use that if it works
better in your situation.

Good luck,
Brian.


On Wed, Nov 26, 2008 at 6:46 AM, OhNoMrBill [EMAIL PROTECTED] wrote:


 I am bounding this follow-on question up...thread kind of went off
 course.

 The bit about links makes sense; but then how do I bind the javacsript
 onclick functions to the links?


 On Nov 24, 5:29 am, OhNoMrBill [EMAIL PROTECTED] wrote:
  That makes sense; but then how do I bind the functions to the links?
 
  The functions represent a large block of black-boxed code that is an
  AJAX handler that pushes content into destination divs.
 
  On Nov 24, 2:52 am, Brian Cherne [EMAIL PROTECTED] wrote:
 
 
 
   Take a look at the history plug-in page code again:
   http://www.mikage.to/jquery/jquery_history.html
 
   A really important concept to understand is that the history plug-in
 (any
   history plug-in) is listening / watching for the URL to change. Any
 change
   you want it to make going Back you will need to let it make going
   Forward (and on click) as well. You basically relinquish control to
 the
   history plug-in (actually to the pageload function if you're
 following the
   example URL to the letter). It works like this:
 
   - user clicks link with an #home href
   - url changes to page.html#home
   - history plug-in notices url change, calls pageload function
   - pageload function does something based on home
 
   - user clicks link with an #products href
   - url changes to page.html#products
   - history plug-in notices url change, calls pageload function
   - pageload function does something based on products
 
   - user clicks browser's Back button
   - url changes to page.html#home
   - history plug-in notices url change, calls pageload function
   - pageload function does something based on home
 
   - user clicks browser's Forward button
   - url changes to page.html#products
   - history plug-in notices url change, calls pageload function
   - pageload function does something based on products
 
   I hope this makes sense. You will need to:
 
   1) remove the inline onclick for each of your links. That overrides the
   history plug-in and you won't be able to work around it (cleanly).
 
   2) make the href hash values different for each of your links.
 
   So, instead of:
   a href=# onclick=showHome()Home/a
 
   You'll need something more like:
   a href=#homeHome/a
   a href=#productsProducts/a
 
   I hope this helps.
 
   Brian.
 
   On Sun, Nov 23, 2008 at 10:51 PM, OhNoMrBill [EMAIL PROTECTED]
 wrote:
 
Anyone have an ideal on this?
 
On Nov 22, 8:15 pm, OhNoMrBill [EMAIL PROTECTED] wrote:
 I am in a real bind on this issue. Is anyone able to answer? Help
 would be greatly appreciated if you can!!
 
 On Nov 22, 10:50 am, OhNoMrBill [EMAIL PROTECTED] wrote:
 
  Here is the scenario I am trying to deal with currently:
 
  I have a link that looks like:
 
  a href=# onClick=$.Content_Home();Some Link/a
 
  All the url links in this site look like this...onclick
 overrides.
 
  What I need to do is ensure that when a user clicks back, the
 actual
  prior jQuery function is called, and not the entire page.
 
  I tried the history plugin, and can not seem to get it to pick
 this
  kind of thing up. Anyone with direct experience on this kind of
 thing,
  please chime in with some suggestions.- Hide quoted text -
 
 - Show quoted text -- Hide quoted text -
 
   - Show quoted text -- Hide quoted text -
 
  - Show quoted text -



[jQuery] Re: Back Button

2008-11-24 Thread Brian Cherne
Take a look at the history plug-in page code again:
http://www.mikage.to/jquery/jquery_history.html

A really important concept to understand is that the history plug-in (any
history plug-in) is listening / watching for the URL to change. Any change
you want it to make going Back you will need to let it make going
Forward (and on click) as well. You basically relinquish control to the
history plug-in (actually to the pageload function if you're following the
example URL to the letter). It works like this:

- user clicks link with an #home href
- url changes to page.html#home
- history plug-in notices url change, calls pageload function
- pageload function does something based on home

- user clicks link with an #products href
- url changes to page.html#products
- history plug-in notices url change, calls pageload function
- pageload function does something based on products

- user clicks browser's Back button
- url changes to page.html#home
- history plug-in notices url change, calls pageload function
- pageload function does something based on home

- user clicks browser's Forward button
- url changes to page.html#products
- history plug-in notices url change, calls pageload function
- pageload function does something based on products

I hope this makes sense. You will need to:

1) remove the inline onclick for each of your links. That overrides the
history plug-in and you won't be able to work around it (cleanly).

2) make the href hash values different for each of your links.

So, instead of:
a href=# onclick=showHome()Home/a

You'll need something more like:
a href=#homeHome/a
a href=#productsProducts/a

I hope this helps.

Brian.


On Sun, Nov 23, 2008 at 10:51 PM, OhNoMrBill [EMAIL PROTECTED] wrote:


 Anyone have an ideal on this?

 On Nov 22, 8:15 pm, OhNoMrBill [EMAIL PROTECTED] wrote:
  I am in a real bind on this issue. Is anyone able to answer? Help
  would be greatly appreciated if you can!!
 
  On Nov 22, 10:50 am, OhNoMrBill [EMAIL PROTECTED] wrote:
 
 
 
   Here is the scenario I am trying to deal with currently:
 
   I have a link that looks like:
 
   a href=# onClick=$.Content_Home();Some Link/a
 
   All the url links in this site look like this...onclick overrides.
 
   What I need to do is ensure that when a user clicks back, the actual
   prior jQuery function is called, and not the entire page.
 
   I tried the history plugin, and can not seem to get it to pick this
   kind of thing up. Anyone with direct experience on this kind of thing,
   please chime in with some suggestions.- Hide quoted text -
 
  - Show quoted text -



[jQuery] Re: Back Button

2008-11-24 Thread OhNoMrBill

That makes sense; but then how do I bind the functions to the links?

The functions represent a large block of black-boxed code that is an
AJAX handler that pushes content into destination divs.


On Nov 24, 2:52 am, Brian Cherne [EMAIL PROTECTED] wrote:
 Take a look at the history plug-in page code again:
 http://www.mikage.to/jquery/jquery_history.html

 A really important concept to understand is that the history plug-in (any
 history plug-in) is listening / watching for the URL to change. Any change
 you want it to make going Back you will need to let it make going
 Forward (and on click) as well. You basically relinquish control to the
 history plug-in (actually to the pageload function if you're following the
 example URL to the letter). It works like this:

 - user clicks link with an #home href
 - url changes to page.html#home
 - history plug-in notices url change, calls pageload function
 - pageload function does something based on home

 - user clicks link with an #products href
 - url changes to page.html#products
 - history plug-in notices url change, calls pageload function
 - pageload function does something based on products

 - user clicks browser's Back button
 - url changes to page.html#home
 - history plug-in notices url change, calls pageload function
 - pageload function does something based on home

 - user clicks browser's Forward button
 - url changes to page.html#products
 - history plug-in notices url change, calls pageload function
 - pageload function does something based on products

 I hope this makes sense. You will need to:

 1) remove the inline onclick for each of your links. That overrides the
 history plug-in and you won't be able to work around it (cleanly).

 2) make the href hash values different for each of your links.

 So, instead of:
 a href=# onclick=showHome()Home/a

 You'll need something more like:
 a href=#homeHome/a
 a href=#productsProducts/a

 I hope this helps.

 Brian.



 On Sun, Nov 23, 2008 at 10:51 PM, OhNoMrBill [EMAIL PROTECTED] wrote:

  Anyone have an ideal on this?

  On Nov 22, 8:15 pm, OhNoMrBill [EMAIL PROTECTED] wrote:
   I am in a real bind on this issue. Is anyone able to answer? Help
   would be greatly appreciated if you can!!

   On Nov 22, 10:50 am, OhNoMrBill [EMAIL PROTECTED] wrote:

Here is the scenario I am trying to deal with currently:

I have a link that looks like:

a href=# onClick=$.Content_Home();Some Link/a

All the url links in this site look like this...onclick overrides.

What I need to do is ensure that when a user clicks back, the actual
prior jQuery function is called, and not the entire page.

I tried the history plugin, and can not seem to get it to pick this
kind of thing up. Anyone with direct experience on this kind of thing,
please chime in with some suggestions.- Hide quoted text -

   - Show quoted text -- Hide quoted text -

 - Show quoted text -


[jQuery] Re: Back Button

2008-11-24 Thread aymen bentaleb

i've tried this plugin and i got a problem on running with IE7.
i've posted this as a request beacause i'find the same problem as another user
here is my post http://plugins.jquery.com/node/2472
Can anyone helps thanks

2008/11/24, OhNoMrBill [EMAIL PROTECTED]:

 That makes sense; but then how do I bind the functions to the links?

 The functions represent a large block of black-boxed code that is an
 AJAX handler that pushes content into destination divs.


 On Nov 24, 2:52 am, Brian Cherne [EMAIL PROTECTED] wrote:
 Take a look at the history plug-in page code again:
 http://www.mikage.to/jquery/jquery_history.html

 A really important concept to understand is that the history plug-in (any
 history plug-in) is listening / watching for the URL to change. Any change
 you want it to make going Back you will need to let it make going
 Forward (and on click) as well. You basically relinquish control to the
 history plug-in (actually to the pageload function if you're following
 the
 example URL to the letter). It works like this:

 - user clicks link with an #home href
 - url changes to page.html#home
 - history plug-in notices url change, calls pageload function
 - pageload function does something based on home

 - user clicks link with an #products href
 - url changes to page.html#products
 - history plug-in notices url change, calls pageload function
 - pageload function does something based on products

 - user clicks browser's Back button
 - url changes to page.html#home
 - history plug-in notices url change, calls pageload function
 - pageload function does something based on home

 - user clicks browser's Forward button
 - url changes to page.html#products
 - history plug-in notices url change, calls pageload function
 - pageload function does something based on products

 I hope this makes sense. You will need to:

 1) remove the inline onclick for each of your links. That overrides the
 history plug-in and you won't be able to work around it (cleanly).

 2) make the href hash values different for each of your links.

 So, instead of:
 a href=# onclick=showHome()Home/a

 You'll need something more like:
 a href=#homeHome/a
 a href=#productsProducts/a

 I hope this helps.

 Brian.



 On Sun, Nov 23, 2008 at 10:51 PM, OhNoMrBill [EMAIL PROTECTED] wrote:

  Anyone have an ideal on this?

  On Nov 22, 8:15 pm, OhNoMrBill [EMAIL PROTECTED] wrote:
   I am in a real bind on this issue. Is anyone able to answer? Help
   would be greatly appreciated if you can!!

   On Nov 22, 10:50 am, OhNoMrBill [EMAIL PROTECTED] wrote:

Here is the scenario I am trying to deal with currently:

I have a link that looks like:

a href=# onClick=$.Content_Home();Some Link/a

All the url links in this site look like this...onclick overrides.

What I need to do is ensure that when a user clicks back, the actual
prior jQuery function is called, and not the entire page.

I tried the history plugin, and can not seem to get it to pick this
kind of thing up. Anyone with direct experience on this kind of
thing,
please chime in with some suggestions.- Hide quoted text -

   - Show quoted text -- Hide quoted text -

 - Show quoted text -


[jQuery] Re: Back Button

2008-11-24 Thread Brian Cherne
My previous Google search looks to have pulled the wrong history plug-in.
Try this one from Klaus Hartl. He writes good code and it looks more recent.
http://stilbuero.de/jquery/history/

Brian.


On Mon, Nov 24, 2008 at 6:44 AM, aymen bentaleb [EMAIL PROTECTED]wrote:


 i've tried this plugin and i got a problem on running with IE7.
 i've posted this as a request beacause i'find the same problem as another
 user
 here is my post http://plugins.jquery.com/node/2472
 Can anyone helps thanks

 2008/11/24, OhNoMrBill [EMAIL PROTECTED]:
 
  That makes sense; but then how do I bind the functions to the links?
 
  The functions represent a large block of black-boxed code that is an
  AJAX handler that pushes content into destination divs.
 
 
  On Nov 24, 2:52 am, Brian Cherne [EMAIL PROTECTED] wrote:
  Take a look at the history plug-in page code again:
  http://www.mikage.to/jquery/jquery_history.html
 
  A really important concept to understand is that the history plug-in
 (any
  history plug-in) is listening / watching for the URL to change. Any
 change
  you want it to make going Back you will need to let it make going
  Forward (and on click) as well. You basically relinquish control to
 the
  history plug-in (actually to the pageload function if you're following
  the
  example URL to the letter). It works like this:
 
  - user clicks link with an #home href
  - url changes to page.html#home
  - history plug-in notices url change, calls pageload function
  - pageload function does something based on home
 
  - user clicks link with an #products href
  - url changes to page.html#products
  - history plug-in notices url change, calls pageload function
  - pageload function does something based on products
 
  - user clicks browser's Back button
  - url changes to page.html#home
  - history plug-in notices url change, calls pageload function
  - pageload function does something based on home
 
  - user clicks browser's Forward button
  - url changes to page.html#products
  - history plug-in notices url change, calls pageload function
  - pageload function does something based on products
 
  I hope this makes sense. You will need to:
 
  1) remove the inline onclick for each of your links. That overrides the
  history plug-in and you won't be able to work around it (cleanly).
 
  2) make the href hash values different for each of your links.
 
  So, instead of:
  a href=# onclick=showHome()Home/a
 
  You'll need something more like:
  a href=#homeHome/a
  a href=#productsProducts/a
 
  I hope this helps.
 
  Brian.
 
 
 
  On Sun, Nov 23, 2008 at 10:51 PM, OhNoMrBill [EMAIL PROTECTED]
 wrote:
 
   Anyone have an ideal on this?
 
   On Nov 22, 8:15 pm, OhNoMrBill [EMAIL PROTECTED] wrote:
I am in a real bind on this issue. Is anyone able to answer? Help
would be greatly appreciated if you can!!
 
On Nov 22, 10:50 am, OhNoMrBill [EMAIL PROTECTED] wrote:
 
 Here is the scenario I am trying to deal with currently:
 
 I have a link that looks like:
 
 a href=# onClick=$.Content_Home();Some Link/a
 
 All the url links in this site look like this...onclick overrides.
 
 What I need to do is ensure that when a user clicks back, the
 actual
 prior jQuery function is called, and not the entire page.
 
 I tried the history plugin, and can not seem to get it to pick
 this
 kind of thing up. Anyone with direct experience on this kind of
 thing,
 please chime in with some suggestions.- Hide quoted text -
 
- Show quoted text -- Hide quoted text -
 
  - Show quoted text -



[jQuery] Re: Back Button

2008-11-23 Thread OhNoMrBill

Anyone have an ideal on this?

On Nov 22, 8:15 pm, OhNoMrBill [EMAIL PROTECTED] wrote:
 I am in a real bind on this issue. Is anyone able to answer? Help
 would be greatly appreciated if you can!!

 On Nov 22, 10:50 am, OhNoMrBill [EMAIL PROTECTED] wrote:



  Here is the scenario I am trying to deal with currently:

  I have a link that looks like:

  a href=# onClick=$.Content_Home();Some Link/a

  All the url links in this site look like this...onclick overrides.

  What I need to do is ensure that when a user clicks back, the actual
  prior jQuery function is called, and not the entire page.

  I tried the history plugin, and can not seem to get it to pick this
  kind of thing up. Anyone with direct experience on this kind of thing,
  please chime in with some suggestions.- Hide quoted text -

 - Show quoted text -


[jQuery] Re: Back Button

2008-11-22 Thread OhNoMrBill

I am in a real bind on this issue. Is anyone able to answer? Help
would be greatly appreciated if you can!!

On Nov 22, 10:50 am, OhNoMrBill [EMAIL PROTECTED] wrote:
 Here is the scenario I am trying to deal with currently:

 I have a link that looks like:

 a href=# onClick=$.Content_Home();Some Link/a

 All the url links in this site look like this...onclick overrides.

 What I need to do is ensure that when a user clicks back, the actual
 prior jQuery function is called, and not the entire page.

 I tried the history plugin, and can not seem to get it to pick this
 kind of thing up. Anyone with direct experience on this kind of thing,
 please chime in with some suggestions.


[jQuery] Re: Back Button Clears Form

2008-01-27 Thread frizzle

Maybe slightly off-topic, but do you know a way to succesfully use
History/Remote while firing the events with links that are actually
inside the DIV which content's gets replaced?

Haven't been able sofar to find the answer...

Thanks,
Frizzle.



On 25 jan, 20:57, cfdvlpr [EMAIL PROTECTED] wrote:
 the history remote plugin might be what you need.

 On Jan 25, 5:42 am, Jamie [EMAIL PROTECTED] wrote:



  Hey,

  After starting to use jQuery, I've found the back button on my browser
  no longer remembers the values in my forms.  The user has to re-enter
  everything if they accidentally move past a page and wish to go back.
  Is there any way I can get the page to keep it's state?

  Thanks!
  Jamie Goodfellow- Tekst uit oorspronkelijk bericht niet weergeven -

 - Tekst uit oorspronkelijk bericht weergeven -


[jQuery] Re: Back Button Clears Form

2008-01-25 Thread cfdvlpr

the history remote plugin might be what you need.

On Jan 25, 5:42 am, Jamie [EMAIL PROTECTED] wrote:
 Hey,

 After starting to use jQuery, I've found the back button on my browser
 no longer remembers the values in my forms.  The user has to re-enter
 everything if they accidentally move past a page and wish to go back.
 Is there any way I can get the page to keep it's state?

 Thanks!
 Jamie Goodfellow


[jQuery] Re: Back Button Control and History Plugin

2007-08-10 Thread cfdvlpr

Glad to see I'm ot the only one.  I'd still love to see a more complex
example!



[jQuery] Re: Back Button Control and History Plugin

2007-08-10 Thread Benjamin Sterling
I am using the history plug in on this site:
http://airplume.informationexperts.com/, it pop open an new window when you
enter the module, but the url is
http://airplume.informationexperts.com/module.htm#m-1000 (it needs the log
in tho, just your first and last name in a cookie)

The structure is something like:

module - (1000) lesson - (first 0)  topic -  (second 0) page - (last 0)

#m-1000-0-0

Not sure if you will get any more complex then the above example.

On 8/10/07, cfdvlpr [EMAIL PROTECTED] wrote:


 Glad to see I'm ot the only one.  I'd still love to see a more complex
 example!




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


[jQuery] Re: Back Button Control and History Plugin

2007-08-10 Thread cfdvlpr

I've got this working pretty good right now, but there's one thing I
can't get right.
I notice in Firebug that the url is loading correctly, but when I look
at the url in the address bar of my browser, this url gets long and is
not right.  I'm not sure how to fix this.  Here's my code if anyone
can spot my error and help me out:


$(document).ready(function() {
$.historyInit(pageload);

$([EMAIL PROTECTED]'history']).click(function(){
l = $(this);
var hash = l.attr('hrf');
hash = hash.replace(/^.*?/, '');
hash = hash.replace('?','-');
$.historyLoad(hash.replace('##','?'));
return false;
});
});
function pageload(hash) {
if(hash) {
hs = hash.replace(/^.*\?/,'');
var sArr = hs.split('-');
h = {};
for(i=0;isArr.length;i++){
h[sArr[i].split('.')[0]] = sArr[i].split('.')[1];
}
$(##load).load(hash);
}
else {
$(##load).empty();
}
}

FYI, I have two ##'s where there would normally be only one # because
this is in a Coldfusion page...



[jQuery] Re: Back Button Control and History Plugin

2007-08-07 Thread Joe

I am having the same issue.  Does anyone have a more complex
example?


On Aug 1, 4:59 pm, cfdvlpr [EMAIL PROTECTED] wrote:
 I'm struggling to implement back button control.  I've got several
 buttons, variables, divs, and a large json array holding product data
 that I need store in thehistoryevery time a button is clicked.  The
 demo for thehistorypluginis very simple and it doesn't show how to
 do anything as complicated as what I need to do.  Has anyone else
 already gone through this and can show me a more complicated working
 example from which I can learn?  I'd appreciate that very much.  By
 the way, I just got the LearningJquery book today in the mail from
 Amazon and if there's anything in the book that you can point me too
 that is related to this, please point me to the right page(s).