javascript

Google Maps JS API v3 - Simple Multiple Marker Example

Fairly new to the Google Maps Api. I've got an array of data that I want to cycle through and plot on a map. Seems fairly simple, but all the multi-marker tutorials I have found are quite complex. Lets use the data array from google's site for an example: var locations = [ ['Bondi Beach', -33.890542, 151.274856, 4], ['Coogee Beach'...

How to save the file which comes from server automatically in the client side ?

Hi, I need to save the files which are coming from the server automatically in the client side. The file comes to the client side to download. At that time I want to save the file automatically without user interaction. Is there any way to do this ? ...

How do I create links in the cells of a PHP generated table?

I have a table generated from some PHP code that lists a SMALL amount of important information for employees. I want to make it so each row, or at least one element in each row can be clicked on so the user will be redirected to ALL of the information (pulled from MySQL database) related to the employee who was clicked on. I am not sur...

How to remove carriage returns from output of string ?

I am using wordpress as a CMS and trying to allow user fields to be input to populate the info windows in a Google Map script. I am using this to select the id and pull in the content from a custom field. It works fine unless there is any html in the custom-field which breaks the script. I looked at htmlspcialchar and htmlentities but ...

Error when using axis with xpath query in IE

Hi, When using XPath expression "descendant::div" with selectNodes in IE i am getting an error "Expected token 'eof' found ':'". Is there something i am missing here, please help me get around this issue. Best Regards, Keshav ...

Embed Google Spreadsheets

Is there a way to embed Google Spreadsheets editor with Compact controls (ctrl+shift+f) by default? Maybe there is some url parameter for it? Or maybe there is ready js library to add simply row-by-row editor on page using Speadsheets API's list-based or table/records feeds? ...

JavaScript lazy regex for matching HTML tags

Hi, I'm having a problem writing a regular expression for matching HTML tags. I found a similar entry here, but this didn't quite work in my case. Here's my test string: <div id="div0" class="myclass">here's some text that may include whitespace</div><div id="div1" class="myclass"> and some more here </div> And here's my regex ba...

Does String.fromCharCode(decimal value) in javascript supports extended characters also.

Hi, I am using function String.fromCharCode(decimal value), and passing a decimal value to it. its working fine in terms of English characters, but when i m trying the same to decode for the Japanese characters, it gives me some arbit characters. can anyone tell me does String.fromCharCode(decimal value) supports extended charact...

current x,y coordinates of cursor in text area using javascript

How can i get current x & y position of my CURSOR within a text area using javascript. The event is a Keyup event, not a mouse event. I am not looking for the current cursor position in terms of charecter but x , y coordinates. ...

How to disable default vertical scroll bar that comes in IE 7?

I can see a vertical scroll bar without scroll when I open my IE 7. I is not so weird to see but it is not obeying my web page rules. I cannot see this kind of strange behavior in any other browser. ...

how to retrieve images from database and display in div using java script

Hii, I want to retrieve data from sql database and display dynamically in div using javascript can anyone please help me on this... Thanks... ...

java script for button click recognition

How can i check whether a button is clicked or not using javascript ...

2 Minute question - HTML / CSS If div within div expands expand parent div

I have a setup lets say like follows: <div id="nav"> <div id="innernav"> //With dynamic content here. </div> </div> I am running a script that sizes #nav to the size of the browser window in height. But sometimes my dynamic content is now getting bigger than the height of the window.. Is there a way I can enforce that when...

How to close unclosed HTMl Tags?

Whenever we are fetching some user inputed content with some editing from the database or similar sources, we might retrieve the portion which only contains the opening tag but no closing. This can hamper the website's current layout. Is there a clientside or serverside way of fixing this? ...

Why is this widely used script killing my processor

I installed this popular, light-weight script on a website but it is running very poorly and maxing out my processor. http://www.leigeber.com/2008/12/javascript-slideshow/ This is for sure my problem and nothing wrong with that script which runs fine for me on the demo site, but I have no errors and do not understand where the conflict...

delete some special character from a string by javascript

How we can delete some special character from a string by javascript ...

What does this expression mean "!!"

Why would somebody use an expression like if(!!window.JSON) alert('exists'); instead of just if(window.JSON) alert('exists'); ? Is there another usage for the "!!" thing ? ...

Scroll bar inactive in modalpopup control

i have used a Moadlpopup ajax control in my project.when the popup is generated then the background item got inactive,but the scroll bar is active so, i want to disable the scroll bar too.but in this condition scrollbar is not going to be inactive how can i do inactive my scroll bar also. ...

How can I add an onClick listener to a fileButton in CKEditor?

Title says it all, basically. I'm working in the image uploader plugin, and have a button definition like this: { type : 'fileButton', id : 'uploadButton', filebrowser : 'info:txtUrl', label : editor.lang.image.btnUpload, 'for' : [ 'Upload', 'upload' ], onClick : function() {alert('hey')} } I have tried defini...

Dom Element onclick (MooTools :: optionally)

Consider the following example: function async_callback(array1, array2, array3) { // All arrays are equal length for(var i = 0; i < array1.length; i++) { var myElement = new Element('div', { 'id': 'dvMy' + i, 'events': { 'click': function() { SomeFunction(array1[i], array2[i], array3[i] } }}); $(document).appendChild(myElem...