I have this: 2010-04-08T01:01:00Z
I want to remove the 'T' and everything behind it as well.
Also I would like to rewrite the date into this format: 08-04-2010
How can I do this the easiest way?
Thanks
I have multiple dynamically generated buttons with a class name of ".button". Each of these are given an unknown ID value used to uniquely identify them. In jQuery I must select one and alert the values.
<div class="button" id="3"></div>
The ID value is dynamically generated, therefore I do not know it. I'm new to jQuery but am basically looking for something like this:
$(".button").attr("id").val();
How do I target one button when there are many? Thanks!
Hi, I have this code which I am trying to change the ID of on.hover.
<span id="slidingProd">
<a href="{link controller=order action=addToCart id=$product.ID returnPath=true}" rel="nofollow" class="addToCart" title="Bestill"
onclick="addToBasket(); return false;" id="fly_to_basket"> </a>
</span>
I tried to use this jQuery, but it doesn't change the ID.
$(function() {
$("#fly_to_basket").hover(function() {
$(this).parent().attr("id",slidingprod(1));
});
$("#fly_to_basket").hover(function() {
$(this).attr("onclick",addToBasket(1));
});
What am I doing wrong?
Thanks :)
I use Solr in my website, and now I am about to configure my VPS account.
I am at the stage where I need to install java in order to make Solr work.
Now, I only plan on running solr, and using it as it is (I have no java programming skills at all), so my Q is, do I need the entire JDK which includes JRE, or is JRE enough?
Thanks
BTW: My server OS is Linux (ubuntu 9.10).
Thanks
It's simple to observe the documents scroll event but I can't seem to find anything relating to the scroll of any other element with css property overflow being set?
To get around this myself i've been observing mousemove which only fires while you hold down on the scrollbar but this would need to be teamed with a mouse wheel observe also to get the full effect.
Could anyone point me in the right direction for a better way of implementing this?
This question already has an answer here:
Is there any way to specify a suggested filename when using data: URI?
11 answers
I use javascript to generate a file and download.
It seems that depending on the version of chrome, the download file names can be auto renamed to 'download'. is there a way to avoid it?
this is my code:
var link = document.createElement("a");
link.setAttribute("href", 'data:application/octet-stream,' + 'file content here');
link.setAttribute("download", 'file1.txt');
link.click();
This is not a duplicated question because i am using the latest chrome and the previously suggested hyperlink is exactly what i am using. I think chrome v34 works fine. but once my chrome autoupdated to v35, it went back to 'download' file name.
I have two div tags. One contains text and one contains an image. They are both side by side and I want the text in the first div to align to the bottom of the image. The image is to the right of the text.
Or should be this way. When I play with various CSS options things start jumping around... HELP !!!
I want to grab all the inputs inside a form, in order to submit them.
The point of this is to use jquery's ajax to submit a dynamically sized form.
Surely there must be an array inside the dom somewhere which i can just do something like...
docment.forms['form'].elements
which only lists inputs for that form, meaning I can loop through them and grab their values to play around with?
I have my own server (with root access).
I need statistics of users who visit my website etc etc...
I have looked at an app called Webalyzer...
Is this a good choice?
I run apache2 on a Ubuntu 9 system...
If you know of any good statistics apps for servers please let me know.
And a follow-up question: All statistics are saved in log-files right? So how large would these log-files become then? Possibility to split them would be good, dont know if this is possible with Webalyzer though...
Pretty much all in subject, do i need use javascript to acheive this pr maybe css will fit well? Also I need that solution to work fine with IE6.
If javascript is only solution then how to animate div to change position smoothly?
Thanks in adavnce for any help
I'm referencing my js files before the closing body tag, hoping they will be parsed last (as they're not needed untill last). However when I analyse activity with PageSpeed in Firebug, the images seem to be requested last.
How can i make the images higher priority than the js?
In php how would I grab all javascript from a page given it's url? Is there a good regular expression to get the src of all javascript script tags or the script inside of them?
Well, I'm pretty much trying to figure out how to pull information from a webpage, and bring it into my program (in Java).
For example, if I know the exact page I want info from, for the sake of simplicity a Best Buy item page, how would I get the appropriate info I need off of that page? Like the title, price, description?
What would this process even be called? I have no idea were to even begin researching this.
I have a division in which i'll be having dynamic numbers of colorful blocks(that too divisions) at various instances. On clicking the box, i want them to expand & cover whole screen. the problem is, while boxes are expanding, they are expanding at there own position & not shifting in the screen..
I used:
.elemented1 {
width: 100%;
height: 80%;
-webkit-animation: elemen1 0.3s;
border: 0px;
}
@-webkit-keyframes elemen1 {
from {
width: 49.6%;
height: 39.6%;
}
to {
width: 100%;
height: 80%;
}
}
This is working fine but i have to put blocks dynamically. I cant write animations for individual blocks as they will be of different sizes.
is there any way when using a div for a background image- to limit the height to only the content displayed?
im putting the background image in a div because i want it centered via position:relative but the image doesnt show up unless i put a height on the div, and thats not what i want because i dont want to be able to just scroll down to the bottom of the image where theres no content
ive tried putting the background image on the body css but if the browser is less than the width of the image, it just throws it over to the left and you can only see half of it- is there no way to make the background position:relative on the body?
sorry if that doesnt make sense <
thanks
Hi all,
Is there a way to detect the height and width of an iframe, by executing a script from inside the iframe?
I need to dynamically position some elements in the iframe according to the different height/width of the iframe.
Would there be any difference if there are multiple iframes in the same page? i.e. each iframe wants to find its own dimensions.
Javascript or jquery solutions welcomed.
Thanks!
<iframe src='http://example.com' width='640' height='480' scrolling='no' frameborder='0' longdesc='http://example.com'></iframe>
Hi There,
I am struggling alot with some PHP I am needing to implement a next and previous link, basically I have a search function on my site, that returns multiple results and click on a result navigates to that results page, I want to then be able to click next on that page, and be taken to the next result in the sequence that was returned by the users original search? Is this possible, and how? I have no clue.
if i remove a.three display block this shows up fine. However what i want is the X to be at the right side. I tried float: right but it puts the x on the next line. How do i get the X on the same line? Here is some code.
Why when you buy a online store system that's advertised as Easy for you to manage and allows to change and tweak the look of store pages with unseen ease is it exactly the opposite? When you're offered six months free support do you never get an answer and finally when you make layout changes to one page, does a completely unrelated business logic completely break down?
So really two questions:
Why do authors of such systems put them up for sale before they're completed?
How to exact revenge on said author?
Thanks.
I need to divide into groups several <li> elements in a list, is it possible?
(I know I an give each element different class names/separate into different <ul>)