javascript

Styling HTML FORM elements with padding, with width 100%

I'm styling a form by using a table with fixed-width columns and I want the input elements inside the <td> to fill the container. I know the CSS box model and I know the elements would bleed through with width: 100%, but the problem is with its consistency. <input> elements bleed through as expected but <select> elements don’t. This res...

Playing and Controlling MP3 and FLV audio/videos (live strteam)with javascript

Hi, Using JavaScript how can i control external FLV live audio/video (radio) stream. I have URL say BBC Radio, which when entered in address bar of browser display its own FLV player. I need to control this live stream to be play,pause,increase/decrease volume using JavaScript. The JavaScript should be universal in the sense that, fo...

Scrollable Content With Javascript in a Div with overflow:hidden

I have a need to display a lot of image thumnails in a small space. My idea is to have 3 columns of thumbnails with an undetermined amount of rows. I planned to put this content in a and then put that inside a viewport div. Like so: <div id="viewport" style="width: 300px; height: 300px; overflow: hidden;"> <div i...

How to get the Current Cursor Coordinates with Javascript

EDIT: Solved Ok, my problem is that I need to find a way to constantly read x,y coordinates of the cursor in my browser onmousedown and then to quit reading the x,y coordinates onmouseup here is what I have so far var mouseDown = 0; var xPos = 0; var yPos = 0; document.body.onmousedown = function() { mouseDown = 1; } document.body...

parentNode in Javascript doesn't seem to work for me....

I use a textbox inside a gridview and its onkeyup function doesn't seem to work.... Here is my gridview <asp:TemplateField> <HeaderStyle Width="12%" /> <HeaderTemplate> Advance Detucted </HeaderTemplate> <ItemTemplate> <asp:TextBox ID="TxtAdvanceDeducted" runat="server" CssClass="text_box_height_14_width_50" onkeyup=...

Capitalize words in string

What is the best approach to capitalize words in a string? ...

Get Text from "href" with dojo ?

Hi, i 've the following html: <table id="mytable"> <thead> </thead> <tbody> <tr> <td><a href="#" onclick="doSometThingCrazy(); return false;">test</a></td> </tr> </tbody> </table> Now i want to get all links inside this table with dojo. So far so good: dojo.query("#mytable a").forEach( ...

Greasemonkey script injection

Hi, I'm using greasemonkey to inject a script into every page that loads in my browser. The problem that i'm facing now is that, if the browser moves from one page to another within the same domain, greasemonkey doesn't inject my script again. For example, I'm at google.com, so when my browser loads this page, my script is injected. Now,...

How can I check value is changed on blur event?

Hi, Basically I need to check if the value is changed in a textbox on the 'blur' event so that if the value is not changed, I want to cancel the blur event. If it possible to check it the value is changed by user on the blur event of an input HTML element? Thanks, ...

How to make input not to lose focus when clicking on scrollbar in suggestion list

Hi, I'm testing TagDragon jQuery plugin, it's exactly what I need, but is has one annoying "feature", when I click the scrollbar in the suggestion list, it hides it's results. On the other hand jQuery autocomplete plugin doesn't lose the focus on the input field and that's why it doesn't hide its results. But that plugin doesn't provide ...

Javascript Scroll Menu - MouseOver Selection not working correctly on first contact

Hi, I am currently working with a tab menu which cycles through automatically. Once I mouseover one of the tabs the "rotation" should stop on the selected tab and when I mouseout it should continue rotating from the selected tab item. $(document).ready(function() { $("#featured > ul").tabs({ fx: { opacity: "toggle"} }).tabs("rotate", ...

How to set google map in the center of a small <div>?

hi friends, how to set google map in the centre of a small <div>? below is the code below code is working fine but the city is display in the top corner of the <div> how to move that in the center of <div> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>Google Map</title> <scr...

Floated elements: Fill out the bottom line first

One project I'm working on uses tabbed navigation. Because the number of tabs is dynamically calculated, and can reach high numbers, sometimes these tabs (which are, in essence, <li> elements with a float: left; style declaration) overflow into the next line, Using [###] to display a tab, the end result looks something like this: [###] ...

use a value returned from javascript in xsl to set the href of anchor element.

i want to set the href for an anchor. Anchor element is present in a frame. This url is of the form a.xml#section_a. Clicking on this <a> will take me to section_a of a.xml rendered using xsl. name of file is determined dynamically from a parameter available in the browser url. I can get this parameter using a javascript function. I w...

JQuery List Events

Hi, At the moment I'm building a list using the following code: $('<li id="li' + jJob.Id + '"><div style="width: 98%; background-color: #9E7BFF; colour: #000000"><a href="javascript:void(0);">' + jJob.Type + ' ' + jJob.AddressClean + ' (' + jJob.Status + ')' + '</a></div></li>').click(function(e) { ShowStatus('job ' + jJob.Id + ' is av...

XML to dynamic select menu (with AJAX)

Hi, I'm new to AJAX and XML. I'm stuck on a school assignment.. The task is to process an XML file consisting of 2000 different places with name, name of city and name of county. and making a dropdown menu with the different counties, but only once. The XML file looks like this: <places> <place> <Name>Vestby</Name> <City>Vestby</...

Cocoa WebView: Cannot call Specific Javascript method using `callWebScriptMethod:`

Hi! I am loading a page into a WebView. The page has this little-test Javascript: <script type="text/javascript"> function test(parametr) { $('#testspan').html(parametr); } var bdu = (function(){ return { secondtest: function(parametr) { $('#testspan').html(parametr); } } })(); </script> The problem is that I can't cal...

Extjs with google Ajax Language Api

can we use google AJAX Language API with EXTjs????? i have tried example for translitration i have one html file New Document Type in Hindi (Press Ctrl+g to toggle between English and Hindi) and typemarathi.js google.load("elements", "1", { packages: "transliteration" ...

Javascript event doesn't seem to get added to a dynamically generated textbox

I added onkeyup javascript for a dynamically added textbox in javascript... But it doesnt seem to work.... var cell4 = row.insertCell(3); cell4.setAttribute('align','center') var e3 = document.createElement('input'); e3.type = 'text'; e3.name = 'txtqt' + iteration; e3.id = 'txtqt' + iteration; e3.onkeyup = totalAmount(event,this,'tblsa...

getting notice in php file while executing.

what is the meaning of undefined property DOMElement::$node Vaoue I searched in google I didn't get any annswer for this. ...