javascript

How to inform users that webapplication does not support IE6

I have web application and I do not really care about IE6 users. However I would like to have some kind of feature that would inform users that they are using IE6 and that their browser is not supported. I was thinking about two possible solutions: pop-out window (probably Javascript) with text informing the user on every page he visit...

Single Sign On for WebServices, WCS, WFS, WMS (Geoserver), etc.

[ # question edited for clarification # ] I'm trying to implement a Single Sign On (SSO) for a web application. Maybe you can help me find a proper solution, give me a direction or tell me, that solutions already exist. The scenario: A GeoExt (ExtJS for geodata/map based apps) webapp (JavaScript only) will be deployed on a customer's w...

Order of loading images in html and css

Hello, can I programatically (or, as we're speaking about html and css, semantically) decide in which order should images load? I want to make background image load first and then call som javascript upon $(window).load, is it enough to leave it on browser (e.g. body-background is on line 40, other images are later in css file) or do I...

Getting the OnClick event when enter is pressed (IE)

Hi everyone, I have the following code (inherited from someone): <div class="feedback">&nbsp;</div> <form onsubmit="return false" autocomplete="off"> Enter your guess: <input type="text" size="48" id="guessedword"/> <input type="submit" value="Guess!" id="guessbutton"/> </form> </div> Now, I want to do someth...

Replacing special chars from the output

searchVersion: function (dataString) { var index = dataString.indexOf(this.versionSearchString); if (index == - 1) return; return parseFloat(dataString.substring(index + this.versionSearchString.length + 1)); } ... returns browser version, in my case, its "3.6". Since I'm going to use this as a class name, I want to remove ...

Pass Variables By Reference in Javascript?

Hy i dont know if that is possible but i want to set a given variable in js per reference. What i want to do is, that each time i pass a string to the function addstring that the value of the textfield is added like += function addstring(string) { document.getElementById("string").value = string; // its a textfield } How can i d...

Checking for cookies being enabled in IE8 using Javascript

I am attempting to check whether cookies are enabled or not using Javascript, cross-browser. I have got this working fine in Firefox 3 using the following code - var cookieEnabled=(navigator.cookieEnabled)? true : false; //if not IE4+ nor NS6+ if (typeof navigator.cookieEnabled=="undefined" && !cookieEnabled){ document.cookie="te...

How to add and run a javascript for only on firefox not on others?

How to add and run a javascript for only on firefox not on others? I've to add a javascript on a page and it should only work on firefox. not on IE ...

How do i make form data not disappear after hitting refresh?

I went to test my page on another browser. On google chrome i can fill out a form, hit back and forward and still have the data there. Now i need to refresh the page so certain data is correct (such as session id if the cookie expires or user logs out before submitting). I refresh and lose all data. Is there some option i can set so all ...

Concatenation in jQuery

var os = $.client.os; // mac var browser = $.client.browser; // firefox var browserversion = $.client.browserversion; // 3 $('#root').addClass( os + browser + browserversion ); .. results in <div id="root" class="macfirefox3">. How do I add spaces between them? ...

how to add a color to a line in sharepoint 2007 list that has a specific text ?

hello there, I would like to know how to add a color to a line in sharepoint 2007 list if in one field there is a specific text contained ? for example : I have a list that have three fields: list1 1.id 2.name 3.full description now i want to show only the first and the second field to the user. list1 id name 1 abc 2 edv s...

Drag and drop the inside of a modalPanel

Using Richfaces 3.3.0GA, jsf 1.2_14 and facelets. I have a richfaces ModalPanel with an image inside as follows: <ui:composition> <a4j:outputPanel id="#{prefix}_a4jImagePanel"> <rich:modalPanel id="#{prefix}_imagePanel" autosized="true" domElementAttachment="body" rendered="#{examinationPanel.render}"> <f:f...

Prototype JS - Moving elements between two containers - what's wrong here?

I'm trying to move elements between two lists. Elements when clicked should move to the other list. Prototype JS code: document.observe('dom:loaded', function() { $$('li.available-item').each(function(element){ element.observe('click', function(){ element.removeClassName('available-item'); element.addClassName('select...

JavaScript image popup library that allows you to open several images on the same time?

I'm looking for a JS library that will allow me to open several images by clicking on their thumbnails and be able move the opened windows (divs) by dragging them. It has to allow you to open more than one image at a time (so you could drag them and compare them). ...

Call function on div click

Hello I am doing this: <div onclick='alert("xxx")'>Click me!</div> and i see that alert but i want to call on function inside that onclick. I'm trying this but it doesn't work. function GetContent(prm){ alert(prm); } <div onclick='GetContent("xxx")'>Click me!</div> I need to call that function inline not assign an id or cla...

Getting error while running simple javascript using node framework

As i run this peice of code using node a.js: var sys = require('sys'); sys.puts('Hello, World'); it gives an error axconfig: port 1 not active axconfig: port 2 not active I am new to using node..please help ...

JavaScript suppress double click selection

Hi Guys, i'm working on a slide gallery at the moment. My problem is that when i click the navigation divs very fast, the browsers default behavior is fired (selection of content). My question is: how can I suppress the default double click behavior? navigationDiv.onclick = function () { // do something }; A jQuery solution would ...

javascript/jquery remove or delete option from select

I need to delete an option from a select in certain circumstances. Basically: if(mystatement == true) { //remove item with id 'option1' from select of id 'select1' } Anyone know the code for me to achieve this? Many thanks. ...

.hover fade image out, fade new image in. On exit return to original image

I have my company logo appearing in the footer of my site, when the user hovers over the footer I want the image logo.png to fade out, then biglogo.png to fade in - in its place. When the user moves the cursor away from #footer I want logo.png to fade back in. <div id="footer"> <div id="logowrap"> <i...

javascript dom-injected elements don't pick up css-styling in IE

I'm having the weird problem that after having javascript inject some dom-elements the css-rules defined for those elements are not obeyed in IE7(i.e: styling for these elements doesn't happen). (firefox and chrome work fine, others not tested) Things I tried: - cleared the cache - no other css-rule takes precedence (no 'more-specific...