I don't want to download gears library into my local computer. I prefer to use gears library by cross domain (xDomain) loading. Can I use Google gears library files by xDomain loading like this:
<script type="text/javascript" src="http://.../grears_init.js"></script>
where is the public HTTP URL for the gears library if poss...
I've written a Javascript script that automatically resizes the height of an IFrame, depending on its content. This is done as soon as the content of the framed page is produced; in Firefox no problem, but in IE the script is correctly executed but no effect is seen: the method is called in a callback function. Any sugestions?
If I execu...
I'm using sifr for the first time today. I have it up and running; however, I need some help. Rather than explain, I'll show you the code below:
<div id="pullquote">“Fantastic property, facilities and location. We
couldn’t have asked for more!” <em>Mr & Mrs. Smith</em></div>
So far, so good. I have then styled that in the s...
So I've got a bookmarklet which should open up a page in a new window.
javascript:window.open('http://timetableapp.com/TimeTable/bookmarklet/index.html','TimeTable%20Timer','status=no,directories=no,location=no,resizable=no,menubar=no,width=400,height=210,toolbar=no');
The code works perfectly in Safari, Firefox, and Chrome; but as ex...
I've been experimenting with using the <canvas> tag for drawing simple diagrams and charts, and so far it's pretty easy to work with. I have one issue thought. I can't figure out how to draw text on a <canvas> in Safari. In Firefox 3.0, I can do this:
Chart.prototype.drawTextCentered = function(context, text, x, y, font, color) {
i...
i would like to remove/hide a li based on the content inside it, is this easy to do?
eg. the code below: if span#type has no content then li.grouping should be removed or hidden.
<li class="grouping"><span class="desc">Options:</span><br /><span id="type"></span></li>
...
I have a collection of extjs objects on a webpage, developing using Firefox so I can debug using Firebug. After a while I start IE to check compatibility and get a blank page in IE, but all works in FF.
In IE I get no Javascript errors.
...
Hey,
I have a problem with my ajax script, I put in some alerts to see where the problem lies, here is my script:
<script language="javascript" type="text/javascript">
function positionUpdate(var1, var2){
alert ("1");
var queryString = "?var1=" + var1 + "&var2=" + var2;
alert ("2");
ajaxRequest.open("GET", "position_update.php" + query...
Do assignments in document.ready (click(fn) specifically) apply to newly appended elements that match the selector?
If not, how can I assign it to this new elements? Do I have to write the assignment after every append or is there a better way?
...
I am trying to trigger a show/hide of one div at a time.
What is happening is that all the divs (.shareLink) are opening at the same time.
Below is my jqury:
$(document).ready(function(){
$(".shareLink").hide();
$("a.trigger").click(function(){
$(".shareLink").toggle("400");
return false;
});
});
Below is my HTML:
<dl class="links"...
I was reading Eloquent JavaScript and I came across this example for the puzzle:
Consider this puzzle: By starting from
the number 1 and repeatedly either
adding 5 or multiplying by 3, an
infinite amount of new numbers can be
produced. How would you write a
function that, given a number, tries
to find a sequence of additi...
I have been playing around with a search control and i have noticed that when you try and press enter from within the textbox it submits the form but doesnt click the search button (like i want it to).
My markup is:
<div>
<span>Search</span>
<asp:TextBox ID="txtSearch" runat="server" Width="170"
onkeydown="if ((event.wh...
hi everyone
how can i move the div from right to left. same as cycle rotation.
i having one html page in that 2 buttons called forward and backward .
when the user click forward button it div show move to next div1. same as backward
button should move to previous button.
Thanks and Regards
Ravi Kumar
...
Ok, this is like two question in one!
Why is this JQuery function call failing? or how should I call the JQuery function? Firebug tells me that $('#login').slideup is not a function.
setTimeout("$('#login').slideup('slow');",2000);
How can I declare a JQuery function externally (not binding it to anything and not after document().read...
how to close a browser window within given time using javascript also without the warning message in IE and Firefox
...
My primary question is which approach is faster.
Some briefing
I'm developing an application using Mozilla.
I have this one module where I capture some data and store it in database. The data comes in intermittently. No duplicates are to be stored. For discussion sake we can assume a table with just one column, and let's name that c...
I have the following JavaScript code as a string literal:
var $Page = new function()
{
var _url= 'http://www.some.url.com';
this.Download = function()
{
window.location = _url;
}
}
Is there a way I could get the value of the _url variable from my C# code? An open source library perhaps? I did this using a Regu...
I get a parse error when using jQuery to load some JSON data. Here's a snippet of my code:
jQuery.ajax({
dataType: "json",
success: function (json)
{
jQuery.each(json, function ()
{
alert(this["columnName"]);
});
}
});
I get no errors when parsing a non-empty JSON object. So my gues...
This is the iframe I'm trying to access:
<div class="mceBody" id="additionalTxt_b">
<iframe frameborder="0" id="additionalTxt_f" src='javascript:""' class="punymce"/>
</div>
Using this line:
frames['additionalTxt_f'].document.getElementsByTagName("body")[0].innerHTML
For some reason I'm getting "frames.additionalTxt_f is ...
It seems to me that I should be able to do the following to detect a click event on a line on a google map:
var line = new GPolyline( ... );
map.addOverlay(line);
GEvent.addListener(line, "click", function(latlng){ alert("clicked"); });
The api reference says this is available in version 2.88, which was released in 2007(!?), so I'm as...