Saturday 17 August 2013

Execute link then redirect again

Execute link then redirect again

i've got a mybb board where I provide a certain link, looking like this
<a href="/member.php?action=login&do=switch">Klick</a>
The link changes the session and reloads the page, so I need it executed
for the change in the session. However afterwards I would like to redirect
the user to another page like "/private.php"
I've already tried different versions of combining href and onclick but it
always takes me to the page stated in href, ignoring the onclick bit. So
my code looks somewhat like this:
<a href='/member.php?action=login&amp;do=switch&amp;uid={$others['uid']}'
onclick='window.location.href({$mybb->settings['bburl']}/private.php);'>Link</a>";
I must say I'm pretty much a noob when it comes to javascript so I would
need some help on that. I would like to solve this problem with javascript
or php, so no meta tags, please ;)
Any help and tips would be appreciated! Thank you in advance!
Senya

No comments:

Post a Comment