JS: Math.random for array
Learning JS this week. Is it possible to use Math.random to return a random value in an array? Does that value be a string and still work? ...
Learning JS this week. Is it possible to use Math.random to return a random value in an array? Does that value be a string and still work? ...
Hello, Just a heads up I am a semi noob at JavaScript. So for the past two days I have been googleing and for the life of me I cannot figure out how to execute a function in an iframe from the parent page. The page in the iframe is on a different domain and the code to be executed is usually executed via a link, but I want it to be exec...
I have a programm where i get the values of two variables for example x and y using javascript functions.How can i send them to the django server so as to do something(for example search in the database for matching values).How can i do this "SENDING" thing.Which language should i use for example? ...
Hi all, i have been learning about javascript and using dojo. I am trying to execute a php file with dojo. My code is dojo.xhrGet({ url: 'helloworld.php', load: testCallback, error: testError, content: {name: dojo.byId('name').value} }); for the dojo function. The php file is basically a simple script that prints the val...
I am trying to insert an iframe into the browser DOM via javascript and want to remove the border if IE but can't seem to. I have tried these to no avail: iframeElement.style.borderStyle="none"; and iframeElement.style.frameBorder = "0"; Any suggestions will be much appreciated. ...
I've been getting some 404s with snippets of code (CSS, HTML and JavaScript) in the URL. As best as I can tell the user is progressing through the site just fine during their session - its an ecommerce site and the effected users are putting stuff in their basket and checking out OK etc. On certain pages I'm see 404 errors adjacent to ...
I want to load only links within a certain div inside the tab, otherwise it should just go to the actual link. Current the code i use loads all links inside the content in the same tab <script type="text/javascript"> $(function(){ $('#tabs').tabs({ load: function(event, ui) { $('a', ui.panel).click(f...
Is it possible to detect that a Firefox browser is running the TraceMonkey JavaScript interpreter? If so, is it possible to do it with JavaScript? A solution which involves examining the browser binary or shared libraries is also OK for me. I'm running Linux with Firefox 3.0.14 right now. ...
I'm trying to get a button to stop an embedded wmv when I click it. I've been searching for awhile now and I have tried a number of different methods, but nothing seems to be working. he closest I've come was from using the example on this page: http://www.killersites.com/mvnforum/mvnforum/viewthread?thread=3883 However it only seems t...
Hi, I need help in locating the conflict in my code, below is my ugly code (I'm just starting to write my mootools and my approach i think are ugly). the site can be seen here http://tinyurl.com/y9xvm6b. I think it is conflicting with these lines <script type="text/javascript" src="/lotsforsaleroxascity/media/system/js/mootools.js"><...
I am writing a markdown compiler in Erlang for server-side use. Because it will need to work with clients I have decided to adopt the client side library (showdown.js) as the specification and then test my code for compatibility with that. In the first couple of iterations I built up 260-odd unit tests which checked that my programme pr...
I'm writing a little plugin for jQuery and so far I've got this: (function($){ $.fn.extend({ someFunction: function() { return this.each(function() { var obj = $(this); obj.focus(someInternalFunction(obj)); }); } }); function someInternalFunction(obj...
Here's the odd situation: we have a piece of javascript library that is being called on our onload of aspx page. It works everytime for us, but the clients that have low speed modems get an error, because the object is not getting initialized and the aspx page is already loaded.!! Is there any suggestions on how to call this piece of ...
I like having control over exactly what's going on under the hood (the MVC way), but I'm also lazy, and don't like writing tons of javascript GUI things. Should I or should I not switch to MVC? Thanks, Nestor ...
I'm trying to debug JavaScript in Visual Studio 2008. I use ASP.NET MVC, jQuery, and jQueryUI. I can set a breakpoint, but when I start debugging Visual Studio changes the breakpoint icon to one with a warning. Hovering over the icon then reveals a tooltip which says: "The breakpoint will not currently be hit. The document is not lo...
I have the following XML, returned from a web service (5 extra points for guessing the movie): <ArrayOfSub xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://tempuri.org/"> <Sub> <SubId>862</SubId> <SubStreamId>1</SubStreamId> <SubTimeStart>00:01:04.4450000</...
I feel like this must have been asked, but I'm unable to find it through my searches. Here's a complete example of the issue that's confusing me: <html><head> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"></script> <script type="text/javascript"> (function($){ $.fn.test...
I was going over the tutorials for GWT and was confused by this piece of code. The code is at GWT tutorials private void addStock() { final String symbol = newSymbolTextBox.getText().toUpperCase().trim(); newSymbolTextBox.setFocus(true); // Stock code must be between 1 and 10 chars that are numbers, letters, ...
Sorry for all the dumb jquery questions I'm still learning and find this to be a GREAT resource! How can I show a <li> on click of a class here is my html <li><a href="#" rel="sample.gif">sample.gif</a> <a href="#" class="edit_project_file"> <img src="images/edit.gif"/></a></li> <li class="edit_project_image" style="display:none;...
I was originally looking for a basic tutorial on how to get started using client-side databases in FF3.5. My understanding was that this feature is support in FF, Safari, and IE8. However, I'm running into a pretty basic problem, which is that the syntax to created such a database doesn't seem to be found in FF3.5. For example, to creat...