ProDeusEtPatria
New Member
I have a login form (which opens in a jquery popup) that redirects after successful login back to the previous page.I would like to populate a hidden redirect input within this login form with the value of the clicked link url, ie:\[code\]<script type="text/javascript">$(function() { $("a.login").click(function() { if($(this).hasClass("selected")) { deselect(); } else { $(this).addClass("selected"); $(".pop").slideFadeToggle(function() { $("#email").focus(); }); } return false; }); $(".close").live('click', function() { deselect(); return false; });});$.fn.slideFadeToggle = function(easing, callback) { return this.animate({ opacity: 'toggle', height: 'toggle' }, "fast", easing, callback);};</script><form><input type="hidden" name="redirect_url" value="http://stackoverflow.com/questions/15850483/clicked_link_url" /></form><a href="http://stackoverflow.com/questions/15850483/clicked_link_url_1" class="login">Link 1</a><a href="http://stackoverflow.com/questions/15850483/clicked_link_url_2" class="login">Llink 2</a><a href="http://stackoverflow.com/questions/15850483/clicked_link_url_3" class="login">link 3</a>\[/code\]So if the user clicks link 3, the popup form opens and it's hidden redirect url value will be "clicked_link_url3".Thanks in advance.