I am sending some information from one page to another using Form and Link. This generates a string of text in the receiving url, which I am extracting and displaying in a textarea. How do I insert a linebreak in the javascript code? With this line of code:
everything that is being returned is running together. I need it to run on separate lines. I can't control it with box width because the entries will vary on each occasion. I assume there is an escape character like in php or a break tag like in HTML, but I don't know what it is!
I am working on some functionality for a CMS, whereby the user can write come content and insert images into the rich text area - just like you do with WordPress.
So, you would have a window/overly open with your media manager, then select the image and it will then appear in the text area as an inserted image.
Handling the file uploads, making the media manager etc is not a problem, its just inserting images in this way that I am not too sure about.
jQuery is my library of choice, and I use TinyMCE for any text editors, and how this may be achieved. I know TinyMCE offers the MCImageManager but I would much prefer my own solution than have to fork out the cash every time I wish to use it.
But I want to insert it like when you hit the enter key, so there is the return spaces in it. I tried using <br> but that shows up since it is viewed as a string. I tried using .innerHTML instead of .value and that didn't work, least it didn't in Firefox. There a way to do this? If not I'll have to turn it into [br] and change it to <br> after submission.
In the following program, you can create an HTML template then add/modify common elements and display the results. I can place tags around highlighted areas and insert/append functions where the cursor is positioned.Works OK so far. Some of the JS could be put into external files, but I put inline for ease of viewing.The problem is when the text exceeds the <textarea> boundaries and I try to tag or insert at cursor,the display reverts to the first line of the <textarea> display. I would like to keep the displayed area within the boundaries and just push down the inserted text. Is there a simple way to accomplish this task or do I just have to put-up with the bouncy display whenever I insert code into the textarea longer than display?
This of course print each word on a new line in the browser. The problem is when the user copies and pastes the text, it appears as one long string of text with no breaks. Now consider the following script:
How would i change back to the default length of textarea?
I have this comment area that after clicking submit i will append the new comment in the list of comments through ajax... i got one problem though, everything is working perfectly well except for the textarea that won't change back to it's default size...
EXAMPLE:
The problem is that the textareawon't change back to it's default size // let's say that the default size is rows=3
I have a textarea, where people will be posting multiple images links. I need to be able to add [img] & [/img] to the start and end of each line respectively.I also need to stop each textarea from posting information if it is empty, which I can't seem to do either.
PHP Code:
<script language="javascript" type="text/javascript"> function addtext() { var newtext = "[b][u]" + document.gen.title.value + "[/u][/b]" + "
First off: I know nothing of Javascript (or much of any coding really), but I expect this to be simple for someone experienced, although it was (suprisingly) hard to figure out, for a lousy Googler like myself; so here I am. I have a function that generates an URL to an image, as so:
function todaysDate() { var currentTime = new Date() var month = currentTime.getMonth() + 1 var day = currentTime.getDate() window.location.href = "http://www.ecample.com/generator.aspx?format=png&month="+month+ "&day="+day+"&width=320&height=480" }
I get the image displayed fine in a new window, but I need it to open in a <div> or object, iframe, something I can place under my <div>-based header, when a button is pressed from my menu.
I'm trying to create a link that adds a new input to a form.When the script is run, the text is inserted, but the it disappears a few seconds afterward. What is causing this to happen, and how can it be fixed.
I've been trying JavaScript a little bit. I beginned by changing an image using a very simple:
document.getElementById(...).src="new image"
Which worked fine.
However this does not work if Firefox is configured with the "Change images" disabled... Fair enough.
Now I'd like to try something else: not "changing" an image but inserting a new image, in a page that had no image previously.
I'd like to do this because the image isn't ready yet when the user arrives on the page: I want the page to already render the text, then "insert" an image once the server is done creating it.
For example, when the user arrives on the page, he sees the following text:
"Please wait while the server is preparing the data you want to visualize"
And then after a few seconds the image appears (the script checks data on the server every second using XmlHttp requests and once the server warns that he's ready, I modify the src of an 1x1 image).
As I already said, it works if I change the src of an image already present on the page (like a 1x1 white pixel on a white background) but now I'd like to know if it's possible to insert a whole new image in a page that had none previously.
Note that I'm not necessarly looking for something that works even when Firefox's "Change images" is disabled but simply as to how to insert a new image in a page instead of changing a 1x1 white pixel.
I have a cookie setup to store usernames and passwords for my site. Additionally, I'd like to store some variables in the cookie, and be able to extract them back out. I'm having trouble doing this. Here's my code thus far:
I am trying to insert numbers from a form into two different URLs, and then launch both with a single click.My problem is getting the numbers to insert correctly.Below is what I have attempted.
I found the following code on a web site. It creates a small frame inside a web page. The code is too advanced for me to understand. It does the job for me. What I would like to do is insert a small table in the frame. I don't know at what point and how to add the HTML code. I would also like to add a link to a CSS file.
function move_box(an, box) { var cleft = 0; var ctop = 0; var obj = an;
I have a table with a two cell. One cell has a text field, the other is empty. I want to place an image in the second field depending on the value in the text field. Not sure how to do this. Do I assign the image to the fields id?
var moreinfo =""; moreinfo+= "here some content"; $("#divMoreInfo").html(moreinfo);
And this inserts "here some content" in a div called divMoreInfo.
Now divMoreInfo is placed inside an iframe while the rest of the programming has to be in the parent page... How do I insert moreinfo's contents in the iframe's div?
how do i create a link or button such that when i click on it, it inserts a certain string in the text area on the page currently active at the current cursor point??
I'm using NicEdit WYSIWYG editor, perhaps if i can insert an extra button in the NicEdit tools itself.
I'm trying to make a script (i'm a bit of a JS newb) which is called every time a change is made to an input box and will show an image either a tick/check or a cross depending on whether the values of two total boxes match. The script looks right to me but the image doesn't show.
HTML Code: <?php include 'includes/config.inc.php'; ?> <html>[code].....
as a project I have to design a website with several functionalities, including a calendar which is working just fine.
this can be seen here: [URL]
(you will have to click "CALENDARIO" at the top to see it)
or if you want to see the calendar outside the iframe: [URL]
anyway, the way to insert details into each day of the month is through running a script:
Code JavaScript: $(document).ready(function() { var date = new Date(); var d = date.getDate(); var m = date.getMonth();
[Code]....
I would like to know if there is a way for me to insert an image onto the title, the idea is to put up something like "Team A VS Team B" with both team flags there as well.