I have JS code that will pass 3 parameters (Current Day, Current Month, Current Year) to a XSL. This is working correctly. However, I need to send the Day, Month, and Year, 30 days is the past. (ie. 06/17/2009 - 30 days = 05/18/2009).
var currentTime = new Date(); var date = currentTime.getDate() var month = currentTime.getMonth() + 1 var day = currentTime.getDate() var year = currentTime.getFullYear()
I'm trying to write a small little bookmarklet to insert some text into a textarea on a website I frequent. The first problem I ran into was that while the textarea I wanted to mess with was named, the form wasn't. To get around this I tried:
window.document.forms.comment_body.value which, for some reason, sometimes worked. But not every time. Then I found getElementsByName but I can't seem to get that working either. Here's my latest attempt:
Basically i have a function that depending on which picture you click (one for "yes" and other for "no") it will make visible a textarea .
However right now if i click in "yes" it will display me the textarea for yes, and afterwards if i click "no" it will display both textareas, for yes and no. I want everytime i click on yes it will hide the "no" textarea and the same for when i click the "no" textarea, it will hide the "yes" textarea.
Setting the content is more of a challenge. I don't want to have nasty browser detection to select what to use for newlines. Is there one newline pattern that is safe for all browsers?
I am using this code to create a preview pop up window of some text entered into a form textarea. Am I able to include text from more than 1 text area? So could I have the form include text from for example .txt and .txt1?
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
I got a table with some select, inputs and textareas in it. if i click a button i execute addRow function which populates the row and creates new elements in each cell (new selects, inputs, textareas). But i dont know why, when i get a child of TD where select is the tagName is undefined and nodeName is #text, for INPUT and TEXTAREA it works perfect.
It happen so in Chrome and FF, in IE works fine (first time something that works here and doesnt in ff)
how do you get rid of this bar? this is on IE 7, but before that was on IE6 and it was doing the same thing (am on XP, at home am on 2000/IE6, IE doesn't do that at home..)
I have a div, which can be anywhere in the document. I want it like, when I click anywhere on the div, it tells me the X, Y of the mouse in the div. Like X mouse - X div (left) and Y mouse - Y div (bottom). So that I know the width and height of the mouse according to the div. Is it possible or cross browser?