phpmonster Posted April 21, 2011 Share Posted April 21, 2011 how come this doesnt echo out on my page? supposed to be an ajax response: Trying to write a form tag to the #quantity div. script does get executed as it echoes test echo ' test'; echo '<script type="text/javascript">'; echo '$("#quantity").append(function(index, html) { '; echo 'return'; echo '<form name="f1" id="f1"><input name="f1" id="f_1" type="hidden" value="1235" /></form>'; echo ' });'; echo '</script>'; Quote Link to comment https://forums.phpfreaks.com/topic/234305-echo-jquery-in-php/ Share on other sites More sharing options...
Pikachu2000 Posted April 21, 2011 Share Posted April 21, 2011 It echos fine for me. Did you look at the html source to see if it's there? Quote Link to comment https://forums.phpfreaks.com/topic/234305-echo-jquery-in-php/#findComment-1204300 Share on other sites More sharing options...
phpmonster Posted April 21, 2011 Author Share Posted April 21, 2011 I keep looking in the code behind but nothing I dont get it? Does it write the entire form tag etc for you? Quote Link to comment https://forums.phpfreaks.com/topic/234305-echo-jquery-in-php/#findComment-1204301 Share on other sites More sharing options...
Pikachu2000 Posted April 21, 2011 Share Posted April 21, 2011 Yeah, this is what I get in the source: test<script type="text/javascript">$("#quantity").append(function(index, html) { return<form name="f1" id="f1"><input name="f1" id="f_1" type="hidden" value="1235" /></form> });</script> Quote Link to comment https://forums.phpfreaks.com/topic/234305-echo-jquery-in-php/#findComment-1204303 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.