Hi all,
what I'm trying to do is get the ID value of the referring a. The code for my a looks like:
<a class="photoBig" id="<?php echo $photo['id'] ?>" href="<?php echo $f->buildPhotoURL($photo, 'large') ?>" title="<?php echo $photo['title'] ?>">
I'm using phpFlickr to assign the ID's plus some various other things, which works fine....
Is it possible, in either the jQuery API or the DOM, to check if an element exists on the page or not?
Consider these two variables:
var selected = $('span#mySpan');
var created = $('<span id="mySpan">Testing</span>');
Both will return a jQuery object containing a span element. Is there any way to tell that the first exists on the pa...
Hello,
I'm building a web app for Sign In / Registration etc, and do not want the page to have to refresh.
www.mysite.com
I know how to set a hash on the URL without refreshing the page:
location.hash
to give: www.mysite.com/#signin
But what I want: www.mysite.com/signin
Without the hash so it's SEO friendly. Also, once I set tha...
I am trying to have a method in my code behind at runtime add a function at runtime.
I can dynamically add elements to my document with no problem. So I tried the same strategy for adding a script block.
Here's what I have tried thus far with no luck. It can create the script block but when I try to add the function. The only thing I ca...
I made and use this one, but I know theres better ways :
function toggle_timer()
{
if(timer_id > 0){
clearTimeout(timer_id);
timer_id=0;
}
else timer_id = setInterval("go()", interv);
}
Its based on the assumption that youll only use 1 timer (otherwise, who knows which timer youll clear?) So far this has...
I just discovered on my site using magento 1.3.2.2 that on a bundled product, when adding different options the price does not change in internet explorer. It works fine in all other browsers however.
In internet explorer I get the error message.
Message: Object doesn't support this property or method
Line: 34
Char: 9
Code: 0
URI: /ski...
I'm really interested in implementing Promises and related features in client-side Javascript. From what I've seen, the focus in implementing these technologies in Javascript seems to be on server-side javascript (SSJS) with Promises in CommonJS. Ideally for me, I would find a solution that works well with jQuery or Google Closure Librar...
I have a page that sends an XHR request when a form is submitted and I would like to get Chrome to break when it receives a response. It seems like the best way to accomplish this would be if Chrome has a javascript function that I can call that breaks execution but I've been unable to find anything like that so far. Is there another sol...
Hey, I'm trying to set variables in my CSS so that I can allow subscribers to customize the colors of their page. I'd rather have as many files on my static server as possibly.
Is there a good / easy way to do this? Should I just have a CSS file containing all the editable parameters in a CSS file inside the application?
Walker
...
I'm trying to build a site that runs without refreshes, using Jquery and PHP to populate divs that slide in/out. basics work OK, but I am having trouble passing session values around.
I have a login panel first that captures "$user" in PHP and then stores is as a session variable $_SESSION['user'].
I can then use it on the first page...
Is there any way, from Javascript, to determine either the system's selection color (the color it makes text that the user selected), or the system's focus color (the color that is added to the outside of a tab-focused link or form element)?
...
My table has static width values but sometimes table cells of a certain column can contain text which is too long and which messes up the table's width. I'm looking for a way to dynamically shorten text (kind of like a table grid functionality but then without grids) because it can be of a variable length, and when one hovers over the ta...
My html page dynamically loads pages via Ajax for dynamic panels on the page. I need the script tags in the dynamically loaded pages to be executed. I fixed the code from a SO question. It works fine on FF/Safari/Chrome.
But dom nodes of type script work differently on IE. -- I can't seem to add text to a script node in IE 7:
// varia...
Hello , i'm working on this application that has a calendar on a page that has a lot of request.form("var") inside.
This is a monthly calendar and it has on the top previous month and next month .
When i click now on next month i get an URL like: ?date=8/14/2010
My question is how to pass this value to the calendar via jquery with no pa...
I'm trying to apply unknown styles to unknown selectors and it would seem that shorthand css cannot be applied using jQuery's .css() method. Is this correct? Is there a work-around?
Note that I am building the object dynamically to be passed in to the .css() and do not want to use .css('background','#000') syntax.
$('#example').css({ba...
Hello all,
I'm actively learning javascript, and I came across the following statement:
Object.prototype.toString.call([]);
And I don't know what it means or what it does.
I have a vague understanding of .call, in that it allows you to call a method in the context of a different object (I think), but I am having a hard time unders...
Hi,
I have a large amount of XHTML content, that I would like to display in WebKit. Unfortunately, Webkit is running on a mobile platform with fairly slow hardware, so loading a large HTML file all at once is REALLY slow. Therefore I would like to gradually load HTML content. I have split my data in small chunks and am looking for the p...
I've got a Hybrid Cocoa/Webkit application that has extensive Javascript usage, and seems to break every time Apple updates the Safari browser (or the underlying webkit framework in OSX). I understand it will probably mean a much bigger binary, but is there a way to force my application to use an older, bundled WebKit framework vs. the ...
How to split the date,time using java script ? I am getting date,time 2010-05-04 20:13:12.0.But i need only date.
date format mm/dd/yyyy
var cdate = gridline[i=1]["CDATE"];
Now i need cdate as mm/dd/yyyy only.
Please help me.
...
I've been working on this for some time, but can't seem to find an adequate solution yet.
The page is XHTML with inline SVG which is animated with ECMAscript once the SVG is finished loading. There is a 0.5s pause, then an eye in the middle opens. It works on Safari, Firefox, and Chrome on MacOS X.
The problem is in Chrome on Windows t...