jquery jeditable - refresh page after saving specific field

Hello,

I am using jQuery Jeditable plug-in for in-place editing.

http://www.appelsiini.net/projects/jeditable

In one website I have four different jeditable fields.

| title || value || value2 || value 3 || live link: a href $title.html |

I'd like to automatically refresh whole page after first field - Title is edited through Jeditable and clicked Save button. It is for last field - a href $title.html to be updated with new title value.

Code I am using is below.

Thanks for any ideas!

Cheers
Adam

$(".el_wrap .c2 p").editable("./core/save-title.php", { 
      indicator : "<img src='./images/indicator.gif'>",
      tooltip   : "Click to edit...",
      submit    : 'Save',		
});


// HTML just to be clear
<div class="el_wrap">
	<div class="c2">
		<p><? echo $row['title'] ?></p>
	</div>
	
	<div class="c1">
		<ul>
			<li><a href="./<? echo $row['title']; ?>.html">Products</a></li>
		</ul>
	</div>
</div>

Open in new window

Aidam-UnlimitedAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

racmail2001Commented:
can you try this?

$(".el_wrap .c2 p").editable("./core/save-title.php", {
      indicator : "<img src='./images/indicator.gif'>",
      tooltip   : "Click to edit...",
      submit    : 'Save',              
}).ready(function() {location.reload();
});

hope it helps
0
Aidam-UnlimitedAuthor Commented:
Hi, thanks but it is refreshing page in a loop without clicking anywhere...
0
racmail2001Commented:

make the save buton with an class of save

and try this one

$(".save").click(function(){location.reload();});

i think that it should have a delay also ... anyway the function to reload the page it's location.reload(); so the rest it's to figure aut how it should be linked in your code

hope it helps
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Aidam-UnlimitedAuthor Commented:
Many thanks to your suggestion I've done it exactly as I needed.

If anybody would like to see a solution:
$(".el_wrap .c2 p").editable("./core/save-title.php", { 
      indicator : "<img src='./images/indicator.gif'>",
      tooltip   : "Click to edit...",
     	submit  : 'Save',
		 cssclass : 'jedi',
		 callback : function() {
					location.reload();
     				}
  });

Open in new window

0
Aidam-UnlimitedAuthor Commented:
Thank you!!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JavaScript

From novice to tech pro — start learning today.