javascript

css javascript drop down menu list

hi, does anyone know how to do a drop down menu like gmail "more" link or facebook "Account" link?? ...

How can I get a <p> element in a <td>?

I want to get a "p" element which is inside a "td". How can I get it? My code is: <td id="mytd"> <p> aaaa </p> <p> bbbbb </p> <p id="myp"> cccc </p> </td> I can get the td using. document.getElementById("mytd"), but I don't know how to get the p with id="myp". Thanks is advance ...

Javascript Flowchart designer in style of CKeditor

Hello everyone. I've learned here, on stack overflow, that what I need is called "flow-chart". I need to allow user to draw in a browser (using his mouse) a flow-chart that would represent a flow of a process or an algorithm. This flow-chart should contain decisions (yes/no diamonds), tasks (rectangles), arrows, labels etc. Flow-chart ...

set cursor on a div element?

How do I set the cursor on a div-element in javascript? I have a form(div-element not input) with a textstring attached on it. I want the textstring removed and the cursor set at the beginning of the element onclick. I have removed the content in the div-element with onclick event with: divElement.innerHTML = ''; Now I want the cursor...

jQuery UI Autocomplete behaviour. How to search free text on enter?

Hi, first question (and hopefully, but doubtfully my only one) I'm using the jQuery UI Autocomplete. Here is sample code to replicate my issue. var suggestions = ["C", "Clojure", "JavaScript", "Perl", "PHP"]; $("#autocomplete").autocomplete({ source: suggestions }); When a user types 'J' they will be presented with 'Clojure' and...

I want to validate that user can only select only one checkbox in each row in listview.

I have listview with two checkboxes in itemtemplate. I want to validate that user can only select only one checkbox in each row. ...

Regular expression validator is not allowing non-english characters for \w

I have email field in my page, which i am validating using regular expression validator provided my asp.net. I am using same validation expression as given along with validator for emails i.e ValidationExpression="\w+([-+.']\w+)@\w+([-.]\w+).\w+([-.]\w+)*" It is working fine but problem comes when I tried giving non-english letters e.g...

Email address check in Javascript

Hello all, I think many people have done some similar development tasks before: I would like to check the people's email address whether only match @tomtom.com or @stream.com. Currently, I have two solutions in my mind: Using indexof() function var checkTomTomEmail=eo.data.username.indexOf("@tomtom.com"); var checkStreamEmail=e...

Fade In Fade Out Problem with a Image Gallery

I am using a image gallery in WordPress, images are fetching from database and displaying it into front end. In my case a big image container, and three image thumbnail, I want, when when i click on the thumbnail of the image the previous image which in container goes fade out and clicked image set in to image container. My Html Mark...

How to replace a node in DOM with a new one?

I have some DOM element which I retrieve with getElementById method. I need to replace this element with new html-element (i.e. I want to see correctly-rendered <h1>hello</h1> in the place where the old element were shown. How can I do that? (p.s. jquery is not allowed). ...

Writing embedded javascript code to c# .net

i have the js file how can i add that in winform C#, i have developed the front-end and i want to run the js file on button click. i will be thankful to u if u provide the snippet!!!!! I want to run javascript code in windows form thank you. ...

“document.write(‘hello world\n’);” and “document.writeln(‘hello world’);” what is the difference between both?

“document.write(‘hello world\n’);” and “document.writeln(‘hello world’);” what is the difference between both? edit My question is what will be the difference of output. ...

Why typeof is called operator instead of function?

While reading this article (Special Operators) in MDC, I got a question like why typeof, new, etc. are called operators? I have a conception say + is a operator because it operators on two entities like 2+3 and gives another value. Ofcourse functions also operates on say two entities like the same way. Then what is difference? Th...

Show Y axis on right side of chart with jqPlot

I am using below code to show Y axis of jqPlot at right side but its only showing me at left side: $.jqplot.config.enablePlugins = true; var test2 = readXML(posi); plot2 = $.jqplot('chart2', [test2], { series: [{ renderer: $.jqplot.OHLCRenderer, rendererOptions: { candleStick: true, wickColor: '282828', ...

Preserving an XMPP connection

Hi, I have a GChome extension that listens to XMPP server. I use Strophe for BOSH connection. The issue is "how should I handle connection?" from the XMPP core wiki, I found that the last connected/prioritized client receives messages. And when user is logged in from other place Extension stops receiving message. How can I manage this co...

jQuery UI dialog picking title from cache.

Here is the code I'm using http://jsbin.com/evike5/edit When the jQuery UI dialog is fired second time. The updated title is not shown. Am I doing something wrong? ...

Getting the value from first cell in a row to submit using Javascript

Hi. I create a table using PHP from a database, meaning the size of the table and values vary. The table creation: <table> <thead> <tr> <th>Ticket</th> <th>Empresa</th> <th>Requerente</th> <th>Motivo</th> ...

javascript error

var a=asdf; var b=asdfs; //var a = new String("asdf"); if (a.equals(b)) { $("#package").show(); } else { $("#package").hide(); } }); ...

Need help with Flickr/JSON/Javascript issue when displaying gallery images

Hi all, Wondering if anyone can help me. I'm trying to put together a weekly photo competition page by pulling in photos from a Flickr gallery, but I can't get the images to display. It works OK for groups, but having some problems with the gallery code. Getting the correct JSON response, but can't get the results to display on the page...

How to reset form through javascript?

I have tried $("#client.frm").reset(); but it is not working.So how to reset form via jquery? ...