I have a Javascript function that is called from the onchange method in a DropDownList. However I'm getting the error "Cannot have multiple items selected in a DropDownList." on line 14. This happens when the page is reloaded for other purposes. Why is it getting hung here when the method shouldn't even be getting called?
Line 12: {
Lin...
I can't seem to get jQuery to notice the div within the following markup
<button class="button submit positive right" id="omnisubmit" type="submit">
<div class="label">Submit</div>
<div class="controller"> </div>
</button>
And here is the jQuery I'm currently using:
$("button#omnisubmit div.controller").hover(function (...
This is my Javascript below I want to show records on load and also show new records when added to the database
showrecords(); displays the records in the database where abouts can I put this in my code where it will work correctly.
$(document).ready(function()
{
//showrecords()
function showrecords()
{
$.ajax({
...
On our web site, users enter free form text like "Ribeye steak at Safeway for $8.99. Great deal in Palo Alto."
Does anyone know of APIs that can take free form text and return an image that best represents the text?
Right now, we're feeding the whole text to Google Image Search, but sometimes the extraneous words (e.g., at, for, $8.99...
I am using this to get my latest Tweets
<script type="text/javascript" src="http://twitter.com/javascripts/blogger.js" ></script>
<script type="text/javascript"src="http://twitter.com/statuses/user_timeline/username.json?callback=twitterCallback2&amp;count=2"></script>
so i have to get the latest 2 tweets cause i set t...
I am setting the submit function on a form with jQuery then later in the process I reset the function to something else. What happens is the original function gets called again then the new function when only the new function should have been called.
I am sending the requests with AJAX. The first one validated the values on the server t...
I would like to have more than one button. I tried to copy code between brackets but doesnt work.Ideas?
buttons: {
"Close": function() {
$(this).dialog("close");
}
...
I am using the following code to show a jQuery UI dialog when the mouse is clicked on the map:
GEvent.addListener(map, "click", clicked);
function clicked(overlay, latlng) {
$('#dialog').show();
};
Both clicked function and show() function works fine on their own but when I want to open dialog box by clicking on the map it does no...
I load jquery into my greasemonkey script and when the user clicks the start button the script makes a bunch of ajax calls. I then empty body and append data. When i click on something and hit back instead of getting the page post script i lose all the data and need to run the ajax calls again (it can take seconds to run). How do i make ...
Hi all:
I got stuck in this problem for an hour. I am thinking this is something relates to variable scoping ? Anyway, here is the code :
function loadRoutes(from_city)
{
$.ajax(
{
url: './ajax/loadRoutes.php',
async : true,
cache : false,
timeout : 10000,
type : "POST",
dataType: 'json',
data :
...
I want to replace a form element with a div and keep the inner html of the form inside the inserted div element. i tried jquery it gives me unkown html element as selection result,
below is the target form and inner html:
<form name="Contents2_frmLogin" action="/SiteManagement/SiteWizard.aspx" method="post"><table border="0"><tr><td>...
I realize that title may require explanation.
The language I first learned was C, and it shows in all my programs... even those not written in C. For example, when I first learned F# I wrote my F# programs like C programs. It wasn't until someone explained the pipe operator and mapping with anonymous functions that I started to unders...
I'm writing this script to rotate a background Image every 3 seconds but it doesn't work at all and i'm stumped as to why not.
$(document).ready(function() {
var inc = 0;
var bgImages = new Array();
bgImages.push("Images/backgroundDog-small.jpg");
bgImages.push("Images/backgroundDog1-small.jpg");
...
Hi
I want to let server to invoke client ActiveX via javascript. The script work well as it run on my local system. Then I place it into Apache Server and it's malfunction.
Script:
<object id="lv_obj" classid = "CLSID:30A92485-94D2-4CBA-AC32-EF276B7F777B" CODEBASE="" ></OBJECT>
try {
document.all.lv_obj.Init("PCS_Tes");
} catch (...
I am trying to call a function "makeQuery" and it's not working, FireBug is telling me:
missing ; before statement
[Break on this error] makeQuery(this.id){\n
I don't quite understand where it wants me to put the ";"
$(".predicate").click(function () {
makeQuery(this.id){
alert(this.id);
}
});
function makeQuery(val...
is there any open source tool to encrypt or hide the client side code.... is it possible....??? i need to encrypt php,html,java script//
...
i want to save all user's (who visite my site) map ,
but i think google can hosting those kml file , yes ??
http://code.google.com/intl/zh-CN/apis/maps/documentation/mapsdata/developers_guide_javascript.html
thanks
...
How would I achieve something along the lines of this..
var Persistence = new Lawnchair('name');
Object.extend(Lawnchair.prototype, {
UserDefaults: {
setup: function(callback) {
// "save" is a native Lawnchair function that doesnt
//work because
// "this" does not reference "L...
DUPE: http://stackoverflow.com/questions/2512874/can-google-host-my-kml-file-all-my-site
i want to hosting on google,
and show it on my site ,
can we ??
thanks
...
Hi all
I've got a problem about onbeforeunload recently that I need to pop up a voting page when users try to close their IE browsers.I did it by using:
<body onbeforeunload="makevote()">
And the main structure of makevote() in javascript is as follows:
function makevote()
{
comet.distruct();
if(csid != null && isvote == nu...