javascript

Starting javascript function due to URL Link in "Browser"

Hello guys, I'm using wininet to get the sourcecode from some homepages, afterwards I analyse that for some information. I use VB in Excel to do that. All of this is working fine, but now I want to get information from a special page. I have to open this page and click a link to go to the side with the wanted information. My problem ...

Setting defaults for JQuery UI datepicker on whole site

I'm working with a site with the JQuery UI datepicker displayed on a lot of different pages. We have a certain set of features we'd like the date picker to use for all pages - the same date format, the same icon, etc. What's the best way to set these items as the default for the datepicker() function, rather than have every call to d...

Javascript store not removing all elements before re-adding

So I have a dropdown setup on the page called ddlVehicleType that is populated from a store. This method gets called when another dropdown is changed, and it's supposed to remove all items from the aforementioned store, re-add them as needed, and then populate the dropdown with the new values. It's doing everything it's supposed to EXCE...

How do I animate a protovis streamgraph?

I'm having trouble figuring out how to animate a protovis streamgraph. I think the best way is to simply pass an array of i, j indexes to .layers() and have the .x() and .y() functions look up the actual updating values. Is there a simpler way? ...

Opening HTML pop-up windows

I'm trying to figure out the best and simplest way of opening HTML pop-up windows. UPDATE: This is not intended to spam. By pop-up I mean a new window without the toolbars. I need it for something similar to the facebook connect API. I'm currently using a js <script type="text/javascript"> function popUp(URL) { id = "hello"; eval("pag...

how to get the last element of string

how to get the last element of string e.g ="linto.yahoo.com."; last element of this string is "." How can find this? ...

PHP to JSON on client side

Hi, I'm using Rob Monies 'Jquery Week Calendar' to build a calendar application. I have a MSSQL DB a with table named 'dates' and the following fields: id start end title I would like to query this DB in PHP and then pass the results to Javascript, Javascript will then render the events in the browser. The Javascript needs to receiv...

jQuery ui - autocomplete from XML cache xml document

I've implemented an autocomplete using an XML source. It takes ~4 seconds to download this XML document from the server. Can someone point me in the right direction on how I could cache that document so that the next time the user visits the site they wont need to download it again unless it's changed. Thanks ...

Pass along & sign with href to php page help

I have this: browse_cat.php?cat_gr='Mopeds &amp; Traktors'"> The browse_cat.php contains this to fetch the above "category": $cat=$_GET['cat_gr']; echo $cat; This echo outputs the first word only "Mopeds". It wont change if I replace the &amp; with &. What is the problem here? The adress bar when I enter browse_cat.ph...

Creating interactive ajax javascript widgets in ruby / rails

Looking to create interactive javascript widget using ruby-on-rails that can be placed on any website. I am able to create a basic widget. Its fairly straightforward (eg. using document.write) This works fine for taking data from my server and putting it into the widget but its very static. But how do I create something more dynamic ...

Append #hashtag to link in HTML on the fly

Ok, I don't know if this is possible, but I hope it is. I have a nav, each link in the nav just appends a hashtag on the existing URL when clicked, for live filtering, etc. with the use of jQuery. I want to append the SAME current hashtag to a series of links within a div further down the page. For example, I've clicked "work" and my...

ExtJS Cell Selection Model with PivotGrid Doesn't Work

I'm trying to change the SelectionModel of a PivotGrid and it isn't working. Here is my code. Can someone tell what I am doing wrong. I need to use a cellSelectionModel as I want to drill down and I need the top and left axis to get the intersection points. I have also tried the 'cellclick' event in the EXTJS 3.3 API with no luck. ...

Javascript vs HTML (Which takes more time to load)

What would i be better off having a lengthier Javascript or a lengthier HTML. Few things- 1. I don't care about the SEO ratings. 2. I do care about the speed of the site. 3. I do care about the functionality of the web site. Basically my question for the core coders- Whats better - <div> Blah blah blah blah </div> or document.getEl...

Coding a volume bar

I'm trying to code a progress bar in JS. I have the bar coded but have problems with the math to get it to work correctly. When a user clicks on the bar I'm grabbing the pixel position they click on...this is working correctly. So my bar is 80px wide and if i click in the middle the clicked value returns at about 40...if i click right a...

Triggering the return key on event unexpectedly refreshes page and gives undefined error - JavaScript

Hey all, When I click in field, type text, and press return on keyboard it triggers the initializeTable function that refreshes page and gives error form[0] undefined. However, when I use change event to change dropdown selection, it doesn't cause this unexpected behavior. So I'm not sure why pressing return key in text field is causin...

JavaScript opacity Anti-aliasing bug in Internet Explorer

I have encountered an annoying bug with internet explorer on a javascript animation I made. I have a greyscale image of a city skyline which fades its opacity to 0, revealing a full-color skyline. It looks great in all other browsers, but IE reveals artifacts. (around the taxis, and the barr+barr text). A friend told me this is because...

How do I get VML working in standards mode?

I would like to be able to use vml objects on a page rendering in standards mode rather than quirks mode. I've found fragments of answers scattered around but can't figure it out. Raphael pulls it off somehow but I can't reverse it to figure out what's happening. Any basic working example would be great. ...

How to display the current time continously in a different time zone?

Hi, I would like to display the current time continuously but in a different time zone? The following code will display the current time continuously. Can I update to get the time in a different time zone.? <script type="text/javascript"> function ShowTime() { var dt = new Date(); document.getElementById("<%= T...

I need to validate free flow textbox value matches value from database table

I need to validate a given Name field in the asp.net form. User Name: Alex Brandon In the database, we have a users table with user_name column. I need to validate on lost focus of User Name form field, that it exists in the users table and is valid else show an alert. Does somebody has a ready solution to this? ...

html5 offline caching with php driven sites

I have a simple php driven website running and I'm trying to figure out how it treats php pages. Some of my php documents are routing logic and some just includes for individual pages. How do i go about making this work offline? What I though was that I'd have to re-create the routing logic in javascript. Is that my only option? In that...