Hi folks,
this is a continuation of a previous question I asked yesterday.
I'm trying to display a clock based on a pre-determined time value .. not the current clients time.
here's my JQuery...
$(document).ready(function () {
var currentTime = new Date('3/09/2010 9:27:29 PM');
setInterval("DisplayTime(currentTime, $('.answer...
How can I get all of the elements on a web page that have a certain class name and put them into an array? Then I want to be able to put the contents of that array in an alert box?
How can I put those elements id's into the array?
...
I'm trying to create a button with icon like this:
HTML:
<div id='button'>
<div class='icon'></div>
<span>Send Email</span>
</div>
CSS:
#button {
width: 270px;
height: 50px;
font-size: 1.4em;
color: #333;
background-color: #555;
position: relative;
}
#button > .icon {
width: 61px;
height: 39px...
I want to replace all the occurrences of a string that doesn't start with "<pre>" and doesn't end in "</pre>".
So let's say I wanted to find new-line characters and replace them with "<p/>". I can get the "not followed by" part:
var revisedHtml = html.replace(/[\n](?![<][/]pre[>])/g, "<p/>");
But I don't know the "not starting with" ...
I'm trying to call to external PHP script using Ajax like this:
$(function() {
$.ajax({'url': 'http://stokes.chop.edu/web/zscore/result.php',
'type': 'POST',
'success': function(response, textStatus, XMLHttpRequest) {
alert('[' + response + ']');
},
'error': function(XM...
does there exist a service that will let me fetch the contents of another page and return it in some ways i can console via javascript?
i need to make a cross domain request, and i am trying to find a way to do so without writing my own web service
...
Man Im trying to understand callback functions. Ive been over many articles and posts here on SO. The explanations seem circular and I think Im actually getting farther from understanding lol. Ive used them apparently in javascript events, but its more a 'memorize these lines' than 'this is whats going on and why' sort of understanding.
...
Hi everyone here.
We can use the XPathEvaluator object(in javascript) to do xpath evaluation on Safari,Google Chrome and Safari on Iphone. But on android the browser said that the XPathEvaluator object is undefined.
So how can I get a instance of XPathEvaluator object, or is there any other solution to perform xpath evaluation on andro...
During AJAX call is it possible to return ViewData, TempData or a session back to the view? does these variables are included in the cycle? please comment
function submitForm(frm) {
var tdata = $(frm).serialize();
$.ajax({
url: "/Organization/EditOrganizationMeta",
data: tdata,
succe...
Simple question, I'm new to using node.js and was curious as to how I should uniquely identify a computer?
...
I'm trying to convert the javascript date to ASP.NET's DateTime.Now
var todaysDate = new Date();
document.getElementById('hdnDate').value = todaysDate.toString();
private void ConvertToDotNetDateTime()
{
DateTime myDate = (DateTime)hdnDate.Value; ??? ? //bit lost here
}
...
Here is my dilemma.
I've got this section of code:
var list_of_numbers = new Array();
function AddToArray(func)
{
// Add to the *beginning* of the array
// essentially reversing the order
list_of_numbers.unshift(func);
}
function DisplayNumber(num)
{
document.write(num);
}
for(var i=0;i<5;++i)
{
AddToArray(functi...
how can I refresh a page using javascript and keep all the parameters in the POST method?
...
Hi guys, I noticed that you can't use the show function on an array of html elements like the list of elements returned when you apply a document.getELementsByClassName call. For which I have to make a little loop and apply the show/hide or any other extended dom function to the individual elements.
If there an easy way to do this in pr...
When I click on the link for myPic.jpg, it loads a separate window instead of an overlay, which is not what I want.
Here's the code from my test page, including what I think is verbatim repetition of Floatbox's instructions. Can anyone tell me what I'm doing wrong?
I've had similar problems with other overlay coding (Lightbox clones) as...
How do I declare class variables in Javascript.
function Person(){
fname = "thisfname"; //What needs to be put here
}
alert(Person.fname) //It should alert "thisFrame"
I don't want to use this approach.
function Person(){
}
Person.fname = "thisfname";
alert(Person.fname) //alerts "thisframe"
...
Now, I usually call a function (that requires no arguments) with () like this:
myFunction(); //there's empty parens
Except in jQuery calls where I can get away with:
$('#foo').bind('click', myFunction); //no parens
Fine. But recently I saw this comment here on SO:
"Consider using setTimeout(monitor, 100); instead of setTimeout('mo...
want to get a validation script to validate the file upload box onsubmit.
check the extension of the file and validate accordingly to the extension of file loaded
...
I have several such anchor links as shown below.
<a href="http://google.com" onClick="unhook()"> Google </a>
I want to apply the onClick event to all anchor tags dynamically. Is it possible?
...
I would like my text to fade from white to black and the background colour to change from black to white simultaneously any ideas?
...