My Ajax application was working fine, until I implemented an if statement in the PHP script... then like a contagious disease it seems that if I do anything to the data in PHP it returns nothing back to the Javascript layer.
All I can do is echo the data back...
For instance the query string I'm sending to the PHP reads...
index.back3...
Is there a way in jQuery to count how many divs you have and put that number into a string
<div class="name">SOME TEXT</div>
<div class="name">SOME OTHER TEXT</div>
<div class="different">DIFFERENT TEXT</div>
So count the divs with class name and then put that into a string so the output would be this
var strNoDivs = 2
Any ideas...
that doesn't involve catching key presses ?
...
Hi.
I am building a javascript widget and i need to add my widget css and js files dynamicly to the client page.
I am doing this for now:
var css = document.createElement('link');
css.setAttribute('rel', 'stylesheet');
css.setAttribute('href', 'css path');
document.getElementById('test').appendChild(css);
alert(document...
I have the following code:
Dim compiler As ICodeCompiler = New Microsoft.JScript.JScriptCodeProvider().CreateCompiler
Dim params As New CompilerParameters
params.GenerateInMemory = True
Dim res As CompilerResults = compiler.CompileAssemblyFromSource(params, TextBox1.Text.Trim)
Dim ass As Assembly = res.Compiled...
Hi,
I'm getting a couple of libraries from Google / Microsoft CDNs.
ONLY one page on the system uses SSL but since I'm referencing libraries on the master page I'm getting the javascript libraries using the SSL so the single page that actually requires it doesn't throw security errors because accessing unsafe resources.
I've read tha...
I am using this code but it doesn't work because the new window is half of the my screen ( 1280x800px ):
<a href="javascript:void(0);" onClick="window.open('http://www.stackoverflow.com', '',
'fullscreen=yes');">Open Full Screen Window</a>
Why ?
...
Dear All Coders,
I would like make a script in Jquery that automove my cursor every 20 seconds in a random position of screen.
If is not possible to make in Jquery,how i can make it in Javascript?
Thanks in advance.
Kind regards.
...
I have these numbers
10999 and 8094 and 456
And all i want to do is add a comma in the right place if it needs it so it looks like this
10,999 and 8,094 and 456
These are all within a p tag like this <p class="points">10999</p> etc.
Can it be done?
I've attempted it here with the help of other posts http://jsfiddle.net/pdWTU/1/ but...
Hello friends, I have this code in my view
function Validate() {
if (document.getElementById('MandateName').value == "") {
var err = document.getElementById('MandateNameErr');
err.innerHTML = "Please enter a value for the Mandate Name";
err.style.display = "block";
return false;
}
else {
docu...
I'm simply trying to show a jqPlot in a facebox modal popup window. The plot shows fine in the div on the page, but if I try to set display:none; and show the div in a facebox popup, I get nothing. I'm sure it's to do with the canvas renderer and the events sequence, but I can't get it to work. Has anyone else tried this?
...
Hi,
I am not totally familiar with javascript, jquery.
I am trying to do the following. Note a-f are names for the dropdown menus. Can someone help clarify? thanks
var a_params = $("#a").serializeArray();
var b_params = $("#b").serializeArray();
var c_params = $("#c").serializeArray();
var d_params = $("#d").serial...
Dear Stackers,
I'm developing a web application which requires long-running Ajax requests. Unfortunately, under Firefox, pressing Escape during a request has the drawback of killing the request and any information it was holding. This is rather annoying, as this can lead to all sorts of nasty complications if this happens at the wrong t...
I have the following script which displays data returned from a serverside page onto the clientside page:
function getResults() {
var search;
search = $(".txtSearch").val();
$.ajax({
url: 'search.aspx',
type: 'POST',
data: { strPhrase:search },
error: function(xhr, status, error)
su...
So I've seen some forums posts about different browsers reporting differenct keyCodes, but everyone seems so avoid the "why?".
I was trying to capture the colon (:) keyCode and realized that Firefox reports back e.keyCode 56. While Chrome reports back 186 (I think that's what it was).
Is there a univeral way of getting the right keyCo...
Hi. I have a custom search engine in a page like so:
<script src="http://www.google.com/jsapi" type="text/javascript"></script>
<script type="text/javascript">
var search_term = '<?php print $_GET["q"]; ?>'; // added -- let google scrub!
google.load('search', '1', {language : 'en'});
google.setOnLoadCallback(function() {
var customSear...
I am tring to loop loop a jQuery command 5 times. Here is my code:
for(var i = 0; i < 5; i++) {
$("#droppable_"+i).droppable({
activeClass: 'ui-state-hover',
hoverClass: 'ui-state-active',
drop: function(event, ui) {
$(this).addClass('ui-state-highlight').find('p').html('Dropped!');
}
});
...
Hi all, I'm allowing a user to use either one of two textboxes to search a database - one is an ID field, and one is a freetext field. I'm using ASP.NET with C# btw.
Anyway, all I need to do is have it so when a user clicks on one of the text boxes, the other text box text is simply deleted, so the other text box is blank.
How would I...
I've seen a bunch of examples but can't seem to get some sample code to work.
Take the following code:
var test = (function(){
var t = "test";
return {
alertT: function(){
alert(t);
}
}
}());
and I have a function on window.load like:
test.alertT();
That all works fine. However, when I try...
Hi everyone
I'm doing a javascript assignment and have just learned that I can do it in jQuery if I wish, rather than vanilla javascript. I thought I'd give it a go to see what it's like.
This is the contents of my javascript function:
rowsArray = $("#Table1 tr");
for (i=0;i<rowsArray.length;i++){
numSeatsInRow = rowsArray[i]...