javascript

How to append unique spans to a table in jQuery?

I have a quick question, because my brain refuses to think this evening. HTML <table> </table> <span>2010</span> <span>2009</span> <span>2009</span> <span>2009</span> <span>2008</span> <span>2008</span> <span>2007</span> jQuery $('span').each(function() { $("table").append("<tr><td>"+$(span).text()+"</span>)</td></tr>"; });...

Create a website that lets users create a website?

I have always written websites that interact with the endusers directly. Now I want to create a website that lets users create their own websites - from scratch. Almost like Drupal online, I provide all the unit blocks for them to use to build their own website. They just drag and drop text fields, buttons, (div) containers etc. I hav...

How can one add drop shadows to Raphael.js objects?

I would like to find out how to add blurry edged drop shadows to Raphael.js objects/paths. As far as I know it is not possible with the library as is but is there a work around? ...

How to convert Illustrator or Inkscape SVG drawings into Raphael.js objects?

I am trying to figure out the best most reliable way to convert my SVG drawings from Illustrator or Inkscape into Raphael.js object code. I suppose I am looking for some type of parser but do not know of any. None are suggested on the Raphael.js site. Any suggestions? ...

How do I download a PDF from an HTML webpage-submitted POST form using C#?

I'm trying to programmatically download some PDF document with a C# windows form application. Right now, I've got far enough to get a unique URL for each page that goes to download the PDF. Each link is a webpage that submits a form via POST as soon as the page is loaded function window_onload() { Form1.submit(); ...

Google Maps API v3

Possible Duplicate: Clustering Google Maps API V3 Could someone plz tell me how do I obtain the pixel coordinates of a marker in Google maps API V3? Thanks in advance. This is one section of the code I'm using: var x=0, y=0; function getLeft(obj) { if ('string' == typeof obj) obj = document.getElementById(obj); whil...

jQuery UI Dialog, Checkboxes and the mysterious case of IE6

I have a jQuery UI Dialog containing some checkboxes. I want to conditionally set the state of these checkboxes and then open the dialog. Unfortunately this causes problems in IE6. The checkbox is never checked if it's value is set before opening the dialog. For example in the following code "Dialog Checkbox 1" is never checked in IE6,...

Setting up the Coordinates

Hi, i am facing the problem in setting up back the coordinates in javascript, i have already taken the coordinates using pageX and pageY, now the problem is this, that i want to set the image on to the coordinates which i have taken through pageX and pageY, please let me know ASAP, if anyone knows about the solution....Thanks in Advance....

Can someone explain this JavaScript mystery?

I was writing a simple recursive function in JavaScript and encountered some really weird behavior. At first I thought it's bug in a browser, but I tried it in FireFox, Chrome and IE9 and they all behave exactly the same way. The HTML file below runs a simple JS function on page load. The function is recursive (calling itself exactly on...

Updating recent updates - Problem in procedure - Any other approach?

I have a Section in my website called Recent Updates. in that I will show the latest 5 updates at first when the page is rendered. When a New update is done at real time, the new update will be appended to the top of the updates list and the last one will be deleted. My approach: For this problem, what im doing is, First i renders th...

How to write the php code in js file

Is my program i divide the pages as a div in the first div i added this code <?php $table="am_users"; $query="select distinct(`user_email`) from $table"; $result=mysql_query($query); $num_rows = mysql_num_rows($result); while($data1=mysql_fetch_array($result)) { $data[]=$data1['user_email']; } ...

Java Scrip Conflict with jquery plugin - working on test page

I am attempting to use the smooth scroll by smoothdivscroll dot com/#quickdemo , but I am getting a js conflict. I have it working on a test page, http://www.visfire.com/scroll.html, but it does not work on the live page viwfire dot com /Design/Logo-CorporateIdDesign.aspx . According to Firebug, "$("div#makeMeScrollable").smoothDivScrol...

how to refresh the Label which is inside the Grid view using Java script?

i am displaying time in the label which is inside the grid view. i need to Refresh the label every second. how to do this by Java script.Like Ajax timer. EDIT: OnLoad="setTimeout(window.location.reload();. 1000);" whats wrong with this code or <asp:Label ID="Label2" Width="100px" runat="server" OnLoad="setTimeout(window.location.reload...

Javascript closing tag is echoed twice from php

<?php echo "<script type = 'text/javascript'></script>"; ?> output's page source shows this : <script type = 'text/javascript'></script></script> Why is it putting an extra closing tag ?? and who is putting it there ?? browser ? server ? who ? ...

textarea: select text and scroll to it with javascript

Hello, I've been trying to find this solution for the past few hours, but no luck so far. How could i select some text (actually found that one already, but haven't tested completely yet) in a textarea and force it to scroll to that text? I've tried using scrollTop, but i don't really know how to calculate it properly with the number of...

How to check if a value exist in selectbox using js....

Hello all, Is there any method other than running a for loop to check if a value exists in select box using js???? Im looking for something like document.getElementById('selbox').valueExists('myval'); ...

Django 1.2.3 - Internationalization - makemessages does not detect all strings

Hello ! One more question about Django concerning localization of javascript files. Django provides a small and convenient javascript library which is used like gettext to internationalize strings in javascript files. I set it up successfully (at least the interpolate function works) and I could generate the po file for the French lang...

jQuery UI drag/drop sorting comparision using float:left vs display:inline-block

I have two examples here, only difference between these two example are one uses display:inline-block and other one uses float:left, li.doc_item{display:inline-block;} vs li.doc_item{float:left;} My problem is display:inline-block sorting is not as fast or responsive as float:left. I want to use display:inline-block because thumbnail...

MapReduce returns NaN

Hi, I have a M/R function, and I get NaN as a value for some of the results. I dont have any experience with JS. Im escaping JS using Java Drivers. String map = "function(){" + " emit({" + "country: this.info.location.country, " + "industry: this.info.industry}, {count : 1}); }"; String reduce = "function(key, ...

Custom form validation using jquery plugin, based on attributes.

I am using Jquery valdiation plugin for validating the form at client side. But I want to do the validation like. <input type="text" id="txtInf" regex="/some regular expression/" error="Inf is mandatory"></inf> here regex and error are custom attributes. Field will be validated against the given regular expression in regex and if the ...