Welcome to WebmasterWorld Guest from 18.208.159.25

Forum Moderators: open

Message Too Old, No Replies

Posting Data with an onClick Field!

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

Junior Member

10+ Year Member

joined:May 7, 2008
posts:45
votes: 0


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]

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

Junior Member

10+ Year Member

joined:May 7, 2008
posts:45
votes: 0


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