The forum of the forums

Would you like to react to this message? Create an account in a few clicks or log in to continue.
The forum of the forums
2 posters

    Userlink on Menu

    avatar
    ashik4u
    Forumember


    Male Posts : 168
    Reputation : 2
    Language : Bengali, English
    Location : Dhaka, Bangladesh

    Userlink on Menu Empty Userlink on Menu

    Post by ashik4u October 8th 2015, 3:55 pm

    Hello,
    I want to make menu where will be the logged user link. After clicking the link, it will redirect him to his/her account

    Code:
    <a href="USERLINK VALUE">My Account</a>
    Zed is Not Dead
    Zed is Not Dead
    Forumember


    Posts : 257
    Reputation : 28
    Language : English

    Userlink on Menu Empty Re: Userlink on Menu

    Post by Zed is Not Dead October 8th 2015, 4:07 pm

    so a switch account kind of situation?

    try this:

    Code:
    <div align="center">
               <script type="text/javascript">function switch_accounts() {jQuery.get(document.getElementById('logout').href, function() {jQuery.post('/login', 'login=1&username='+document.getElementById('switch_uname').value+'&password='+document.getElementById('switch_pass').value, function () {window.location.reload();});});}</script><img src="image url here" />        <input id="switch_uname" type="text" /><br /><input id="switch_pass" type="password" /><br /><input type="button" value="Switch Accounts" onclick="switch_accounts();" />
    </div>
    avatar
    ashik4u
    Forumember


    Male Posts : 168
    Reputation : 2
    Language : Bengali, English
    Location : Dhaka, Bangladesh

    Userlink on Menu Empty Re: Userlink on Menu

    Post by ashik4u October 8th 2015, 4:11 pm

    Zed is Not Dead wrote:so a switch account kind of situation?

    try this:

    Code:
    <div align="center">
               <script type="text/javascript">function switch_accounts() {jQuery.get(document.getElementById('logout').href, function() {jQuery.post('/login', 'login=1&username='+document.getElementById('switch_uname').value+'&password='+document.getElementById('switch_pass').value, function () {window.location.reload();});});}</script><img src="image url here" />        <input id="switch_uname" type="text" /><br /><input id="switch_pass" type="password" /><br /><input type="button" value="Switch Accounts" onclick="switch_accounts();" />
    </div>

    what will be the code for this function
    Code:
    <div class="categories online_menu" onMouseOver="fnShowMenu('Online');"><a href="#">My Account</a></div>
             
    Zed is Not Dead
    Zed is Not Dead
    Forumember


    Posts : 257
    Reputation : 28
    Language : English

    Userlink on Menu Empty Re: Userlink on Menu

    Post by Zed is Not Dead October 8th 2015, 4:14 pm

    That one I have no idea about, maybe ange can help
    avatar
    ashik4u
    Forumember


    Male Posts : 168
    Reputation : 2
    Language : Bengali, English
    Location : Dhaka, Bangladesh

    Userlink on Menu Empty Re: Userlink on Menu

    Post by ashik4u October 8th 2015, 4:31 pm

    May be this thread belongs to "Scripts (Coding) Problem" forum. Sorry Sad

    @Ange Tuteur help plz

      Current date/time is November 13th 2024, 8:22 pm