javascript

HTML - Put SELECT tag content into INPUT type = "text"

Hi, I have a form in a webpage where I would like to put the selected item in a drop down list into a testbox. The code I have till now is the following: <form action = ""> <select name = "Cities"> <option value="----">--Select--</option> <option value="roma">Roma</option>...

Using jQuery for Effects

Ok - have been tasked with possibly an impossible (or at least a potentially nightmarish) scenario. Need to come as close as possible to reproducing PowerPoint-like effects via HTML/JavaScript (the spec is large and ugly, so I will spare you the details). Ultimately, I am looking for a solid launching point. I have used both Prototype/...

Javascript data store solution using PhoneGap

Hiya, Does anyone have any experience of storing data in JavaScript across all mobile platforms using PhoneGap? My ideal solution would be to use something like SQLite, but unfortunately SQLite isn't supported across all the platforms PhoneGap supports. I tried to ask this question a little while ago, but it got quite a few negative ma...

Iframe no scrollbar?

I cant seem to show the scrollbar in my iframe. I am making a script that will rotate a page 180 degrees and it uses iframes. With this code it showed no scrollbar. <iframe frameborder="0" id="browser" src="http://google.com/"&gt;&lt;/iframe&gt; It loads dynamically(although this is after a button is pressed) but this doesnt change an...

dynamically getting base url inside js file

I want to run function inside web service (.asmx file) $.ajax({ type: "POST", contentType: "application/json; charset=utf-8", url: '/Admin/WebSrvcs/Management.asmx/f_SearchLabel', data: "{_sQuery:'" + obj.value + "'}", dataType: "json", But I don't know where will be my root url(http://local...

How do I get a useful value for height and width of a div element using javascript?

I need to be able to store the current height and width of a div at any point in time. Currently I am using div.style.height/width which works fine when the styling is applied inline. The problem is that this returns for example 600px and not 600. Is there a better way to do this? If not, whats the best way to get just the number 60...

How do I completely disable JavaScript errors using VS2008 and IE?

I am trying to prevent VS from breaking on JS errors. I have the following settings: In IE, under Tools->Internet Settings->Advanced (tab)->Browsing Disable script debugging (Internet Explorer) is checked. Disable script debugging (Other) is checked. In VS, under Debug->Exceptions->Common Language Runtime Exceptions JScript Exception...

getting base url of web site's root (absolute/relative url)

I want to completely understand how to use relative and absolute url address in static and dynamic files. ~ : / : .. : in a relative URL indicates the parent directory . : refers to the current directory / : always replaces the entire pathname of the base URL // : always replaces everything from the hostname onwards This example ...

Need jQuery Content Slider

I am unable to get the correct title for this, please change the title if you get appropriate one :) This is what i am having <div class="container"> <div class="innerContainer"> <div> Div content Here [ always either embed or object or image ] </div> xtra noise </div> <div class="innerContainer"> ...

What does the obscure javascript error b(e.target).zIndex is not a function mean?

To give more information I am using the modular form here: http://jqueryui.com/demos/dialog/#modal-form `b(e.target).zIndex` is not a function [Break on this error] `(function(a){a.widget("ui.mouse",{opti...is._unrotate}return this}})})(jQuery);` /js/jquery-ui.min.js I also seem to be getting the error "Too much recursion" too m...

ExtJS ToolBar radio group change menu item manually

How to manually change selected radio item in "Radio Options" menu? http://www.extjs.com/deploy/dev/examples/menu/menus.js Don't pay attention on id absent (for menu), I just want to know which method should be use. I tried setActiveItem but it didn't work. Thanks ...

Prototype Selectors like jQuery ?

Hi Guys, Just trying to establish whether prototype can do something like $$('#ID a:last').css('color','#111'); Any ideas ? ...

Clean and accesible Other option (Check box and text box)

When I have a set of either check boxes or radio buttons I often need to have an Other choice. This check box or radio button is very often accompanied by a text box where the user is supposed to fill out what this Other is. How do you usually handle this set up? What kind of markup do you use? What do you require in your validation? Do...

How to get scrollTop of page just after page onload event?

I know how to get the scrollTop of a page, I use this simple JS function (code copied around): function GetScrolledTop() { //I never work in IE quirkmode, I always use DOCTYPE as 1st line, so I don't need to test for document.body.scrollTop return self['pageYOffset'] || document.documentElement.scrollTop; } This works and my p...

Timezones and the DateTimeField - Django

Hi folks, I'm trying to implement a "time ago" feature, for the displaying of items on a site. As I'm caching the pages I wish to use javascript in order to render the "time ago". Javascript knows local time and problably the Timezone of the local machine so I could play with that, but that would require to hard code the server's timez...

how to capture key repeats with javascript

i have an asp.net form and an asp:textbox. i have a problem when the user presses and HOLDS a key down. the user selects the text box and then presses and holds '9' until the text box fills with 9s. Is there any way to detect this situation? Is there a way to stop key repeats when the key is held down? ...

jQuery urlencode/decode patch help

Hi Gang, I'm using this jQuery urlencode and urldecode plugin - very simple and easy to use but it doesn't, in its original form, remove + from the string. The one comment on the home page suggests a patch but I don't know how to implement it. Can anyone help me out? The Page: http://www.digitalbart.com/jquery-and-urlencode/ //URL E...

Why aren't my JQuery .ajax requests being made in parallel?

I am trying to make two ajax requests in parallel using jQuery like this: var sources = ["source1", "source2"]; $(sources).each(function() { var source = this; $.ajax({ async: true, type: "POST", data: {post: "data", in: "here"}, url: "/my/url/" + source, success: function(dat...

ANTLR JavaScript Target

Hello, I have been using ANTLR to generate a parser + tree grammar for a mark up language with Java target which works fine. Now I am trying to get the target in JavaScript to use it in my web browser. However, I have not been able to locate any good documentation on how to go about doing this. I am using eclipse with ANTLR IDE, and ...

I have a bunch of divs floated left, lined up in columns with different heights. They dont create a nice grid without setting a height.. JS or CSS way around it?

Hey guys, I am trying to create a grid like system with div's with content floated left. The problem is that the height of each div is not static since the content is different in each one. Since the height is different.. things get outta whack if one is taller then another in one row. Is there some sort of css way or js (prefer java...