javascript

How are JavaScript files loaded and executed?

Hi, I don't often see talk or research on JavaScript file loading/executing order. I'm interested in sites explaining how JavaScript is being handled. In particular, if I have <script src="a.js"></script> <script src="b.js"></script> <script src="c.js"></script> I presume a.js is downloaded first, then b.js and finally c.js or are th...

Upload a library photo with Android web browser

As is disabled on Android, is it possible to upload a photo from library, in Browser somehow? Camera/Photo Library JavaScript API? Thanks ...

How can i hide the location and status bar in Mozilla firefox in javascript

In a project i use the following code to open a window: window.open(href, 'mysite' ,'width=401,height=380,directories=no, toolbar=no, scrollbars=no, location=no, resizable=no, menubar=no, status=no') But Mozilla firefox and IE always show the location bar and Status bar. How can i hide those? ...

javascript hide code for secret keys etc

I am using the Ribbit javascript api and trying to figure out how not to show the secrety key and all those application settings which are set in a code block using a Ribit.init function: Ribbit.init("consumerKey"); ...

Remove 'onclick' command from a child of a div

I am working on a website which is available at: http://www.rate-me-now.com The "top 10 Most beautiful Women" box is represented by a div ("box1"). Since I wanted that all this page-area would act as a link that clicking on it will cause a submitting of a form and moving to another page, I added to that div the attribute: <div class="...

How is it possible to dynamically change the flash file using swfobject through javascript

I'm looking to dynamically change the flash files based from an hyperlink on the page without the page having to reloading. Is this possible through javascript? ...

Are non-cached js-scripts attached to the main file on ajax-get request?

Hi there, I'm using the following script to request new content to a file called index.html: function addJS(js_urls) { $.each(js_urls, function(index, value) { $.ajax({ type: 'GET', async: 'false', //We should not cache dynamic js-scripts dataType: 'script', url: value }) }) } fun...

Suppose I have this loop in Django...how do I display this?

{% for p in profiles %} <div class="result"> {{ p.first_name }} </div> {% endfor %} Suppose I have 1000 of these, in a huge list. How would I make this code appear every 15 times? <div class="menu">abc</div> ...

Asp.net MVC jQuery Ajax calls to JsonResult return no data

I have this script loaded on a page: (function() { window.alert('bookmarklet started'); function AjaxSuccess(data, textStatus, xmlHttpRequest) { if (typeof (data) == 'undefined') { return alert('Data is undefined'); } alert('ajax success' + (dat...

SwfObject and Google Chrome

Hi, I have a strange problem with SwfObject and Google Chrome browser. In my webpage is form where user can input link of the Youtube video. After form submit video must appear on the same page in div, near the form. In other browsers it works good, but in Chrome I have to refresh page manually if I want to see video. I do not understa...

Sandboxing javascript module

Is it possible to sandbox javascript module from DOM manipulation? Fo example var Core = { register: function(config){config.init()}, publicApi: { msgbox: function(msg){alert(msg)} } } Core.register({ name: 'testmodule', init: function(){ /* from there i want to see only function defined in Core.pu...

How do I strip all html tags in javascript with exceptions?

I've been beating my head against this reg ex for the longest time now and am hoping someone can help. Basically I have a WYSIWYG field where a user can type formatted text. But of course they will copy and paste form word/web/etc. So i have a JS fucntion catching the input on paste. I got a function that will strip ALL of the format...

Trouble with jQuery's JSON Method

$(function(){ $.getJSON('http://ws.audioscrobbler.com/2.0/?method=user.getweeklyartistchart&amp;user=ElicitBelief&amp;api_key=25135a535781328243f9e31968abc14&amp;format=json', function(data) { alert(data) }); }); Firebug says: GET http://ws.audioscrobbler.com/2.0/?method=user.getweeklyartistchart&amp;user=ElicitBelief&amp...

How to explode jquery tabs into the whole page

I have a page that looks something like this: +-------------------------------------------+ | | | +----------------------------+ +--------+ | | |main | |sidebar | | | | | |+------+| | | | | ||jquery|| | | | ...

email script for xml control data

So I bought this image uploader program called q-imageuploader.The company doesn't help at all with scripts to let you know a file was uploaded and the index file that is created is rewritten every time a file is uploaded. I want to and/or make an email script that will let me know that a file has been uploaded, or modify the existing ...

alert(line) alerts 'ac' and typeof(line) is 'string', but charAt is not a function

alert(line) alerts 'ac' typeof(line) is 'string' When I run line.charAt(0), charAt is not a function. When line is 'http://www.google.com/', it works, I think it's the UTF-8 encoding of the file that I opened... How to make charAt work with UTF-8? UPDATED: http://mxr.mozilla.org/mozilla-central/source/netwerk/dns/src/effective_tld_n...

A problem with dynamically created image

Hi, I have problem with dynamically created image (JavaScript). I want to change the innerHTML property of a table cell: var x=document.getElementById('myTable').rows; var y=x[0].cells; var myImg = document.createElement('img'); myImg .setAttribute("alt",""); myImg .setAttribute("style","vertical-align: middle; visibilit...

What stops Firefox from rendering a page ...

I'm currently facing the problem that the server delivers a page with valid xhtml (transitional) but Firefox (3.x) refuses to render it every now and then. Reloading the page (F5) shows the rendered contents as supposed. Looking it up in Firebug shows that the server delivered everything and that the html-header als "arrived" ... but it...

Is it recommended to use javascript to build layouts?

I'm creating a blog, but I need box-shadows for my boxes, so I'm asking the following. Is it good to add shadows via a)images/css or b)javascript? I've heard that lot of people don't have javascript enabled while browsing, so is there this a problem? It would be easier and simpler to create these shadows with javascript than adding a m...

How open a local file with the associated program from a web page?

I know the user of my app has a local file named c:\sourcefile.cs, I need to find a way to render a link to that file so that when he clicks the link, it will open the file in Visual Studio. This is for internal use in our dev team so I don't mind using unconventional means to do that if there is no standard way to do it. The solution ...