Hi, I have a textbox which contains code where the user can embed the youtube video onto their own page.. However i want to have options where the user can customize vid, choose colour, border and autoplay option and the code in the textbox will automatically be updated. The question is: how do i make my text appear after the youtube url rather than at the end of the whole code inside the textbox? I know that onclick="this.form.text1.value=this.form.text1.value+'\n'+this.form.xyzvalue" Code (markup): will add my xyz value at the end of the textbox but i need it to appear directly after the youtube url. (which will be defined in php if that helps in anyway) Many Thanks in advance.
hi, since you have given next to no clue on how to solve your problem this will probably be the best answer you get. you will probably have to do some javascript string manipulations just like you are doing in your code sample here and insert it where you want it....maybe by chopping your existing string into 2 vars. then re-connecting them like finalvar = string1+yourtextvar+string2. unfortunely i can't help you with exact code or even quality psuedo because you have given no url and not enough details to really even give you a psuedo code kevin
OK i am sorry i actually edited my post to try and summarise my problem as much as possible. OK here is what i need: This is the basic Youtube Code which will be default in the textarea: <embed src=[B]"YOUTUBEURL"[/B] type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object> Code (markup): OK the YOUTUBEURL will be defined with something like this <?php echo $ytube; ?> Code (markup): What i need is when a user clicks a colour the following code will be added directly after the YOUTUBEURL in the textbox. rel=0&color1=0x3a3a3a&color2=0x999999" Code (markup): There will be various colour codes. The above is an example of one of the colours. Lastly i need an option which if the user clicks it will append: &autoplay=1 to the end of the YOUTUBEURL. This can be added in conjunction with a colour. Many Thanks for any help, it is really appreciated.