javascript not working, simplified for testing