Hi, I have a LinkButton click event in asp.net 3.5 that I must assess whether a value exists and return a alert.
I have no idea how you can do. I think we need to Ajax
Can someone help me
Thanks
Suppose my code is like this:
<td class="apple">
<div class="worm">
text1
</div>
</td>
<td class="apple">
<div class="worm">
text2
</div>
</td>
<td class="apple">
<div class="worm">
text3
</div>
</td>
How can I loop through everything with "tr class apple", and then grab the text of the div inside with id "worm", and then set each of the .attr() as that text?
Result:
<td class="apple" title="text1">
<div class="worm">
text1
</div>
</td>
<td class="apple" title="text2" >
<div class="worm">
text2
</div>
</td>
<td class="apple" title="text3">
<div class="worm">
text3
</div>
</td>
Thank you
Hello,
This are my two functions, on single click it works fine, but on dblclick both functions execute, any idea? I tried using live instead of delegate but still both functions execute on dblclick
// Change Status on click
$(".todoBox").delegate("li", "click", function() {
var id = $(this).attr("id");
$.ajax({
//ajax stuff
});
return false;
});
// Double Click to Delete
$(".todoBox").delegate("li", "dblclick", function(){
var id = $(this).attr("id");
$.ajax({
//ajax stuff
});
return false;
});
I set an request attribute in my action class as follows:
request.setAttribute("xFg",Boolean.TRUE);
I want to retrive this in my JSP. I want to retrive them using JSTL tags. I tried this :
<c:if test="${requestScope.xFg}">
<c:set var="showlist" value="true" />
</c:if>
But c:if didnt work, i mean it didnt goto c:set
I tried to print the sameusing c:out but nothing got displayed. What is wrong or How should i test request attribute value. I havent used requestScope so far. Is requestScope the option to get the request value? pls help.Thanks in advance.
I'm developing a website that uses an Ajax plugin to like/dislike/comments an item. But when there are multiple items on the same page, the page takes too long to be displayed. On google chrome for instance, for 10 items you have to wait something like 10 seconds before you can see anything.
But in Firefox, and IE 8, the other elements of the page are displayed, and only the likes/dislikes take some time. But the advantage is that they are displayed as soon as they are loaded. So this is much better.
So how come Google Chrome is less efficient than Firefox and IE? Is there a trick to display on Chrome the page like in Firefox?
I have attached a Firebut image of the loading page.
http://img59.imageshack.us/img59/9475/scriptj.png
Thanks for your help.
/^\d{1,2}[:][0-5][0-9]$/
is what I have. this limits minutes to 00-59. It does not, however, limit hours to between 0 and 12. For similarity and uniformity I would like to do this with RegEx alone if possible.
Further-more I would like the first digit to be optional. i.e. 09:30 accepted as well as 9:30. I played around with ranges, but something out of range is always acceptable.
I have a div which has this list of suggestions. But i need to allocate it at the caret position of the textarea. Is this possible if yes, help me to do it.
function findOffsetPosition(obj) {
var posX = obj.clientLeft; var posY = obj.clientTop;
while (obj.offsetParent) {
if (obj == document.getElementsByTagName('body')[0]) { break }
else {
posX = posX + obj.offsetParent.offsetLeft;
posY = posY + obj.offsetParent.offsetTop;
obj = obj.offsetParent;
}
}
var posArray = [posX, posY]
return posArray;
}
I am working with openlayers and I can get a point on a map but I can't get the individual coords.
feat = drawLayer.features[0];
var geom = feat.geometry;
var loca = geom.toShortString();
var long = loc.substr(0,9);
alert(geom.toShortString());//returns the correct coords in xx.xxx,xx.xxx format
alert(loca);//returns 2 very large numbers in xx.xxx,xx.xxx format
alert(long);//returns the first, incorrect number
What exaclty am I doing wrong and how can I correct it?
Thanks
I've got the following function that manipulates an element according to the data being sent (an object).
function manipulateElem (elem, data) {
for (var key in data) {
elem[key] = data[key];
};
}
manipulateElem(document.getElementById('test'), {'href': '/home/', 'style.color': '#000000'});
As you can imagine, the later (style.color) doesn't work. How would one solve this the best way?
I've written a simple script that displays circles over an image.
When you hover over a circle it expands to a tooltip.
$('div.tooltip').live({mouseenter:function(e){
... animate tooltip open;
},mouseleave:function(e){
... animate tooltip closed;
}});
When you click on the open tooltip it displays a lightbox with more information.
$('div.tooltip').live('click',function(e){
... open related lightbox
});
Everything works as it should, except on mobile devices. When I tap the circle to open the tooltip it fires the click event and completely bypasses the mouseenter/mouseexit events.
Any ideas would be greatly appreciated :) Thanks
I have a form and I can't get my links to generate. The next button is supposed to light up followed by a bit of text.
How it's supposed to work: http://jsfiddle.net/zMQcn/
The one that doesn't work: http://jsfiddle.net/Yq8Qf/
document.getElementById("linkDiv").innerHTML="<input type=button value=Next onclick=\"window.location.href='http://yahoo.com/';\">other 8b white</input>";
}
function attachFile(){
document.getElementById("file").click();
return;
}
Attach File
I've written like this and it's working on IE but not working on FireFox
Hi,
I would like to find a function that will return this kind of formatted values :
1.5555 => 1.55
1.5556 => 1.56
1.5554 => 1.55
1.5651 => 1.56
toFixed() and math round return this value :
1.5651.fixedTo(2) => 1.57
This will be usefull for money rounding.
how i can get the contentWindow.location of the iframe where the iframe src contain different domain name?
i have googling about this , but i found some thing like proxt,
so how i can get the location of the window inside iframe where iframe src is not on the same domain?
So basically making some concept logic for a project I am working on. Basically it's a portfolio and each box will be a picture and I want to be able to change the value of a h2 to some type of description. Right now it's just a black box so 'square1, square2, square3...etc' will work for now. I looked up some stuff on jquery and found this link from an SO answer. Basically what I need but he is only shifting through one piece of information instead of many in my case. Wondering how I can achieve that via jquery. I imagine I would need to make an array with all the descriptions I need, and (this is where I am lost) somehow attach the value of array to the square and then from there change text of h2 to the array value. Thanks for any help in advance here's what I have so far (not much just did some foundation work). Not sure if this matters but if there is no hover I want the h2 to say nothing.
HTML (makes me post code if I have jsfiddle)
<div class="squares">
<div class="square1"></div>
<div class="square2"></div>
<div class="square3"></div>
<div class="square4"></div>
<div class="square5"></div>
<h2 class="squareIdent"> </h2>
</div>
I have a simple html dropdown, I wants to use jQuery if possible to display all the options if this control has the focus(as if the user click on the dropdown). I have tried jQuery trigger(), click(), to avail.
<select id="single">
<option>Single</option>
<option>Single2</option>
</select>
I have image in website's header as background. Now, when page is loaded, I'd like to move it slowly from left to right (about 100 pixels) and then stop. Is there any not too complex way to do that?
<a onclick="run('Hi, Tim! I&#039;ve got two', '">test</a>
The onclick event is not run at all.
The above is generated by something like this:
<a onclick="run(<?php echo htmlentities($str) ?>)">test</a>
How to fix it?
Anyone know why the animation is rough (doesn't really animate) on this bit of jquery?
$('.close').click(function() {
$('.hidden-content').fadeOut('fast', function (){
$('.serv-button').fadeIn('fast');
});
});
Basically when you click on the close button a ".hidden-content" should fade out and the "serv-button"'s should fade in. But instead they just appear and do no fade. Here is my working example, it's on the services section:
http://www.hdesignonline.com/qdup/
Basically I need the content to fade out exactly how it fades in...