javascript

MSIE window.open not opening

So I'm having a popup that opens upon click on a link, but IE (8.0) doesnt want to show it. <a href="javascript:tellafriend('tellafriend.php?id=<?php echo $obj_id; ?>');">Send page</a> And this function in JS: function tellafriend(url) { popup = window.open(url, "Send page", "width=500,height=600,scrollbars=yes,resizable=yes");...

Chrome and Auto execute a javascript function

Hi guys. Is there a way to execute some javascript on load a web site. For example I want to hide facebook chat and I want to execute document.getElementById('pagelet_chat_home').style.display = "none" on loading a site. ...

using javascript variable inside jstl

I want to iterate a HashMap in javascript using jstl. is it possible to do like this? function checkSelection(group,tvalue){ alert(group); alert(tvalue); <c:forEach items="${configuredGroupMap}" var="groupMap"> alert("aa<c:out value="${groupMap.key}"/>"); <c:if test="${groupMap.key==group}"> alert("t<c:out value="${grou...

I have a svg image working fine in IE but does not work in firefox, safari and chrome

Hi All, I have create an svg image and mapped it in through javascript the image works from a database through an api call using the $.ajax() function, this works fine in internet explorer after clicking yes on the security risk box. For more information on what i am calling for the API call here is the previous post that shows the cal...

How would I trim the input to a JQuery auto-complete box?

Is there any way to trim (remove leading/trailing spaces) the input entered by a user into a jQuery auto-completing text <input> box before it is matched against the list of names:values? I currently have a textbox in which users are meant to enter names. The names are then matched against a list of name:value pairs by jQuery: <script t...

Is it possible to display a results array in a defined number of columns using only client side scripting?

I have an array of images/links that need to be displayed in columns of 8 for however many rows there are, but I can not control this array. Is it possible to format this using CSS/HTML (or as a last resort Javascript) so that a new row is created after x items is displayed? ...

Measuring HTTP response time/ping accurately through client-side Javascript

I'm attempting to estimate the round-trip time from the client to some web server (not the same domain the initial page was from) using Javascript running in the browser on the client side. Essentially, I'm looking to collect ping estimates to a variety of servers not under my control from the perspective of a number of clients, without...

Date.js culture info is confusing me

I'm including date.js (from datejs.com) and the en-IE culture info script. If I call alert(Date.CultureInfo.dateElementOrder) I see the correct dmy, but if I try to interpret the date 02/03/01 I get 3 Jan 2001 and not 2 Feb 2001. I'm not sure whether this is a bug in date.js or a problem with me. ...

where to pass quantifying data values for formula fields?

Hey guys, What is a common way to pass data for formula fields, to specify a quantifier. I would currently do as follows: <input type="text" name="myfield" class="inputfieldstyle quantified" id="q_12" value="foo" /> where q_12 is generic. But there some inherent problems with the approach: What if i want to give it an id for some ...

As a newbie programmer, should I learn Java, C++, Objective-C or JavaScript?

Hi. I'm a newbie programmer and I started to learn Java, but I have doubts. I want to study architecture and in addition programming web sites, web apps and some applications. Which one is the better choice for me between Java and C++\Obj-C(for applications) and JavaScript (for web development)? Thnx. ...

Is there a way to merge get parameters? - HTML/Javascript

Hi folks, often I find myself suprized about simple things, I'm not sure but I believe that this might be one of them. Often I find myself needing to merge get attributes, especially within filters and search pages within sites. This come be at times quite complicated, as you might want to remove and add parameters dynamically. Simple...

JavaScript: get original query string when url is rewritten

My page's url is rewritten like so, www.test-me.com/book-cat-white.HTML book is book.php cat is animal=cat white is color=white The original URL is www.test-me.com/book.php?animal=cat&color=white With PHP, I can get the values using $_GET, e.g. $_GET['animal']. How can I do the same in JavaScript? Is there a vari...

Why does Javascript run so slow on iPhone?

I've been researching writing an app for iPhone. I really like the look of PhoneGap which basically allows you to contain a webpage in an app. My skills are primarially in HTML/Javascript so this tool allows me to make the most of my skills without having to spend many hours learning how to write an app natively for the iPhone. I've b...

Javascript to load image from server asynchronously.

Hi, I want to load images from my server to an image gallery. The problem is that after loading the web page my program loads all the images first and then displays them all at the same time. As a result, there is a significant wait for them to load. I would like to display the images one at a time as they load, showing an "busy" ind...

Determining if a Javascript object is a "complex" object or just a string

I want to be able to pass either a string literal, 'this is a string' or a javascript object, {one: 'this', two: 'is', three: 'a', four: 'string' } as argument to a function, and take different actions depending on whether it's a string or an object. How do I determine which is true? To be specific, I want to iterate over the prop...

Detect if session expired using javascript

Hi All, I am creating a web application using ASP.Net. I am using session in my application. There is one scenario where I am trying to access session variable through Javascript. It is working fine, when I m accessing it in normal state. But after session expiry, if click on any button, it throws exception and behaves abnormally, resu...

Facebook query very slow

Hi i'm using this query for get next facebook events of a user: FB.Data.query("select eid,name,start_time,location,venue, pic_small,pic_big,description from event WHERE eid IN (SELECT eid FROM event_member WHERE uid={0}) AND start_time >= " + from + " ORDER BY start_time LIMIT 10", uid); But for users with many events thi...

How to construct Horizontal tree view in Javascript?

I want to construct a horizontal tree in javascript from array. I tried it with the ready code downloaded online. But they seems to be too complex. Thanks in advance.. ...

Supersleight IE png fix causing overflow problem

I am using supersleight to fix png transparency, but it is causing a strange bug, where the browser seems to ignore any overflow rule in IE6. Here is what it looks like (had to hide the list of things, but you get the idea...) I am stuck with using the fix and never come across a problem with it before. Here is the markup: ...

Datagrid tree (two levels) - dynamically generated grids cannot be altered

I am trying to implement a tree view datagrid with two levels. I am binding my data as follows: private void BindData() { string sqlQuery = "SELECT dept_code, dept_name FROM Department"; conn = new SqlConnection(); conn.ConnectionString = @"Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Users\saher\Documents\T...