javascript

Map UIWebView tap to HTML element

How would I go about detecting which HTML element was tapped inside a UIWebView? It seems a bit hacky, but right now the only way I can think of would be to evaluate JavaScript and use JS to traverse the DOM. Any help with this direction would be appreciated, too. ...

Javascript/Google Maps, autocreated combo box failing on second iteration

Hi, I'm quite new to Javascript and the GoogleMaps API.. I have a problem with a map that I'm populating with markers.. I have a combo box that allows the user to select a marker and it highlights the marker on the screen for them by popping up an info box for it. Using Mike Williams excellent tutorial on the google maps API (http://ec...

fcount is undefined

I have a variable that I use for caching or temporary storage to avoid repeated requests to the server: var div2acc = {}; Then there is this function which gets an array from a WCF service or reads it from my div2acc object: function getAccounts(div_id){ if(!div2acc.hasOwnProperty(div_id)){ $.ajax({ ...

Replace Appended text with new text on Click

With jquery I am adding a div and appending the text "click to view" when the div is showin I would like to change that text to "click to close" Right now I have $('#toggle_template') .css('cursor','pointer') .append(' (click to view)') .click(function(){$('#template').toggle(500); $('#toggle_template').find(' ...

How to call jquery function after calling wicket ajax submit button

I have a form with subtmit button but this is implemented by Wicket's AjaxButton class. When HTML page rendered Wicket keeps a javascrpt onClick method dynamically for that submit button. I want to do some operations using JQuery after Wicket's onClick method completed. How do I do this? ...

how to simulate $ function when can't use jquery .

my iphone can't use jquery , so i have to simulate $ function by myself: this is my code : function $(str){ var div=document.createElement('div') div.innerHTML=str; return div } and you can see , the result has a Redundant parent div, so how to clear the raw div , thanks ...

How to use ajaxdoc

I am not able to figure it , How to use ajaxdoc for generating comments for my scripts. I would appreciate, if you can provide a little tutorial about this or an example. Do I need to use this project dll. ...

Disabling Checkboxes after specified amount are selected

Hi, I have been working on a page that will allow entry into a certain part of my website if the user selects 8 out of 25 checkboxes in the right sequence. Here is what I have working so far CLICK HERE TO SEE A LIVE VERSION My question is, how can I completely disable the rest of the checkboxes after 8 have been chosen, so far I am usi...

Scroll to top area in div

Hi All , I have a div that has CSS as following, <div style="overflow-y:scroll; height:100px;"> long Text....</div> The issue is long text is shown and vertical scroll bars shown but when browsing the page div is scrolled to bottom and end of the of the long text is shown instead from beginning portion of long text. Any way to fix t...

How to represent time base progress bar for file upload

Hi I am working on file upload using JavaScript+ php (basically I have used the plupload and modified it according to my need).since plupload providing the progress bar.but I need a time based progress bar,where we can see the time remaining according to one's bandwidth and all. so I am looking for the solution for it. 1- How to...

how to get the originalEvent without jquery on iphone .

for some reason, i can't use jquey , this is my code : document.addEventListener("touchstart", function(e) { e.preventDefault(); var orig = e.originalEvent; var x = orig.changedTouches[0].pageX; var y = orig.changedTouches[0].pageY; //id("#draggable").css({top: y, l...

Javascript - returning a variable is failing

I'm trying to do something that should be pretty simple - but it's doing my head in. I can't seem to get a variable to return from a function var where; if (navigator.geolocation) { where = navigator.geolocation.getCurrentPosition(function (position) { // okay we have a placement - BUT only show it if the accuracy is lower than ...

How to retain the values selected from Combobox in each page During Pagination in Perl?

Hello Every1,the issue is regarding how to retain the selected value in Combobox during pagination. "i have a combobox which has some values,whenevr i select 1 value then according to the value selected the Records per page will be defined BUT whenever i navigate to next page then the value in combobox gets reset to first value". Here's ...

To find javascript functions in .js file

HI... I need to find or list out all the JavaScript methods in .js file . pls help me out ...

loading message isn't working - js

Hi! I have a php page and the behavior is this: the page is opened user press on button and than a pop-up is opened in the pop-up page the user select a date and press ok the pop-up is closed and the main page is refreshed with the new data (this is not ajax) I want that after the pop-up is closed , a loading message in the main p...

problem with same search tab in multiple html pages

I have some ten html pages each page has same search tab, when i click search button from any of the page it navigates to index page with search text passed through query string and displays output on the index page . How can i write click on the index page with search parameters entered from index page search tab and display the results...

FB.ui does not work the first time. Help!

I created an app which publishes to the user's wall. The problem is, the first time the user accesses the page, the FB.ui doesn't show up. After one reload, it works perfectly. by first time, I mean when the user gives permissions to the app, OR when he has already given permissions. In both scenarios, the problem occurs. Any ideas, pe...

Checking input values for special symbols.

I am having two text fields in my form. The data to be entered in the field are Name and City respectively. I want to check that the user has not entered any special symbols like !,@,#........ i.e, the only thing user should enter must be belonging to a-z,A-Z, though the user can enter Underscore(_), but no numbers, no special symbols. ...

VS2010 Intellisense: make it autocomplete every word ?

hello i'm using VS to write JavaScript lately. before that i was using notepad++. the auto-completion in np++ deals with every word in the current document. but the one in VS only deals with variables and functions and so. what i'm looking for is every word completion. meaning that if i write div.id ="anotherDiv"; and then later write do...

hotkey plugin usage

Accodring to documentation of the the hotkeys plugin .This is how I use it $(document).bind('keydown', 'Ctrl+h', function(e){ alert("stage closed"); e.preventDefault(); }); $(document).bind('keydown', 'Ctrl+e', function(e){ e.preventDefault(); $(element).click(); }); Problem: When I press Ctrl+e, the click event on the element...