squiblo Posted January 21, 2010 Share Posted January 21, 2010 <?php $about_me_query = mysql_query("SELECT * FROM page_set_data WHERE username='$username'"); while ($row = mysql_fetch_assoc($about_me_query)) { $about_me = $row['about_me']; } if (!$about_me) { $about_me = ""; $nothing = "Write about yourself"; } ?> <script type="text/javascript"> function toggle_visibility(id) { var div = document.getElementById(id); var text = document.getElementById("about_me_text"); if(div.style.display == 'block' ) { div.style.display = 'none'; text.innerHTML = "<?php echo $nothing.$about_me; ?>"; } else { div.style.display = 'block'; text.innerHTML = "<?php echo $about_error; ?><form action='' method='POST'><textarea cols='23' rows='6' name='textarea_about' id='textarea_about' style='font-family:arial;font-size:13px;overflow:hidden'><?php echo "$about_me";?></textarea><br><input type='submit' name='submit_about' value='Save'> <input type='button' name='cancel_about' value='Cancel' onClick=\"window.location.href='content.php?content=myhub&myhub=mypage&mypage=mypage&cont=<?php echo $cont; ?>'\"></form>"; } } </script> Whenever the variable name "$about_me" has any tags in it, the following like does not work... <a href='#' onclick="toggle_visibility('about_me_popup');"><font color='CornflowerBlue'>Edit</font></a> What am i doing wrong? Thanks Link to comment https://forums.phpfreaks.com/topic/189356-phpjava-problem/ Share on other sites More sharing options...
squiblo Posted January 21, 2010 Author Share Posted January 21, 2010 Whenever the variable name "$about_me" has any tags in it, the following like does not work... ***LINK*** Link to comment https://forums.phpfreaks.com/topic/189356-phpjava-problem/#findComment-999588 Share on other sites More sharing options...
squiblo Posted January 21, 2010 Author Share Posted January 21, 2010 slight change of plan..... please visit this link and explain why the user has to click "edit" twise before the text changes, if i can resolve this, i believe i could solve my problem above. www.squiblo.com/test.php thanks Link to comment https://forums.phpfreaks.com/topic/189356-phpjava-problem/#findComment-999622 Share on other sites More sharing options...
squiblo Posted January 21, 2010 Author Share Posted January 21, 2010 go to... www.squiblo.com/test.php to see my full problem Link to comment https://forums.phpfreaks.com/topic/189356-phpjava-problem/#findComment-999633 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.