yami007 Posted December 28, 2009 Share Posted December 28, 2009 sorry but i dont know what this bar is calld, that one which follows up along typing. i wrote my own little code for my forum, but i wonder how i can set the BAR to be anywhere i want .. thank you !! Quote Link to comment https://forums.phpfreaks.com/topic/186505-how-can-i-do-this/ Share on other sites More sharing options...
premiso Posted December 28, 2009 Share Posted December 28, 2009 To get the bar to be on whatever form element you want, it is .focus(); using javascript on a form element. It will set the focus to that item. Hope that helps. Quote Link to comment https://forums.phpfreaks.com/topic/186505-how-can-i-do-this/#findComment-984926 Share on other sites More sharing options...
yami007 Posted December 28, 2009 Author Share Posted December 28, 2009 ok i grasped it. but what i actually want is something like when user clicks on B that will be in the input so the bar should be inside & thank you !! Quote Link to comment https://forums.phpfreaks.com/topic/186505-how-can-i-do-this/#findComment-985026 Share on other sites More sharing options...
.josh Posted December 29, 2009 Share Posted December 29, 2009 well I think you are talking about the cursor/caret but can you please explain in more detail what you are trying to do? Quote Link to comment https://forums.phpfreaks.com/topic/186505-how-can-i-do-this/#findComment-985540 Share on other sites More sharing options...
yami007 Posted December 31, 2009 Author Share Posted December 31, 2009 well I think you are talking about the cursor/caret but can you please explain in more detail what you are trying to do? yes yes, that's what i am talking about, would you explain to me ?? Quote Link to comment https://forums.phpfreaks.com/topic/186505-how-can-i-do-this/#findComment-986387 Share on other sites More sharing options...
.josh Posted December 31, 2009 Share Posted December 31, 2009 uh, well that 2nd half of my sentence mentioned you explaining to me in more detail what you are wanting... Quote Link to comment https://forums.phpfreaks.com/topic/186505-how-can-i-do-this/#findComment-986439 Share on other sites More sharing options...
yami007 Posted December 31, 2009 Author Share Posted December 31, 2009 uh, well that 2nd half of my sentence mentioned you[ explaining to me in more detail what you are wanting... yes !! well my basic bbcode function is like this : <script type="text/javascript" language="javascript"> function smiley(text) { document.reply.message.value = document.reply.message.value += text; document.reply.message.focus(); // i added this when premiso told me about the function but still need more funcionality } </script> something like when the bbcode is [ b ] [ /b ], the caret as u told me which i never knew its name should be between [ b ] & [ /b ] i hope this is good explanation to what i want to do. thank you Quote Link to comment https://forums.phpfreaks.com/topic/186505-how-can-i-do-this/#findComment-986444 Share on other sites More sharing options...
.josh Posted December 31, 2009 Share Posted December 31, 2009 okay, you still aren't making any sense. At best, you are talking as if I'm sitting in front of your computer screen with you pointing at stuff. Well I'm not, so I have no idea what you are talking about, because I don't know the context of your situation. Are you talking about for example, when I am making a post on a forum, if I click on for example the "bold" button, it auto-inserts the bbcode where my caret is? Quote Link to comment https://forums.phpfreaks.com/topic/186505-how-can-i-do-this/#findComment-986447 Share on other sites More sharing options...
yami007 Posted December 31, 2009 Author Share Posted December 31, 2009 Are you talking about for example, when I am making a post on a forum, if I click on for example the "bold" button, it auto-inserts the bbcode where my caret is? yes, that's what i am talking about !! Quote Link to comment https://forums.phpfreaks.com/topic/186505-how-can-i-do-this/#findComment-986448 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.