website Favorites

By concrete - March 7, 2010

How can forward the user to a page after the favorite has been added.

Re: [Dave] website Favorites

By concrete - March 8, 2010

I just need to redirect it when it is added.

Re: [concrete] website Favorites

By Dave - March 10, 2010

Ok, this isn't possible right now. But I'm going to look into it further and see if I can come up with a simple way to do it. Stay tuned.
Dave Edis - Senior Developer
interactivetools.com

Re: [concrete] website Favorites

By Dave - March 15, 2010

Hi concrete,

I tried a few things, but I think the the simplest way to add a redirect on add right now is to modify the websiteFavorites.js file that comes with the plugin and add this line in red:

//
function wsf_add(tableOrTag, recordNum, reload) {
var $ = jQuery; // see: http://docs.jquery.com/Core/jQuery.noConflict
var addClass = _wsf_getClassFor(tableOrTag, recordNum, 'add');
var removeClass = _wsf_getClassFor(tableOrTag, recordNum, 'remove');

$.ajax({
url: '?_wsf_action=add&tableOrTag=' +escape(tableOrTag)+ '&recordNum=' + escape(recordNum),
success: function(errorMessage){
if (errorMessage) { return alert("Error: " + errorMessage); }
if (reload == true) { return window.location.reload(); }

$(addClass).hide();
$(removeClass).show();

window.location = "http://www.google.com/";

return true;
}
});

}


Hope that helps. Let me know if that works for you.
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] website Favorites


Hi

Thanks for that!




Thanks and regards