call mac function through webpage [debug]