I've been asked to write a web application in PHP to handle customers, sales, estimates, invoices... I think I could benefit from a JavaScript library that could encapsulate some basic UI functionality (sortable listings, masked input fields, date pickers...) but I don't want to adopt a heavy framework that forces me to go through a stee...
Hi,
I've application to open popup window to print page.
function printHTML(urlPath) {
var printPopUp = window.open(urlPath,null,"height=600,width=777,status=yes,toolbar=no,menubar=no,location=no,scrollbars=yes");
printPopUp.print();
}
This script is working fine in IE, but in firefox/chrome. print() function is overlapping window.o...
Using jQuery, what's the best way to automatically initialize a plugin on all current and future elements of a specific class?
For example, say I want all <input type="text" class="datepicker" /> elements to have the jQuery UI Datepicker plugin, including any I might create at runtime.
Essentially, I want to do something like this:
$(...
how to convert a HTML string to a plain text in iphone dev. Is there any in built functions which does it ?
I am actually downloading a html string from web and showing it in the UIwebview and i am giving the user a edit option so that the html needs to converted to tet so that user can edit
Thanks...
...
how to check 2 decimals in javascript?
E.g. 2.2.10
...
With this code I can check the caret position in a textarea in firefox:
document.getElementById("myTextArea").selectionStart
This doesn't work in IE 8. How can I get the caret position in IE 8?
...
This is a very old problem, but I cannot seem to get my head around the other solutions presented here.
I have an object
function ObjA() {
var a = 1;
this.methodA = function() {
alert(a);
}
}
which is instantiated like
var myObjA = new ObjA();
Later on, I assign my methodA as a handler function in an external J...
I am using the jquery ajax api so load in some content, the code looks like this,
$.ajax({
type:"POST",
url:"/search/location",
data: getQuery,
success:function(data){
//alert(getQuery);
//console.log(data);
$('body.secEmp').html(data); //overwrite current data
setUpRegionCheckBoxes(); //fire fun...
I have a container (div) with a background image. In this div there is a menu - a horizontal list. What I need is to insert an image onMouseOver, positioning it absolutely, and showing it behind the text (of course!) AND on top of the div's background image. I also use jQuery, but I think this doesn't matter. The problem can be viewed on...
Hello,
I was wondering if there is a way to get the URL of the returned resource after a AJAX call in JavaScript?
I want to use this with a form, which is in "mysite.com/users/add.html". This is a Spring MVC controller. If the validation of the form fails the controller will return the "users/add" view, but if the validation is OK it w...
i have some rows of data displayed in a table and on mouse over of each row i've list two buttons inside a div element and then display it for some time. And i've associated some functions to be called on clicking the buttons that are dynamically created and displayed elements..
So what i did was i wrote a function which will create ele...
I have jQuery thickbox(TB_iframe=true) which shows an https page in an iframe based overlay.
the parent page is http & overlay page is https. if i use
self.parent.tb_remove()
This does not work and gives me
Permission denied for <https://www.abc.com> to get property Window.tb_remove from <http://www.abc.com>.
Any solution....
I have a flash application written in action script 2, and at one point it makes multiple back-to-back JavaScript requests using getUrl().
They have to be done as separate requests because IE had a limit on the length of a single request, and fails silently if that limit is passed.
When ever this happens, if the user has their sound t...
Is there a set of things that every JavaScript programmer should know to be able to say "I know JavaScript"?
...
We are currently developing an ASP.NET MVC application which makes heavy use of attribute-based metadata to drive the generation of JavaScript.
Below is a sample of the type of methods we are writing:
function string GetJavascript<T>(string javascriptPresentationFunctionName,
string inputId,
...
Hi,
we'd like to measure "client side web site performance". i.e. we would like to have answers to the following questions:
how long did it takt to load and render a webpage (including alle graphics scripts etc.)
this bundled with additional informations like user-agent, operating system etc.
a graphical tool to analyze the data would...
I have a JS object I use to store DOM info for easy reference in an elaborate GUI.
It starts like this:
var dom = {
m:{
old:{},
page:{x:0,y:0},
view:{x:0,y:0},
update:function(){
this.old = this;
this.page.x = $(window).width();
this.page.y = $(window).height();...
I have a javascript that displays a generated text into a div:
document.getElementById('phrase').innerHTML = phrase;
PHRASE_TEXT_GETS_SHOWN_HERE
Basically I'm trying to set up a link that will take the text and post it to twitter with a link:
Clicky for tweety
How can I include the generated text in the link?
...
I'm working with someone else's code, so I don't know the whole picture, and I don't even know MVC that well, but here's the problem...
In Site.Master there's a
<%= Html.IncludeJs("ProductPartial")%>
which produces this line in the final mark-up
<script type="text/javascript" src="/Scripts/release/ProductPartial.js"></script>
I ma...
how do i make the div refresh, say after 10 secs and execute the run_query() function without clicking on the button?
<script src="scripts/ajax.js" type="text/javascript"></script>
<div id="quote"><strong>Quote of the Day</strong></div>
<div><a style="cursor:pointer" onclick="run_query()">Next quote …</a></div>
...