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! Link to comment https://forums.phpfreaks.com/topic/281809-echo-to-screen-formatting-incorrectly/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.