How to get the first form element (input element) that occurs on a page and set focus to it?
I would like to change the practice where I have to set focus manually in every single page to a certain element like this
$("#Clients").focus()
I want something universal, something that will figure out the first input automatically and put t...
I have dajaxice installed on my python2.6 dist-packages folder, that seems to work alright with importing the stuff. But it throws all kinds of errors, since the django template tags are not being rendered.
invalid property id [Break on this
error] {% for module in
dajaxice_js_functions %}\n
Makes sense, so I tried putting the ...
Is it safe to share data between flash and javascript using ExternalInterface? I'm building a game where I want to pass scores to js, not sure if this is safe enough.
Thanks
...
Hi there,
a site i am working on requires to have an option to pay with paypal and another through direct billing.
I though the shopping cart would lead to a payment method and depending on the payement option selected either the user will be sent the bill via email or rerouted to paypal to complete the payment.
I was wondering if anyon...
Microsoft showed off some enhancements to Bing.com in IE9. One is a html5/css3 trick that is referred to as an accordion. As the user scrolls down, links are first displayed as a stacked accordion and with more scrolling the summary text is displayed. you can see it midway through the video here:
http://www.bing.com/community/blogs/searc...
Hello all,
I think I have a URL encoding issue. I need to open a window using Javascript and pass a SQL Select query to it. So I have done this:
window.open('view_query.php?sql_query=' + query + '&db_name=' + db_name);
This has worked for me, but I have a query that breaks this:
SELECT a FROM table WHERE field like '%adhoc%'
Now ...
Hi,
i am using Jgrid. i am injecting the data to the Grid using Xml as we most of us do.
i want the batch update to database, my requirement that when i click on the "Save Change" it generate the Xml of current(updated) grid data.
So, how can i generate the Xml of Jgrid data.
please help.
here is the code.
<!DOCTYPE html PUBLIC "-/...
Hi,
I am trying to make a node.js file uploader with a ajax progress bar.
var formidable = require('./formidable'), http = require('http'), sys = require('sys');
http.createServer(function(req, res) {
if (req.url == '/upload' && req.method.toLowerCase() == 'post') {
// parse a file upload
var form = new formidable.IncomingFo...
This question may have been asked before, but I couldn't find an answer to it using both Google and the built-in search function of this site.
I want to use jQuery on my website, but only if it is displayed on a desktop computer. If my site is displayed on a mobile device, I don't want it to load jQuery.
What's the best way to do this?...
I would to use a callback function in the same 'class' when the ajax request is successful. Here's the code
$.ajax({
type: 'get',
url: ajax_url,
success: this.callback
})
this.callback = function() {
// ERROR! this doesn't point to the right context!
this.run_some_process();
}
Are there any built-in JavaScript construc...
I am creating 2 drop down menus where the first is a start time, e.g. 8:00 am which uses a loop to generate the times, this works fine and the drop down menu has the desired time frames, now i need to create a script which returns as false if the start time is greater than the finish time and i have this:
var conting_timefrom=frm_contin...
When we dynamically insert JS spript in head, it triggers unblocking(or parallel with other resources) download of JS file. Once the JS gets downloaded, does the browser block while parsing and executing the script or the parsing and execution is also aynchronous?
var headID = document.getElementsByTagName("head")[0];
var newSc...
I was trying to get a symbol like to be a default value for a text field,
I am trying to set the default by a javascript , but all i get is ® or &® in the text box, i am doing this from script as i am using drupal , so i dont have html files , i even trie ddefault value option in hook_form()
...
My sandbox is here: http://9.latest.truxmap.appspot.com/
First click a marker on the map (if there are none when the page loads, check the 'food trucks opening soon' box in the navigation widget). Next go to the 'Reviews' tab.
In GWT, everytime I open a marker I'm calling the javascript function resizeReviewTab() which corrects styli...
Hi, I'm putting google maps markers into array, and everything works fine, when i do it manually:
var m =[];
m[0] = new google.maps.Marker(.....
google.maps.event.addListener(m[0], 'click', function()
{
alert('Markerklik');
$("#trasa").append(m[0].getPosition().toString()+"<br>");
});
m[1] = new google.maps....
Possible Duplicate:
Detect Internet Explorer 6 or below in jQuery
Is there a way of detecting if the browser is pre IE7 (so IE6 or before) using javascript or jQuery?
I found a similar question on here where the answer was basically "don't do that". Well, I don't care, I still want to :)
...
i have following code
<html>
<script type="text/javascript">
function writeit()
{
var tbox = document.getElementById('a_tbox_1');
if (tbox)
{
tbox.value = '';
}
tbox = document.getElementById('a_tbox_2');
if (tbox)
{
tbox.value = '';
}
}
</script>
<form name="a_form">
Product name:
<in...
Hi,
This is not a jquery question.
I want to create a callback function...so users would use it like so:
myfunc.init('id',{option1: val, option2: val2}, function() {
//in here users can now call methods of myfunc
});
How do I do this within my code. OS once I know my script is ready I want to be able to somehow call this anonymo...
I want a regular expression for javascript to validate host address like
http://192.168.10.10:8089/
and
www.abc.com
and
www.abc.com.aa
...
When I create SWF objects that are temporarly hidden in tabs, thus not fully loaded in some browsers, like FireFox, I can't seem to find way to figure out if the SWF is loaded or not, so I can communicate with it.
/* Generate SWF (onDocumentReady())*/
swfobject.embedSWF("graph.swf","line-graph-one","100%","250","8","expressInstall.swf"...