So i have this function in JS, sending a request to insert a new Status message to the database.
function DoStatusInsert(){
var wrapperId = '#statusResponseNow';
$.ajax({
type: "POST",
url: "misc/insertStatus.php",
data: {
value: 'y',
uID : $('#uID').val(),
message : $('#message').val()
},
...
I have an <a> tag that contains a span. The span has javascript attached to it that does something. As a result, when the span is clicked, the javascript runs, but the <a href> is ignored and it doesn't navigate to it.
Is there a way to make it continue to navigate as normal?
<a href='http://www.google.com'><span>some text</sp...
Hi Everyone,
I have a form that uses Ajax for client-side verification. The end of the form is the following:
$.ajax({
url: 'mail3.php',
type: 'POST',
data: 'contactName=' + name + '&contactEmail=' + email + '&spam=' + spam,
success: function(result) {
//console.log(result);
$('#...
How is it possible to create document object from html source and use document.* functions like getElementById in node.js?
...
i'm using http://blog.xlune.com/2009/09/vgrid/
which is similar to masonry/filtering.html
(can only post one link sos!)
i'm trying to get the filtering and animation similar to masonry
code is as follows
<!DOCTYPE html>
Using Masonray Filter
<script type="text/javascript">
//console.trace();
$(funct...
Hi, this sounds really simple and stupid..but I'm having a hard time removing the content before each dash from each H4 element on my page....i've been trying to do this with Jquery/Javascript.. Any insight?
Here's a sample of my HTML code:
<h4>California-Medical Research</h4>
<h4>Florida-Industrial</h4>
<h4>Atlanta-Computers</h4>
I...
i'm trying to get my script to wait for user input (click of a button) before continuing, this is v feasible in other languages, but seems impossible in js. basically, i want the user to select an option within a given time frame, if the user selects the wrong option, they're told..script then conts...otherwise, if after a certain amount...
I am trying to make some fields mandatory for creating a bug in Bugzilla, from what I have read, the easiest way is by using JavaScript. The code I have used is shown below but doesnt seem to be working. My Javascript knowledge is pretty limited so i am presuming it is an error in my coding.
<script type="text/javascript">
...
I am putting a google map on my web site and I wanted to add points to the map but I am not sure how to do it. I have tried a few different things but they did not work. Here is what I have so far:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://ww...
When adapting jQuery's isFunction method
isFunction: function( obj ) {
return toString.call(obj) === "[object Function]";
}
InternetExlorer 8 returns the following error: "Object doesn't support this property or method". A good article digging into this function won't fix this behaviour. To check wether obj is defined, I changed the...
Hello all,
I wanted to know how would I go about setting the HTML of my td element as the value of a hidden field.
<td align="center">
<%if (inst_dm != null) {%>
...some code..
</td>
<%} else {%>
<td align="center"> Contact not available.
<%}%>
<input type="hidden" name="inst_dmhidden" value="<%$(this).html().trim()...
I have a string that may contains Twitter hashtags. I'd like to strip it from the string. How should I do this? I'm trying to use the RegExp class but it doesn't seem to work. What am I doing wrong?
This is my code:
var regexp = new RegExp('\b#\w\w+');
postText = postText.replace(regexp, '');
...
This little search example works but only the first time.
How do I clear all the classes from the p elements so when searching the second time, the highlight from the previous search doesn't show?
<!DOCTYPE html>
<html>
<head>
<script src="http://www.google.com/jsapi" type="text/javascript"></script>
<script type="t...
I have a div I want to hide when I press F2... Everything works fine, except when the focus is on an iframe below this div...
<script>
document.onkeyup = KeyCheck;
function KeyCheck(){
var KeyID = event.keyCode;
switch(KeyID)
{ case 113:
document.getElementById("test").style.display = "none" }
break;
}
</script>
But like I...
Hey all,
Not the biggest whiz on math here... having a hard time figuring this out.
So I get the clients time of day using:
var clientdate = new Date();
var clientTime = clientdate.getHours() + 1;
Psuedo:
If clientTime() = 1, rgb should equal 55,91,128
If clientTime() = 24, rgb should equal 0,30,61
Wh...
Hi all,
I'm trying to highlight the selected text contents by the user inside the HTML page I loaded using PHP + XSL transformation.
I have seen some solutions related with highlighting current selected text, but I need to save some information to the database that makes me able to highlight the same contents for future loads of the sam...
I know that I should encodeURI any url passed to anything else, because I read this:
http://www.digitalbart.com/jquery-and-urlencode/
I want to share the current time of the current track I am listening to.
So I installed the excellent yoururls shortener.
And I have a bit of code that puts all the bits together, and makes the following:...
We have JS API does many things based on the HTML (markup semantics and CSS). We have many codes like this one below:
function initHelpText() {
$(".helpText, .tooltip, #pageHelp").css("cursor", "hand");
}
Don't worry about what the code does, just an example. Now how I do use qUnit to test, this functionality works. My guess is th...
I am using FullCalendar throughout my project and i need to display it in one area of my site where events are not draggable but to remain highlighted in the month view. Any ideas please.
...
I want to create a table to grid some data. The table can list a lot of data (100K+ rows). So what I want to do is show like 20 rows at a time with maybe a 100 row buffer. As the user scrolls down on the grid, it loads in the extra rows via ajax? I have seen this done but I don't really know how that can be achieved?
...