HTML - How To Reset And Getvalue From Javascript Rich Text Editor
i used javascript rich text editor in my code but when i reset form all the fields get reset except text area [javascript rich text editor]. even when i get value from javascript code it doesnt return value............ here is the code
//text area <textarea cols="80" rows="10" name="news_description" class="widgEditor nothing">textarea> //reset code function resetTextArea() { document.form_addnews.txt_desc.value = ""; } //get value of text area...it does not work, odnt retyrn any value var cdescription = document.editnews.news_description.value.length; if(cdescription < 0) { alert(document.editnews.news_description.value); alert("Please enter Description"); document.editnews.news_description.focus(); return false; } Similar Tutorialsi am trying to build a text editor for my site ive got it so if you click the bold button it adds '[b ]TEXT[ /b]' into the form, but i want is so that if a use sleects some text and click the bold link, it adds [b ] tot he begining and '[ /b]' at the end of the selected text, likein this text editor :p cheers soory if its in wrong section couldnt find a section for javascript My project is to construct a web site, step by step, with a view to teaching myself HTML, javascript, PHP, AJAX and who knows what next. The site includes its own content manager. That is: I edit HTML on a web page, send it to a database, then retrieve it to build the pages of the site. Including the page on which I do the editing. It's gone very well so far. I can store large chunks of raw HTML, with all the markup, retrieve it and stick it into the innerHTML of a textarea. Many times over. But I knew it couldn't last. If the raw HTML includes a textarea definition then it edits and stores OK, but on retrieval it merges in with the containing page, losing a lot of my work by trying to render it below the textarea. I can find all sorts of free editors to embed in my page but they can all do too much! I don't want to embolden text, for example, because the text itself has to include the <b> markup. I don't think I want an iframe, because the initial contents have to come from the database rather than a pre-existing file, but at this stage of learning I'd like to do it using straight HTML and javascript. I want to define an area of my page which can be loaded with raw HTML from the database, allow editing and storing back to the database, time and again, and I don't want rich text. Has anyone got any ideas? Ed Hi and thanks for looking in, I posted last week about a problem that I had concerning firefox not reading my html as well as explorer, and received some great advice from this forum on the validator page which showed a staggering number of errors. WHen I checked out those errors, almost alll of them were related to the built in converter in Microsoft Word which I used to create the page. Does anyone know of a program or feature of some other program which will convert rich text documents in to html besides Word? Thanks in advance. htmldad hi, i am developing a chat application. i want my chat text area shows bold text,text in different colors. basically i want my text area html tag compatible. how could i do so?. now if give bold text <b>here is text</b> the text area is also showing <b> tags. not the bold text. any help? Thanks R I'm trying to display some VB code in my webpage. I can keep the code structure using the pre and code tags. Is there any way I keep the color displayed in the code editor (vbsedit, textpad, ultraedit ... etc) ? I am using four frames. I want it so that when I click the 'home' link, the mainFrame and the contentFrame will return to their original state. How do I do this? Changing one frame is ok, but I dont know how to change them both. This is my main code: Quote: ... <frameset rows="9%,*" cols="*" framespacing="0" border="0"> <frame src="title.htm" scrolling="no"/> <frameset rows="*" cols="13%,19%,68%" bordercolor="#FFFFFF"> <frame src="menu.htm" scrolling="no"/> <frame src="main.htm" name="mainFrame" /> <frame src="content.htm" name="contentFrame" scrolling="no"/> </frameset> <noframes> <body> Get a better web browser! </body> </noframes> </frameset> </html> And here is the menu frame where the Home link is, you can see where I have added the mainFrame. But I want to add the contentFrame too: Quote: <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><style type="text/css"> <!-- body,td,th { font-family: Arial, Helvetica, sans-serif; color: #FFFFFF; } body { background-color: #000000; } a:link { color: #FFFFFF; text-decoration: none; } a:visited { text-decoration: none; color: #FFFFFF; } a:hover { text-decoration: none; } a:active { text-decoration: none; background-color: #000000; } .style1 {color: #FFFFFF} --> </style> <table width="100%" border="1" bordercolor="#FFFFFF" align="center" > <tr> <td><div align="center"><a href="main.htm" target="mainFrame">Home</a></div></td> </tr> </table> <table width="100%" border="1" bordercolor="#FFFFFF" align="center" > <tr> <td><div align="center"><a href="images/images.htm" target="mainFrame">Images</a></div></td> </tr> </table> <table width="100%" border="1" bordercolor="#FFFFFF" align="center" > <tr> <td><div align="center"><a href="videos/videos.htm" target="mainFrame">Video</a></div></td> </tr> </table> <table width="100%" border="1" bordercolor="#FFFFFF" align="center" > <tr> <td><div align="center"><a href="audio/audio.htm" target="mainFrame">Audio</a></div></td> </tr> </table> Can someone take a look over here. (LINK) I'm having problem "reset-ing" the graph. Eg. Let say you change all the inputs + color and click on generate graph. After that, click on reset graph. Only the graph changes to (50-50-50) but the axis/inputs/colors remain intact. Any idea? Axis (axisid) Inputs (inputid) Color (colorid) Cheers. I inherited a HTML/PHP project which was a written in hurry and now I am trying to put in some editing and other confirmations. A type=reset was added to the screen and there is 2 option lists. When the form is first load only 1 list is displayed. Then the user makes the selection and depending on the selection the second list would display or not. On the reset option would like to hidden the 2nd selection but seems I can not get the right coding. I have tried onclick on the <input but no luck. There is a onSubmit on the <form which calls some validation checking. Tried put the call to function to hide the option list but no luck. Of course, I probably did not have the coding correct. How can I hide the 2nd option list on reset. Hello, I have done a search form in HTML (with something in Javascript), and a reset button that works perfectly. The search results are published on the same page of search form, but once its searched the reset button no longer works. So, once the form is submited, reset button stops working ... someone knows how can I fix it? Thank you very much and best regards to all! how would i make a form that would send me an e-mail? What i need for it is a place to umput text and a submit button. Also, how would i put a reset button for that? Hello, I have a simple quiz with 3 parts: the quiz, the results page, and a printable certificate. On the first page (the quiz itself), I have a form with 20 questions and at the bottom is two buttons: Submit and Reset. Both of these work great, that's not the problem. The problem is on the second page. IF the user did not score high enough, they cannot proceed to the printable certificate and must retake the quiz. For this I have a button which takes them back to the quiz. Unfortunately, I can't get it to reset the form. Here's my code for the button: Code: <input type="button" value="Try Again" name="tryagain" onClick="history.go(-1); document.TrainingVideosTest.reset()"> The form on the first page is named TrainingVideosTest. Here's the code for the reset button on the quiz page: Code: <input type="button" value="Reset" name="resetform" onClick="document.TrainingVideosTest.reset()"> Does anybody know how to reset form data from another page? On an order entry web page I would like to code a reset button that clears out data a user has entered. Is there a way to insure that all form fields are reset to empty or default values upon entry to the page that contains the form? I'm asking this because if someone has already submitted a form and arrives at the next screen, that form has already been logged. If they go back, it gets logged again and I don't want that. I would prefer that the solution would involve HTML &/or PHP because many people have Java script disabled. But, if it can't be done with HTML or PHP, then so be it. I'll have to use Javascript. My first thought was to somehow disable the "Back" button but that is probably offensive to many, and I wouldn't want to alienate anyone. Maybe someone on this forum might have the answer to my question or may be able to suggest another approch I could use. Thanking you in advance, Roy Hi all, I can code html by hand but I am looking some tools or editor which can help me code html faster than hand typing. Any thoughts? I heard dreamweaver is a great tool for coding html. Please feel free to give me any advice. Thanks in advance. Opeth I'm using WYSIWYG Editor by openwebware, and really, I think it's sort of dumb. I'm using it to replace the text editor but it's not working, well it works - but it doesn't submit data. I looked through the code and I saw it was only hiding the textarea id, and adding the WYSIWYG Editor where there is a hidden one, but as I stated above, it's not submitting data. Is there any fix for this? I have no access to source files. Can someone recommend me a goo HTML editor? I can drag and drop control. Include syntax checking, ... I have been using Notepad ++ for a while now. Just wondering, maybe their is a better editor? It needs to be able to work with CSS/JS/PHP. Someone recommended to me Bluefish Editor... I don't have time to be trying numerous software, what are other web developers using? I appreciate any input. Can anyone point me in the direction of a good but easy to use HTML Editor? I want to be able to have complete control over the HTML, something which my current Host Sitebuilder does not allow. Thanks Hello, newbie here. I have worked, hacked, html files, so I'm familiar with the basics and guts of the files. I know there is software that will allow you to create/build html files. I assume these are called editors or html front end...... whatever. So, 1) what is this software called 2) what do you recommend for basic web pages nothing fancy. So what I'm looking for is something that is easy to use, intuitive, and solid. Any ideas ? Thanks Hey people, what is considered to be the best HTML editor, Currently I use dreamweaver but I would be happy to spend out a load more cash if there is a better one, I also want to know which editor would be best spending my time learning. |