myList contains the following values:
value1
value2
value3
function showArray() {
var txt = $("#myList").text();
var textread = txt.split('\n');
var msg = "";
for (var i = 0; i < textread .length; i++) {
msg += i + ": " + textread [i] + "\n";
}
alert(msg);
}
my alert gives me the following:
0:value1
v...
function CheckDateEmpty(oSrc,args)
{
var editor = $find("<%=editorContent.ClientID%>");
var value = editor.get_content();
if (value == "")
{
args.IsValid = false;
return;
}
else
{
editor.set_content(value);
args.IsValid = true;
return;
}
}
the above function check perfe...
Hi,
General javascript question here, which would also be good to know how(if possible) to do in jquery.
Can you trigger a click event when hovering over an item?
I know there will be people asking why, but please just humour me.
Many thanks,
C
...
<style type="text/css">
#[':0:adId'] { /* this does not work */
background:red;
}
</style>
<div id=":0:adId">Loading...</div>
Google Maps use this id format. How do i set the style?
...
Hello there.
I'm implementing Twitters OAuth for Adobe AIR in Javascript. My problem is, that out of 100 requests to api.twitter.com/oauth/request_token about 30 fail with the usual error message: Failed to validate oauth signature and token
The other 70% of requests produce a correct response, so I believe that my algorithm for signin...
I am trying to setup the following view on CouchDB
{
"_id":"_design/id",
"_rev":"1-9be2e55e05ac368da3047841f301203d",
"language":"javascript",
"views":{ "by_id":{
"map" : "function(doc) { emit(doc.id, doc)}"
},"from_user_id":{
"map" : "function(doc) { if (doc.from_user_id) {emit(doc.from_user_id, do...
That sounds pretty odd but i have this cod and i need to convert it to checkbox, with the same functionalities
<select onchange="document.getElementById('reasonDiv{$test->id}').style.display = '';
document.getElementById('reason{$test->id}').value = this.value;" name='reasonId{$test->id}' id='reasonId{$test->id}'>
<option value=''...
how to upload a file using javascript
...
Can anyboyd help me split up this date number in javascript so that when it is outputted to the screen it has slashes between the 4th and 5th number and the 6th and 7th number, so that it can be understood by a vxml voice browser. The number can be any value so i need it to work for any eight digit number.
Like so:
20100820
2010/08/20...
When I move mouse over the container panel, the child panel is displayed but as soon as i move mouse over the child panel, the mouseout event is triggered and panel get hidden.
This is simplified version of my code because panels are located inside gridview and therefore i can't use document.getElementById("panelchild") as it is (the js...
Hi,
I'm using asp.net mvc2 and trying to send a list of json objects with hard coded values from the home controller, and receive them in index....
in the code below i'm sending 1 json object ....
how do i send many?
in home controller:
public ActionResult JsonValue()
{
var result = new
{
...
Hi All,
I use media player control to play mp3 files in asp.net application. I want to find When the playing process gets end and the total time require to finish the file using javascript.
Code:
<object id="mediaPlayer" classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
codebase="http://activex.microsoft.com/...
I'm trying to get the instance name of my class.
The way I do this is I loop through all global objects and compare it with the this pointer.
It works in Chrome and FF, but in IE, it doesn't. The problem seems to be the global variables don't seem to be in window.
How can I loop through the global variables in IE ?
PS: I know it onl...
Hi
I am creating a simple canvas using processing.js , how to pass values from rails application to Processing.js
void drawBox(int bx, int by, int bs, int bs){
strokeWeight(3);
stroke(50,50,50);
// Test if the cursor is over the box
if (mouseX > bx-bs && mouseX < bx+bs &&
mouseY > by-bs && mouseY <...
I have the following scenario.
I have a index.php page with the following JQuery code included
jQuery(document).ready(function(){
jQuery('#sIMG img').click(function() {
var currentSRC = jQuery(this).attr('src');
var altSRC = jQuery(this).attr('title');
var imgID = jQuery(this).attr('id');
var cat = j...
Hi
I'm running some tests comparing the sha1 algorithm implemented in javascript - got from http://pajhome.org.uk/crypt/ - with its implementation in C#.
Using C# to get the hash for {'method':'people.get'} I'm using this statement:
Convert.ToBase64String(new System.Security.Cryptography.SHA1CryptoServiceProvider().ComputeHash(Encod...
Rather than doing
my_var = my_var+'extra string';
is there a shorthand method like .= in php?
...
Just wanted to write some recursion but can't check if the child is in fact some finite thing, when checking throught jQuery.isPlainObject , just getting a saparate letters as a childs , like I want "this is error message" - to be a last child , but can't detect it
...
I'm having a naming trouble with a function which returns parent prototype of specified object. It's being used like this:
# Pseudo Code
MyClass
{
super(MyClass,this).constructor.call(....
The problem is that I want to use a word which is as superior as "super", but "super" is reserved even it's undefined. Now I'm using "parent", b...
i want make a Control on google-maps:
function foot() {}
foot.prototype = new GControl();
foot.prototype.initialize = function(map) {
var foot=footDiv = document.createElement("div");
$('<div class="t"></div><div id="bottom" class="bottom"></div>').appendTo(foot);
foot.id='foot';
$(map.getCon...