javascript

select option clears when page loads in php

Hey guys, the scenario is this: see select below <form name="limit"> <select name="limiter" onChange="limit(this.value)"> <option selected="selected">&nbsp;</option> <option value="5">5</option> <option value="10">10</option> <option value="15">15</option> </select> </form> I want whenever any ...

Attributes in JQuery

Suppose I have these divs: <div class="hat" rel="cap"> <div class="hat" rel="pine"> <div class="hat" rel="mouse"> How do I use JQuery to do a "where"? For example $("div.hat").remove WHERE rel="mouse" ...

J-query J-player is not auto playing

I have used jPlayer in my music site .The actual songs data in dynamic.It is been adding on user checks from 10 listed songs on every page.jPlayer is getting added with the playlist but not autoplaying.when i'm clicking manually only it is getting palyed. I tried with playItem= 0,playItem= 1,playItem= 2...etc., Can any body suggest be ab...

Convert Javascript Array to JSON

Hay I have an Array (var cars = []) which hold a few integers. I've added a few values to the array, but i now need to send this array to a page via jQuery's .get method. But i want to send it as a JSON object. How do i convert an array to a JSON object? ...

JQuery get Value of an Element: onfocus="inputInlineHint(self);"

Hi Guys, i have an input field which calls the function "inputInlineHint(self)" on blur and on focus. It also passes self... <input type="text" id="one" class="textbox" value="Your Name" onfocus="inputInlineHint(self);" onblur="inputInlineHint(self);" /> Now i'd like to retrieve the current value of the field: function inputInlineHi...

Ajax /jQuery finding if user completed the download

Here is what I am trying to do: I am making a custom text file containing a test. This test is unique to the user and well I don't want my server to stack all those text files. Is there a way to use Ajax/JavaScript/jQuery to find if the user has already finished the download and if they have get a return value (1 if finished) so the ...

Return positions of a regex match() in Javascript?

Is there a way to retrieve the (starting) character positions inside a string of the results of a regex match() in Javascript? ...

Javascript / xHTML need to grab the xml:lang...

Doing a german site, and have a JS alert to say you havn't completed all the required fields. So want to get the langage of the HTMLpage Here's the HTML; <html xml:lang="de" xmlns="http://www.w3.org/1999/xhtml"&gt; ... </html> This is my JS.... it seems to error and not alert at all with the lang bits... How do it get the xml:la...

Sequentially Load SWFs, on a timer or load next once one is finished. Possible?

Hi, I have a page that loads loads of swfs*. I'm loading in them all at the same time, Sequentially which is slowing down the intro animation. Is there a way to load swfs sequentially? Or if not load them on a timer (half a sec would do the trick I think) *there lots of different dynamically generated Flex graphs so it's not possible to...

altering locale settings of system/browser to test javascript functions

I'm writing a small JavaScript function to generate a date selector for use in various languages. I want to test the JavaScript date functions toUTCString, toLocaleString, toLocaleDateString in english, french, german, italian and spanish. How do I affect the locale settings that are used by the date object. I've tried changing my windo...

Remove hash without page jump

Is it possible to remove the hash from window.location without causing the page to jump-scroll to the top? I need to be able to modify the hash without causing any jumps. I have this: $('<a href="#123">').text('link').click(function(e) { e.preventDefault(); window.location.hash = this.hash; }).appendTo('body'); $('<a href="#">').t...

Silverlight passing JSON object incorrectly?

I have a Silverlight class marked with the ScriptableType & ScriptableMember and I expect to be able to pass the object from Silverlight to javascript. When I call JSON.stringify (in javascript) I expect to receive a JSON representation of the object but all I get is {} The class is defined as: [ScriptableType()] public class MyEvent {...

browser showing half progress bar even after page is fully rendered

Hi, what could be the reason if browser is showing progress bar (stuck at half) as if it is still trying to load something, even after the page is rendered. this is an intranet ASP.NET website. how can I find out the reason? the browser is IE8. actually this started after the browser is upgraded from IE6 to IE8. not sure if this issue ...

Shadowbox timing issue

Hi, I'm using shadowbox js for showing Flash video in lightbox style popups. So far it's working but I have this problem: when the page loads and the user clicks too early on the linked image which should open the shadowbox the swf is loaded directly (and no popup appears). Also, the script seems to stop in this case and never assigns...

Load mysql's value into javascript

i have stored values in mysql and i want to retrive that value in webpage but the webpage is creted only using javascript so how can i use that database's value in javascript ...

How to convert Regular Date to unixtime in Javascript?

How can i convert date which looks like this 12092008 to unixtime like this 1221215809 ...

How to avoid javascript "rel" is null error? please have a look a on code provided.

Hello friends, I get this javascript error message Error: a.getAttribute("rel") is null on these lines of code var i, a; for(i=0; (a = document.getElementsByTagName("link")[i]); i++) { if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title") && !a.disabled) return a.getAttribute("title"); } return nul...

loading default values of combobox?

i am trying to develop a website in php and i am dynamically loading a page in using its id with the help of js and that loaded page has a combo box and i want as the page load in the first option of combo box should be displayed in text box on same page. i tried onload option but it is not working as page is not dynamically loading in...

HtmlPage.Window.Invoke not working for javascript function in separate js file

I'm trying to call a js function from Silverlight using the HtmlPage.Window.Invoke method but it won't call a function contained in a seperate js file. Anyone know why? Cheers AWC ...

Selenium + JavaScript + Infragistics WebDateChooser

Hi everyone, I am working on Selenium tests for one of our pages that has an Infragistics WebDateChooser. It took me a while to get to where I could set the date field from the Selenium test, but I finally got something to work: waitForEval | javascript{this.browserbot.getUserWindow().igdrp_getComboById('ctl00_MainBody_ctl00_fdosDatePi...