cwizards Posted September 3, 2013 Share Posted September 3, 2013 I have been trying to build a list of items with an onClick event but the link keeps on formatting incorrectly! Can anyone advise how to correct this please.$name=$myrows->display_name; ="Fred Marshall"echo "<UL><li><a onclick=$('#searchUsers').val('$name');>$name</a></li></ul>";I have also triedecho "<UL><li><a onclick=$('#searchUsers').val('" . $name . "');>$name</a></li></ul>";with the same result :-<a marshall');="" onclick="$('#acf-field-owner').val('16837');$('#searchUsers').val('Fred">Fred Marshall</a>note the words Fred and Marshall are not together in the val() function! Quote Link to comment https://forums.phpfreaks.com/topic/281809-echo-to-screen-formatting-incorrectly/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.