javascript

Why this JavaScript is not working in Mozilla FF ?

Its a struts 1.2 application. I have a java script function. Its working in IE and Chrome but not in Mozilla. It is supposed to change the button after clicking that button and perform some action. function changeButton(obj) { obj.form.action=obj.form.action + "&submitType=Bucket Usage"; obj.form.submit(); document.getElementById("s...

How to validate the text box should take only A B C

Hello friends.. I have a text box I need to validate that.. I mean user can only Enter Either A or B or C if he enters D to Z or any other things I should show the Popup message please Enter A or B or C Using Jquery or javascript? thanks ...

EXTJS Writer Grid - removal of row - client and serverside

Hi At the moment when I remove a row - it reappears on the client side - refreshing the page I see it has indeed been deleted Adding a store.reload in the method means it appears again and then disappears when the store is reloaded Any help appreciated // The DataWriter component. var writer = new Ext.data.JsonWriter({ encode : f...

jquery code to check page height not seem working correctly..

I have a lil piece of jqery code here: <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"&gt;&lt;/script&gt; <script type="text/javascript"> hasVBar=""; hasHBar=""; $(document).ready(function() { // Check if body height is higher than window height :) if ($(document).height() > $...

Scrolling in jqPlot

I am using jqplot to show candlestick chart and the data is from xml. I retrieve data from xml and put it into array and then jqplot creates a candlestick chart from that. but xml file contains lots of data so in chart values are over lapping (with fixed width). is it possible that we make graph of lets say 10% of data and place a scroll...

Is it possible to pass a php variable inside javascript?

Hello everyone, I am trying to pass a php variable inside javascript bt it is not working. <a href="javascript:wait1();getPass('<?php echo $current?>');">Comment</a> Is it possible to do so or I may be incorrect somewhere... Thanks for your response in advance! :) ...

More efficient way of looping in JavaScript to display XML data?

Hi there. Can you please look at my JavaScript and let me know if there's a more efficient way to write it in terms of looping through my XML? My JavaScript code looks like this: <script type="text/javascript"> function loadXMLDoc(dname) { xhttp=new XMLHttpRequest(); xhttp.open("GET",dname,false); xhttp.send(); return ...

Your thoughts on a proposal to manage JavaScript dependencies

I've recently done a great deal of JavaScript programming in the context of developing a Rich Internet Application. My view at the start of development is pretty much what it is now; JS RIA works but the development tools are lacking. One tool that I missed in particular was for managing dependencies. What I found was that I ended up wi...

Howto: Javascript files always up-to-date

I have a .NET web applications which uses a lot of javascript. The .aspx and the .js files go hand-in-hand together. Problem: The .aspx files are always up-to-date on the client (not cached) but the .js files might well be cached. This is even a problem if the files are only cached for one session since users are spending many hours on ...

How to use YUI 3 History standalone without the loader?

Using YUI scripts on our SSL page turned out to break the SSL connection because they dynamically load scripts from yahoo (combo) over a http connection. As we only use the history manager of YUI 3, I wanted to host the code on our server. If I copy the code from http://yui.yahooapis.com/combo?3.2.0/build/yui/yui-min.js&amp;3.2.0/build...

Javascript for hover over one image to bring up another with description in a fixed place.

Hey so I'm trying to create the JavaScript, functions and HTML coding for the website I am working on.I have 8 small images on the left hand side. A default large image on the right. I want to make it so when I hover over each small image another different large image replaces the default large image on the right hand side with a descri...

JavaScript Image Loading

When I am click on a button then a javascript function is invoked and it loads the image in the page. But the image is not loading properly. The image size is 72kb and the image coming from the DB and it's already loaded in the server start. If I put any alert message then the image loads properly. What's the reason behind the issue? ...

How to pass parameters (other than event) to event handlers?

The following code renders 3 buttons with label "1", "2" and "3". Clicking on each button will alert the label. <!DOCTYPE html> <html> <head> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"&gt;&lt;/script&gt; <script type="text/javascript"> $(function() { ...

How to reduce delay of "Onload" ?

I'm current using a javascript with the this tag <body onload="javascript:Mine();"> Now i noticed that it is taking some time to load this function after i open the page.So is there any other way i can reduce this delay ? Thanks ...

javascript "this" keyword problem

I am working in a technology which supports javascript but minus "this" keyword (and few other limitations; one of them is that it does not support Event object). Now the only way to work with it to set Id to every element. But when I work with ajax and place the information in different elements using the code below: //var obj; //alre...

How can I make sure that a user visits a page of my site only if he's redirected from a specific function?

In my page, I'm using a javascript function <script> function redirect(){ window.location="hurray.php"; } </script> Calling the function from the line below. <input id="search_box" name="textbox" type="text" size="50" maxlength="100" onkeypress="redirect()" /> Now I want to make it sure that the page 'hurray.php' is visited o...

can I use blur in a hidden field, jquery

can I use blur in a hidden field in jquery? if not, how can I track changes in a hidden field ...

Embedded video, Javascript button to make it fullscreen?

Is it possible to have a button on a page, to make an embedded video go to fullscreen mode when clicked, using Javascript? (for stupid users) ...

What is the best method of maintaining a large query string?

In several PHP applications I'm making I need to maintain a very long query string for filters for a table. I only want to change one or more GET variables per filter change, while the rest of the query string stays unchanged. I have a few ideas on how to do this, including using javascript to build the query string every time a filter ...

Get HTML code of Filled form using jQuery

I have a webpage with different controls. I have to get html source on button click for a particular div element's controls with values. jQuery .html() method gives me html source of controls without values, but I require html source with user selected values. ...