I have a link on my page that id like to click with the below javascript function, but it isnt working. What I am really trying to do is use php to echo out a preclicked link. I think I have used the right function $(selector).click(), but I dont know where to put the link. I dont want to echo out the link, just the alert message. The link is actually a thickbox alert message, that is only able to be clicked on. I was hoping that i could use the .click() to activate it via php. thanks
<?php
echo "
<script type='text/javascript'>$('#link').click();</script>
<a href='wronginput.php?height=40&width=80' id='link' class='thickbox'>Link text</a>";
?>