javascript

lazy loading of java script in php

Hi, I am using the Google visualization for drawing graphs into my website. This involves a lod of java script. <script type="text/javascript" src="http://www.google.com/jsapi"&gt;&lt;/script&gt; <script type="text/javascript"> google.load('visualization', '1', {packages: ['annotatedtimeline']}); </script> These two lines of scr...

javascript question - why does "window.location" not ensure my spinner.gif animation works?

Hi, It seems when I use "window.location" as a means to redirect to the API when my longer running transaction is does not ensure the animation for the spinner gif I have works. Any ideas how to fix this? ie. I see the gif ok but it not being animated. Is there another way in Javascript to force the redirect once the gif animation st...

JavaScript createElement qn

Why doesn't this piece of code work? When I used the commented part instead of the table it works... Use table why cannot work? <html> <head> <script type="text/javascript"> function addLine() { var p = document.createElement('p'); p.innerHTML = "hello"; document.getElementById("ad...

Is it Possible to set the Target of a form to an Iframe which has Src of a different domain

Hi, Is it possible to postback to a Iframe which is a different domain? For eg: ` Form runat="server" action="Something in Domain A" Iframee src="DomainA.com" name="A" Form runat="Server" **action="DomainB/default.aspx" Target="A"** Form Iframee Form ` I will do a postback in the Iframe, so that the whole page doesn...

catching the o/p of php in js.

hi i am using js/ajax code to print the o/p of php file in tag, now i want to check the o/p of php file in js. Actually i have login.php page which check login credentials in db and if credentials are correct then it will return true else it will return false, then js will check returned o/p and if o/p is true then login success message...

[.NET] Parse and filter javascript array

Hi guys: Our legacy code use Newtonsoft.Json.JsonWriter to produce a javascript array like: [["1","zxc"],["2","fifa"],["3","fgh"]]. I wounder if Newtonsoft.Json provide counterparts to help filter out or get specific element, says ["3","fgh"]. ...

Javascript: Simply change items in another select box?

I'm developing a registration page and wish to use JS to dynamically choose avatar selection based on gender. Here's what I have so far.. <select name="gender"> <option value="Male">Male </option> <option value="Female">Female </option> </select> And that should update options in this based on gende...

Jquery selector data retrival in variable, in another different page.

How can we use Jquery to read certain page content in a variable on a different page? If for example we want to read div.tag1 from a page into another page but in a variable( ie i dont want to load it into the page but manipulate it so store it in variable) Eg: file1.html have(say) <div class="tag1"> Hello world </div> <div class="tag...

Please recommend one or more of the best Chart component,Flash or javascript

I am looking for a suitable charting component use in my Web project,Please help me! Thanks! ...

Find and get only number in string

Hello dear friends ! Please help me solve this strange situation: Here is code: The link is so - www.blablabla.ru#3 The regex is so: var id = window.location.href.replace(/\D/, '' ); alert(id); The regular expression is correct - it must show only numbers ... but it's not showing numbers :-( Can you please advice me and provide ...

Using createElement to create a new table

Why doesn't the following works? Don't tell me is cos table can't contain in a div... <html> <head> <script type="text/javascript"> function addTable() { var table = document.createElement('table'); table.innerHTML = "<tr><td>123</td><td>456</td></tr>"; document.getElementById("addtable").appendChild(tabl...

IE 8 make a fullscreen window

In Javascript into a LAN I want to make a window completely fullscreen (Kiosk mode) but I think for security reasons IE 8 always display title bar and location bar. Does it exsist a way to do that? I'm into a LAN and so no matter if a user is warned about that. In Firefox we can force that enabling security privileges. ...

focus on the user control in C#

Hi, I have a user control(error control) in a master page. by default the user control is hidden(visible false) on click of a submit button i am showing the error control.Now on post back I want to bring focus to this control.I am writing the java script in register Startup script as following: ScriptManager.RegisterStartupScript(Pag...

In Javascript, how do I determine if my current browser is Firefox on a computer vs everything else?

if(firefox and is on a computer){ alert('using firefox on a computer') }else{ alert("using something else!"); } How can I do this? ...

Why join is faster than normal concatenation

Hi, I've seen several examples from different languages that unambiguously prove that joining elements of a list(array) is times faster that just concatenating string. Unfortunately I didn't find an explanation why? Can someone explain the inner algorithm that works under both operations and why is the one faster than another. Here is...

Mootools datepicker for availability

Hello, I'm trying to make an interface where the user can define the days he is available by adding rows of "from then to then". So in the end the user must be able to make a list like this: From 24 Feb 2010 to 3 March 2010 From 27 March 2010 to 18 April 2010 From 8 May 2010 to 18 July 2010 And so forth. I had the idea of using óne ...

Accept enter key in JavaScript inside a text box

I have a script set up where someone picks a comic to go to out of the list by appending it to the URL. However, I can't for the life of me get it to accept an enter stroke while inside the text box and still maintain script functionality. Any solutions would be very very much appreciated. Script/Form looks like this: function Go...

Defining the character encoding of a JavaScript source file

I would like to print a status message to my German users, which contains umlauts (ä/ü/ö). I also would like them be in the source file rather than having to download and parse some extra file just for the messages. However, I can't seem to find a way to define the encoding of a JS source file. Is there something like HTML's http-equiv?...

How to compress javascript in realtime?

I was wondering if there was a way to compress javascript in realtime, much like gzip works for HTML (and CSS apparently)? I don't want to have to compress my file manually before upload everytime, I want the server to do it for me without any added work from lazy coders. ...

I can't get this background appear in a div

Hi, the title says it all, Can someone point me in the right direction? I don't see why I can't get the achtergrond_homepage.png as background in rounded corners. Edit: It looks like the grey color is allways on top of everything. Can it be that it's controlled in the javascript part? This is the css: @charset "utf-8"; /* CSS D...