javascript

Jquery loading content

Hi, I'm currently using the below script to load content on click of a link. What I would like to know is it possible to visit the url services.html#serviceone which would then show the content and the active link for that ID? $(document).ready(function () { $('#content div.wrap').hide(); // Hide all divs $('#content div.wrap:f...

A bit of problem with implementing a modal dialog

I am developing a modal dialog as a part of a web application. There is one thing that's been of a puzzle to me. Please watch a movie clip that I just uploded at http://inter.freetzi.com/example/. I feel strongly that I have to accompany my question with a video because this is the case when it's better to see once, than to hear 100 time...

Have just one InfoWindow open in Google Maps API v3

I need to open only one InfoWindow on my Google Map. I need to close any other InfoWindow before i open a new one. Can you some one guide me on this? ...

How do I create series of div and make them accessible for jquery to modify them after a while?

I want to create some DIV from javascript. I don't know how many I will need to create, but I will need to change the back-color of it after a while. I'm using jQuery in my project. So if it's easier the solution can use jQuery. ...

Change embedded source

Hey guys, I'm trying to change the source of a embedded youtube movie. There isn't a problem in firefox and google chrome only internet explorer. This is what I've got: [Javascript code] <script type="text/javascript"> function laadfilm(film) { document.getElementById("trailer").className = "trailer"; document.getEleme...

Incrementing input "name" value with JS

Hello - I have a table that is using jQuery to generate a "new row" when a button is clicked. When this new row is generated, new inputs are generated. Here is where I got the script from: chris-barr[dot]com/projects/table_jquery I am using this code on an order form for a client and I need to specifically target each "name" for the ...

Multiple Javascript gadgets per page

I'm writing an in-house gadget in Javascript and jQuery. I've written it in an object-oriented manner with a top-level object called, as an example ggObj and assigned methods via ggObj.prototype. To use my gadget, you include the myGadget.js file and you call the function makeMyGadget() in your page. My JS file looks like this: var myG...

node.js callback getting unexpected value for variable

I have a for loop, and inside it a variable is assigned with var. Also inside the loop a method is called which requires a callback. Inside the callback function I'm using the variable from the loop. I would expect that it's value, inside the callback function, would be the same as it was outside the callback during that iteration of the...

element.style.setAttribute() vs. element.attribute = ''

In javascript is there any difference between using element.style.setAttribute('width', '150px'); and element.style.width = '150px'; ? I have seen that keywords won't work with the first way (like this), but for non-keyword attributes is there a difference? ...

How to create Iframe using AJAX (not just add Iframe block element but create iframe from 0)?

How to create Iframe using AJAX (not just add Iframe block element but create iframe from 0)? ...

jQuery selectors help

I have the following HTML <ul class="main-navigation"> <li class="left">&nbsp;</li> <li class="normal">Home</li> <li class="normal">Internet</li> <li class="normal">Movies</li> <li class="normal">Music</li> <li class="normal">Documents</li> <li class="normal">Windows</li> <li class="right">&nbsp;</li> </ul> What I want...

Java Ajax Framework integration

Hi, I'm looking for a java AJAX framework which I can include into my existing webapp. I've found sweetDev RIA . Are there such other frameworks which I could look into it? ...

Javascript read a file

Hi I was hoping that maybe someone can help me out: I created a bash script that connects to my free webhost via FTP and uploads a file.txt into the home directory. What I'm looking to do is to read this text and display it on my index.html site. Looking around I seen the following script: jQuery.get('path/to/file/on/server.txt', nul...

Need to refresh a single ie7 web tab from command line...

Hi, I need to create a batch file that will stop a process and then refresh a defined tab in internet explorer 7. Just need some help/pointers on the tab refresh part or if it's even possible... I don't want IE to open another tab, and another browser is not an option as the web based program is only compatible with IE. Any ideas? I've...

how to use javascript to validate xml against schema in firefox?

I can do this in IE using ActiveXObject, however mozilla doesn't support ActiveXObject. Is there any way I can use JS to validate an XML against an XSD schema in firefox? ...

Get Property Names In JSON Objects

I would like to get the property names from a JSON object to build a table dynamically example: var obj = { 'fname': 'joe', 'lname': 'smith', 'number': '34' }; for (var i = 0; i < obj.properties.length; i++) { alert(' name=' + obj.properties[i].name + ' value=' + obj.properties[i].value); } would alert name=fname val...

Access is Denied Exception when calling JavaScript function from Java in IE

I am getting Access Denied exception when I am calling a Java Script Function from Java Applet only in IE. ( modified my original question with updated information.) Here is my HTML code <script type="text/javascript"> function uploadComplete() { alert("in Upload Complete"); ju.doneUpload(true); } </script> ju is ...

Prototype - get next text input after an HTMLInputElement

Hi, I have a javascript object called 'element' of type HTMLInputElement that corresponds to a HTML input text box element on my page. (Thus, something like $F('element') using prototype will return the text of this box). Is there a way, using prototype and this 'element', for me to access the value of the next HTML input text box in ...

how to auto-update a Django page only when required ?

As described in http://stackoverflow.com/questions/1836861/how-to-update-a-django-page-without-a-page-reload, I send periodic XMLHTTPRequests from the browser to the server using JavaScript to get those pieces of the webpage that changes during the course of my application. However, most of the time, nothing changes; the server replies ...

JavaScript $('myDiv').style.direction always returns blank?

Hi, I'm trying to get the direction property for the element. I have this code: document.write('<div style="position: absolute; display: none;" id="menuDiv"></div>'); And in my .css file I have: #menuDiv { direction: rtl; } Then, using prototype, I'm trying to query the direction for that div: alert( $('menuDiv').style.directi...