javascript

Setting marker zIndex in IE

I'm trying to set zIndex to markers, mainly, i want to set all green markers on top. The code below works GREAT in any other browser but IE! I'm checking in the marker is green if it's containing 'st1' in the filename. I'm using mootools so the code is a bit mootools specific, but any javascript help would be appreciated: gmarkers.ea...

Can greasemonkey delete cookies from a given domain?

Can greasemonkey delete cookies from a given domain? If so, how? ...

Calling JavaScript within Php block and vice-versa

echo "<a href=#> Delete </a>"; Whenever a user hits Delete, a javascript function should be called for confirmation. Somewhere in the Javascript function, php code should be used for delete operation. How do I do that? Use something like "some php code goes here" and "some javascript function();" for me to know where to put what. Thank...

How to extract QUnit results from the document

When QUnit adds the test result details to your HTML document, it thoughtfully wraps the numbers of tests taken, passed and failed inside span elements, each with its own class, to let you recover these three numbers programmatically. However, even though I can see the spans in the finished HTML, I can't find them when I search with jQu...

Changing ForeignKey's defaults in admin site

Hi, I'd like to know how I can change the blank value of ForeignKey in admin site's forms. There blank is showed as "-----". I wanna replace it by a word. Does someone know how to do it? ...

Read xml file, modify the values/add elements/attributes and save the xml how ?

Hi everybody, Using javascript, I want to read xml file from the disk, modify the values/add elements/attributes and save the xml back to disk. Anyone knows here can i find examples that works with IE and Firefox? I allready find examples to read, now changing values that's the problem. Thanks ...

Solving bug with single quotes in names of friends

My JavaScript application uses Facebook Connect to display the profile pictures of a user's friends. This worked fine until a recent update on Facebook's end created a bug in Safari. Essentially, everything works fine unless a user's friend has an apostrophe (single quote) in their name. Think Irish last names like O'Connor, for exampl...

CSS/HTML Print Background Images/Styles without Browser Page setup tweaking...

Is there any way to print out something like, when the user Prints out the page? <div id="test" style="background:#000000; color:#FFFFFF"> Black Stripe </div> I'm trying to create a page with row striping in the printout the same way it appears on screen. When they go to print , it of course drops the background. Besides telling ea...

Kill Gridview Bind

I have a Gridview that displays a huge list of products. On Client click of a select button in the grid I fill textboxes with the selected row's data. When i do this, I want to stop the Grid from Binding in Javascript. Is this a possible feat? Now the Gridview is in an updatepanel. Perhaps i could stop it from updating??? Any ideas woul...

Javascript function called twice, how to handle this ?

My application is a LiveChat developed in C# and ASP.NET I have a Client timer which call the webservice Function RetrieveMessages() every second. Additionally, soon after the user send a message i'm call de same function RetrieveMessages(). I have a variable that store the last message Id, so, every RetrieveMessage call retrieve only...

Smartclient GWT making a ListGridRecord field editable using a custom DataSource

We're using SmartClient GWT library (see the Smartclient GWT showcase here). I'm trying to make a ListGrid UI that when you click a record the fields become editable. Just like the example: Grid Editing Mass Update The difference is I'm using my own custom GWT RPC services and manually adding ListGridRecord's to my own DataSource, a...

How to execute "eval" without writing "eval" in JavaScript

Here's the deal, we have a big JS library that we want to compress, but YUI compressor doesn't fully compress the code if it finds an "eval" statement, out of fear that it will break something else. That's great and all, but we know exactly what is getting eval'd, so we don't want it to get conservative because there's an eval statement...

JavaScript regex help

I'm getting strings with values such as /Date(1)/ and /Date(-99999)/. The digits are variable length. Wouldn't the regex just be this: ^/Date\(d+\)/$ ...

Sending Text Cross Domain By Bookmarklet

I need a user to navigate to a certain page that has a certain div full of useful text. Then click my bookmarklet and send the text in that div back to my server, which is different from the current domain. I have successfully inserted jQuery on the bookmarklet click and selected the text. Now I need to figure out a way to send that t...

Open several tabs and then perform actions on said tabs

I am horrible at debugging and am totally confused as to why this won't work. Here is my situation: I wrote a function to open several links into tabs and then perform a very simple operation on them. It wasn't working as I had anticipated so I rewrote it to just open one one link into one tab, which worked. This is what I have (simp...

Javascript string replacement - what's the best way to do this?

I have a problem trying to transform a given input string to a given output string using regular expressions in Javascript. I'm not even sure if what I'm trying to accomplish can be done with regular expressions, or would be most efficient using some other means. I'm hoping someone can help: I have the following input string: #> Some...

Javascript onclick in script

Ok im new to javascript, but I want to call an onclick function without adding onclick="function()" to the anchor tag. Here is the script I have, but I cant get it to work: <script type="text/javascript"> function clicka() { alert("hi"); } document.getElementById('click').onclick = clicka; </script> <a href="#" id="click">click</a> ...

How do I add slashes to a string in Javascript?

Just a string. Add \' to it every time there is a single quote. ...

Deciphering the Google Search API: how to refer to an argument passed into callback function?

I'm using the Google Search API to load some Search results into my page. I'd like to set an argument to the callback function that says which div the search results should attach themselves to. Here's the callback function definition, per Google: .setSearchCompleteCallback(object, method, opt_arguments?) Here's how I'm doing it: se...

jquery slide up and down with animate wont stop sliding

i have a photo with some content on top of it (name, desc, price) the content is in a ul. in default state the ul only shows the name by setting the absolute position of the ul toward the bottom of the image and then hiding the overflow with a mask div. then when you mouseover the ul slides up showing the whole info as long as you stay o...