javascript

What's the simplest javascript function for requesting a .js file?

Hello, I was just wondering what the simplest javascript function would be to request a server side .js file. Currently I have a jquery-1.4.2.min file that weighs in at 70kb, and I figured that there has to be a way, using javascript, to request this file. That way, if the user doesn't have javascript enabled the function would be i...

How Does Google Analytics Track Incoming Traffic

I was interested in writing some home-brew analytic solutions and all the click tracking so far is really easy, however I was curious how GA gets the data showing how a user got to your site. Also as a followup I was wondering if it was possible to either write this functionality myself? ...

jQuery / Javascript: fire a rightclick on a normal-click?

hey guys, i don't think so but i couldn't find a quick answer! is it possible to show the browsers rightclick (context) menu when clicking the left mouse trigger? thank you ...

Javacript Validating Currency Amount

Hi, I am trying to validate a currency value in a shopping cart so that if it is less than $50 it hides the check out button. I have used the same script for min order units and it worked, but not for currency. Code below <script type="text/javascript"> setTimeout ("checkout()", 10 ); function checkout() { var tu = document.getEle...

I want to make a flowchart application in a browser. Which SVG Library to use?

As a fun project, I am going to make a simple flowchart app to learn some new html features, but I am unsure whether this is more appropriate for canvas or SVG (and which lib to use). I believe that SVG is more appropriate here since everything is basically shapes connected to lines (sounds like vector graphics to me), but if you think ...

Validate DropDownList if checkbox checked

ASP.NET3.5 Webforms. Am trying to put a validator on the drop down list, only if the checkbox is checked. This doesn't work. If I put an alert in the onclick event, it does show. <script language="javascript" type="text/javascript"> function setVal(sender) { var myVal = document.getElementById('<%=(DropDownList)CreateUserW...

javascript: getting OUTER (real) browser window height?

i know there is stuff like window innerHeight etc. Can I retrieve the real window height of my browser (with all it's toolbars etc.)?? crossbrowser if possible? regards matt ...

failing to render in extjs

Sometimes when I open a page, it has blank only, but when I refresh the page or the browser, the page can be rendered. I want to know why it happened and how the problem happened so much! ...

Does JavaScript have double floating point number precision?

I know it's an odd question, but does JavaScript have the capacity to work with double's as opposed to single floats? (64 bit floats vs. 32 bits.) ...

Round half pennies up?

Possible Duplicates: round up nearest 0.10 round number in JavaScript to N decimal places How can I round floats such as 0.075 up to 0.08 in Javascript? ...

how to get control in a gridview cells with javascript....

how can i access the controls in a gridview cells in which i use for inline edit? In the gridview, there would be two controls in a cell, which is a label and a textbox. When user navigate around the gridview, next cell would turns textbox become visible and label become invisible. How can i enhance the code below. I'm not familiar with ...

Loop through all IDs that begin with XXX

Would anyone know how to loop through all ID's that being with name_ So, for example, within the markup I may have 50 id's that all start with "name_", the full ID would be like name_2, name_55, name_25, etc. I'd like to loop through all of these getting the number. Not really sure where to begin....... thank you! ...

Ajaxify + Confirmation Dialog?

I'm using jQuery Ajaxify to ajaxify my forms. It has all the same callbacks as the standard $.ajax function. I'm trying to add in a standard Javascript confirm() dialog before the form gets submitted though. Problem is, as soon as you click the submit button, the ajax request goes through. How do I delay that until after the user makes a...

jquery get last each if value

Hello, I have this code, $(function () { $.post("fetch_data.php?url="+$('#url').val(), { }, function(response){ var arrValues = [ <?php echo $js_img_arr; ?> ]; //output from php $.each(arrValues, function( intIndex, objValue ) { var img = new Image(); //creating four Image Elements img.src = ob...

asp.net gridview textbox value

How to get gridview itemtemplate textbox value in javascript? ...

uiwebview doesnt load external javascript file

I have the following innocent looking code (index.html), but it doesnt load the code.js file. It works well if I copy / paste the contents of the file in the html page. Both index.html and code.js files are in the same directory. This is the code snippet. Any help would be great. index.html : <html> <head> <script type="text/javascrip...

iframe's document issue

i have a div in an iframe document. when i click a link in an iframe's document, that div opens or pops-up on the screen with z-index value. Now what i want here is to open this div in the parent document not the in iframe's document. so, how can achieve this..? ...

Making Youtube Stop Playing When Popover Is Dismissed, Or Using Javascript Youtube Controls

Hi all, So I've run into some problems implementing YouTube videos in popovers. I can get the YouTube video to play just fine, but when the user clicks off the popover (destroying it), the sound continues playing. My solution for this was to have the webview that was displaying the youtube video load a blank html string in the viewDid...

jQuery get beforeunload event source id

I am trying to alert the user when they leave the shopping page with cart filled up. And also get feedback or the reason for their exit. I need to get event source id because to know whether they exit my site or navigate by clicking a link in my page. Any one help me on this... ...

Packaging JSPF and javascript files

Our javascript YUI framework depends a lot on html elements written on jspf file. As it is getting more complex, we are trying to find a way to package the jspf along with javascript files to ease deployment. Currently to modify/add new element, we have to modify jspf and add the javascript dependencies manually. Is there a way to pa...