jQuery: Change default active tab in borrower account page
Currently, the patron fines link in the staff interface links to: Eg., http://koha.testing.com/cgi-bin/koha/members/pay.pl?borrowernumber=611739 We're wondering if it's possible, through the magic of jQuery, to have it link to: http://koha.ncrl.org/cgi-bin/koha/members/boraccount.pl?borrowernumber=61173... I looked through the jQuery library and did not find anything that could be coaxed to do this -- the only tricky part would be grabbing the borrower number. I could figure out the rest. Thanks! -- Chad Roseburg Automation Dept. North Central Regional Library
This should work in theory, but my href.replace line isn't working: $( document ).ready(function() { var a = $("#menu a[href*='/cgi-bin/koha/members/pay.pl']"); var href = a.attr('href'); href.replace("pay", "boraccount"); a.attr('href', href ); }); Perhaps someone else can catch my error? If you get it to work, please add it to the jquery library! Kyle http://www.kylehall.info ByWater Solutions ( http://bywatersolutions.com ) Meadville Public Library ( http://www.meadvillelibrary.org ) Crawford County Federated Library System ( http://www.ccfls.org ) Mill Run Technology Solutions ( http://millruntech.com ) On Thu, Mar 19, 2015 at 7:17 PM, Chad Roseburg <croseburg@ncrl.org> wrote:
Currently, the patron fines link in the staff interface links to: Eg., http://koha.testing.com/cgi-bin/koha/members/pay.pl?borrowernumber=611739
We're wondering if it's possible, through the magic of jQuery, to have it link to:
http://koha.ncrl.org/cgi-bin/koha/members/boraccount.pl?borrowernumber=61173...
I looked through the jQuery library and did not find anything that could be coaxed to do this -- the only tricky part would be grabbing the borrower number. I could figure out the rest.
Thanks!
-- Chad Roseburg Automation Dept. North Central Regional Library _______________________________________________ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz http://lists.katipo.co.nz/mailman/listinfo/koha
href.replace("pay", "boraccount"); won't modify href Try with href = href.replace("pay", "boraccount"); This should work :) 2015-03-20 12:52 GMT+01:00 Kyle Hall <kyle.m.hall@gmail.com>:
This should work in theory, but my href.replace line isn't working:
$( document ).ready(function() { var a = $("#menu a[href*='/cgi-bin/koha/members/pay.pl']"); var href = a.attr('href'); href.replace("pay", "boraccount"); a.attr('href', href ); });
Perhaps someone else can catch my error?
If you get it to work, please add it to the jquery library!
Kyle
http://www.kylehall.info ByWater Solutions ( http://bywatersolutions.com ) Meadville Public Library ( http://www.meadvillelibrary.org ) Crawford County Federated Library System ( http://www.ccfls.org ) Mill Run Technology Solutions ( http://millruntech.com )
On Thu, Mar 19, 2015 at 7:17 PM, Chad Roseburg <croseburg@ncrl.org> wrote:
Currently, the patron fines link in the staff interface links to: Eg., http://koha.testing.com/cgi-bin/koha/members/pay.pl?borrowernumber=611739
We're wondering if it's possible, through the magic of jQuery, to have it link to:
http://koha.ncrl.org/cgi-bin/koha/members/boraccount.pl?borrowernumber=61173...
I looked through the jQuery library and did not find anything that could be coaxed to do this -- the only tricky part would be grabbing the borrower number. I could figure out the rest.
Thanks!
-- Chad Roseburg Automation Dept. North Central Regional Library _______________________________________________ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz http://lists.katipo.co.nz/mailman/listinfo/koha
_______________________________________________ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz http://lists.katipo.co.nz/mailman/listinfo/koha
Thanks Jonathan! http://www.kylehall.info ByWater Solutions ( http://bywatersolutions.com ) Meadville Public Library ( http://www.meadvillelibrary.org ) Crawford County Federated Library System ( http://www.ccfls.org ) Mill Run Technology Solutions ( http://millruntech.com ) On Fri, Mar 20, 2015 at 8:21 AM, Jonathan Druart < jonathan.druart@biblibre.com> wrote:
href.replace("pay", "boraccount"); won't modify href Try with href = href.replace("pay", "boraccount"); This should work :)
2015-03-20 12:52 GMT+01:00 Kyle Hall <kyle.m.hall@gmail.com>:
This should work in theory, but my href.replace line isn't working:
$( document ).ready(function() { var a = $("#menu a[href*='/cgi-bin/koha/members/pay.pl']"); var href = a.attr('href'); href.replace("pay", "boraccount"); a.attr('href', href ); });
Perhaps someone else can catch my error?
If you get it to work, please add it to the jquery library!
Kyle
http://www.kylehall.info ByWater Solutions ( http://bywatersolutions.com ) Meadville Public Library ( http://www.meadvillelibrary.org ) Crawford County Federated Library System ( http://www.ccfls.org ) Mill Run Technology Solutions ( http://millruntech.com )
On Thu, Mar 19, 2015 at 7:17 PM, Chad Roseburg <croseburg@ncrl.org> wrote:
Currently, the patron fines link in the staff interface links to: Eg.,
http://koha.testing.com/cgi-bin/koha/members/pay.pl?borrowernumber=611739
We're wondering if it's possible, through the magic of jQuery, to have
it
link to:
http://koha.ncrl.org/cgi-bin/koha/members/boraccount.pl?borrowernumber=61173...
I looked through the jQuery library and did not find anything that
could be
coaxed to do this -- the only tricky part would be grabbing the borrower number. I could figure out the rest.
Thanks!
-- Chad Roseburg Automation Dept. North Central Regional Library _______________________________________________ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz http://lists.katipo.co.nz/mailman/listinfo/koha
_______________________________________________ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz http://lists.katipo.co.nz/mailman/listinfo/koha
Thanks guys -- this is perfect! On Mar 20, 2015 11:42 AM, "Kyle Hall" <kyle.m.hall@gmail.com> wrote:
Thanks Jonathan!
http://www.kylehall.info ByWater Solutions ( http://bywatersolutions.com ) Meadville Public Library ( http://www.meadvillelibrary.org ) Crawford County Federated Library System ( http://www.ccfls.org ) Mill Run Technology Solutions ( http://millruntech.com )
On Fri, Mar 20, 2015 at 8:21 AM, Jonathan Druart < jonathan.druart@biblibre.com> wrote:
href.replace("pay", "boraccount"); won't modify href Try with href = href.replace("pay", "boraccount"); This should work :)
2015-03-20 12:52 GMT+01:00 Kyle Hall <kyle.m.hall@gmail.com>:
This should work in theory, but my href.replace line isn't working:
$( document ).ready(function() { var a = $("#menu a[href*='/cgi-bin/koha/members/pay.pl']"); var href = a.attr('href'); href.replace("pay", "boraccount"); a.attr('href', href ); });
Perhaps someone else can catch my error?
If you get it to work, please add it to the jquery library!
Kyle
http://www.kylehall.info ByWater Solutions ( http://bywatersolutions.com ) Meadville Public Library ( http://www.meadvillelibrary.org ) Crawford County Federated Library System ( http://www.ccfls.org ) Mill Run Technology Solutions ( http://millruntech.com )
On Thu, Mar 19, 2015 at 7:17 PM, Chad Roseburg <croseburg@ncrl.org> wrote:
Currently, the patron fines link in the staff interface links to: Eg.,
http://koha.testing.com/cgi-bin/koha/members/pay.pl?borrowernumber=611739
We're wondering if it's possible, through the magic of jQuery, to have
it
link to:
http://koha.ncrl.org/cgi-bin/koha/members/boraccount.pl?borrowernumber=61173...
I looked through the jQuery library and did not find anything that
could be
coaxed to do this -- the only tricky part would be grabbing the borrower number. I could figure out the rest.
Thanks!
-- Chad Roseburg Automation Dept. North Central Regional Library _______________________________________________ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz http://lists.katipo.co.nz/mailman/listinfo/koha
_______________________________________________ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz http://lists.katipo.co.nz/mailman/listinfo/koha
participants (3)
-
Chad Roseburg -
Jonathan Druart -
Kyle Hall