i have javascript code that looks like this:
$('#lnkPopup').click(function()
{
var id = $(this).attr('rel');
var msgCount = '<%= Model.ElementAt('+id+').MailCount %>';
});
<%= Model.ElementAt('+id+').MailCount %> doesn't work.
so how do i add a javascript variable to a serverside query this?
...
I have a modal popup with a formview with a default mode of Edit. The controls inside the form are bound to data. I have JavaScript that shows a textbox and a label only if a certain value is selected from a dropdownlist. I want to do this on load also.
<tr>
<td align="left">
<asp:DropDownList
ID=...
jQuery.live
Added in jQuery 1.3: Binds a handler to an event (like click) for all current - and future - matched element. Can also bind custom events.
http://docs.jquery.com/Events/live
Is there a good YUI replacement which can do this?
...
I have developed a reverse proxy and currently ONLY process the "html/text" responses from the remote applications, everything else (images, javascript, etc) are passed thru unmodified. The problem I'm having is when the remote site contains javascript that dynamically inserts either java applets or activex controls into the page, as th...
Hello All,
I want to do something similar to the way twitter searches use AJAX to create the "Real-Time Results".. It seems that the database is polled every 15 seconds or so and the number of new records is displayed to the user after each pull. I am working on a Coldfusion 8 server with a MS SQL database and I need to implement some...
I've spent probably a month researching the internet on this issue and have yet to find the answer to this. My code does the following (all Javascript).
Let's say I have a test.html on mydomain.com
Very first thing in head section i set document.domain = 'mydomain.com';
Then, dynamically create iframe, set src to "subdomain.mydomain.c...
When you run:
window.toString.call("")
everything's fine in FF/CH but in IE8 you get a script error. Investigating a bit more it turned out, that window.toString.call is undefined in IE8?
You can also run this one:
window.toString instanceof Function;
// false
alert(window.toString);
// function toString() {
// [native code]
// ...
I know that I can get the class name from a table cell if I have the id of the cell, i.e.
scr = document.getElementById(cellid);
classN = scr.className;
However I want to get the class name from a table with potentially 1000+ cells. Can I do this without id'ing every cell?
Any help would be appreciated.
Thanks
...
How can I easily obtain the min and max values from a JavaScript Array?
Example code:
var arr = new Array();
arr[0] = 100;
arr[1] = 0;
arr[2] = 50;
// something like (but it doesn't have to be)
arr.min(); // return 0
arr.max(); // return 100
...
I want to use a JavaScript file, lying in the root folder. How can I include that JS file?
...
We have a nav that expands on rollover (based on this code: http://www.dynamicdrive.com/dynamicindex1/droptabmenu.htm).
First, should we have a no-javascript version of the nav?
If yes, what is the best way to do so?
...
Ok, been scratching my head on this one for a bit now... seems related to this ol' chestnut
Here's my problem:
var testlength = theForm.elements.length;
var testlastelement = theForm.elements[testlength].type;
testlength returns 60
BUT!
testlastelement comes back as "undefined" (null or not an object)
What gives?
FWIW, my page ha...
How can I rewrite this code to check for all characters including the swedish å, ä, and ö characters?
alphaExp = /^[a-zA-Z]+$/;
The above only checks against english letters!
The swedish contains å, ä, ö coming after the Z... rest is all the same as english.
Thanks
...
I have a webpage, on which I am using Ajax to replace different divs of my page against some click events.. All works fine for regular HTML... but when I want to add a SWF object tag through function
document.getElementByID("div-id").innerHTML = "<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000> .... All flash movie code ......
I have what I thought was a relatively easy Ajax/animation that I'm adding to a client site to select between projects for display as images. The flow goes something like this:
User clicks on a thumbnail in a project overview (pHome).
Using jQuery, ajax load in an XML file with the image, caption and project description data (project1...
Hi,
I need to play on my .swf a movie (h264) from the users' hard drive.
Unfortunately the as3 components only read from URLs or streams, and you can't set the data or load from your c:/ path as the security sandbox stops you. Here is what each component loads:
Video >> netStream
VideoDisplay >> URL
VideoPlayer >> URL
I tried attac...
Hi,
I am aware of ways I can preload images (and css files) using hidden embedded tags/includes, css styles and javascript but these all rely on the need to embed an extra tag or css rule to load each of these files and for each new image I must remember to add in another preload rule.
What I am looking for and can't seem to find anywh...
If I have a chunk of code like this:
.hover(
function () {
hoverState($("#navbar a").index(this),1);
},
function () {
hoverState($("#navbar a").index(this),-1);
});
Is there any way to get rid of the anonymous functions and just say:
.hover(
hoverState($("#navbar a").index(this),1),
hoverState($("#n...
What's the best way to minify the ASP.NET generated Javascript, such as the ones served by webresource.axd, in ASP.NET 3.5 at runtime? I tried using the MbCompression module but it's not working with those resources.
...
Hi.
This might be a little bit odd question, but Im trying to figure out function that will remove numbers that are repeating them self.
this is my html
1234123<br>
23434<br>
5696<br>
5696<br>
34096756098<br>
I need function that will return numbers numbers without those that are duplicate them self
1234123<br>
23434<br>
5696<br>
3...