Forum Moderators: open

Message Too Old, No Replies

Posting Data with an onClick Field!

         

Spiceydog

10:55 pm on May 13, 2008 (gmt 0)

10+ Year Member



I have a link that is returned using PHP but I want the link to post data using javascript to the next page using an onClick! That's a mouthful... Anyway here is what I have so far:
$name = '<a href=\'http://www.example.com/school/output.php\' onclick=\'post.searchname.value='.$data['name'].'\'>'.$data['name'].'</a>';

I believe the problem is the post.searchname.value part.. I don't think that is valid javascript.. Anyone?

Thanks in advance!

[edited by: engine at 7:56 am (utc) on May 14, 2008]
[edit reason] examplified [/edit]

Spiceydog

2:25 am on May 16, 2008 (gmt 0)

10+ Year Member



anyone...................?