Login to TimeTrex from another website

General support regarding TimeTrex, such as
configuring policies/taxes or processing payroll.
Post Reply
xrandr
Posts: 8
Joined: Tue Aug 05, 2014 5:31 am

Login to TimeTrex from another website

Post by xrandr »

Hello,

I am using the community edition of TimeTrex. I have a "landing page" i've created for my staff.

What i am looking to do is this:

Have the user click the launch button on my page. The php page I've created already stores the username and password.
I want to send this via post to timetrex and redirect the user to the main page that is normally loaded after they login to timetrex. I'm basically trying to bypass the timetrex login form (I don't want them to have to go to the timetrex url and login.)

How can I go about doing this?
Kendash
Posts: 12
Joined: Fri Aug 01, 2014 10:31 pm

Re: Login to TimeTrex from another website

Post by Kendash »

I am doing it using Javascript. Not sure how your landing page is set up but you could maybe modify it to use this. I am injecting this code and then invoking it in an HTML viewer.

Code: Select all

function LogIn() {
document.getElementById('user_name').value='login';
document.getElementById('password').value='password';
document.getElementById('login_btn').click()
}
Can also use the following to tell it to load a specific page, the following example loads TimeSheet:

Code: Select all

window.location.href = 'http://localhost:8085/interface/html5/#!m=TimeSheet';
Post Reply