javascript

how to move an object only in x axis using jquery ui draggable ?

Hi all I could move an object using jquery ui draggable, but I only want to move the object in x axis, now it moves on both x and y axis Thank you ...

How do i get swfupload to return image URL after upload?

I am facing a really weird problem. I am using swfupload to upload multiple images to the imageshack server. I am also storing the returned URLs in the database. How do i show the URL returned from imageshack to the user as soon as i receive it? Is there any way to make swfupload return the URL once upload finishes? Here is the code that...

How to set class for a html tag when loading the page?

Hi, The problem: I want to use PHP include to import file "header_menu.html" into all pages that share the same navigation menus, but each page has its own current highlighted menu item. For example, the following are the menus, in index.php, only the first should be set to "current" class, and in download.php, only the second should ...

Accessing attachments using gmail contextual gadgets

I'd like to save an email, along with attachments, from Gmail (Google Apps) to another database for CRM-like functionality. However, according to the docs, "Extractors can not read email attachments". My question: Is it possible to somehow use some type of identifier from the email (such as EmailTimeExtractor) and use that to pull the at...

How to parse dates in GWT?

I lost a lot of time on this one, so I'm posting the question and answering from what I learned, as a resource to help other people out. The context of the problem is building an RSS reader. While RSS dates are supposed to conform to RFC822, they do so in differing ways so you want a method that's flexible. I tried to use GWT DateTime...

How do I remove eval() from the following code .... - Javascript

I've been using eval in my code and I recently found out that there can be serious security issues If eval() is used inside Javascript. The most common scenario is where I'm using eval() to compose a variable name and then get the value of that variable like here; var a = "2" // could be any value work(a); function work(a) { va...

Send emal using Javascript.

How to send email using javascript. ...

can i capture the current/all tabs URL with javascript/jquery or would I need to make a plugin

I want to be able to capture the current url and/or the url of all open tabs. Can I do this in JavaScript or JQuery or am I going to need a plugin in FireFox/Chrome ...

Javascript activate on page load

I have a navigation menu within a page on my site, which has javascript applied to it to highlight the current selected link. The problem is I have the same menu on my homepage and when I click a link on the homepage, it goes to the intended section, but it doesn't initially highlight the corresponding link. For example, on the home ...

remove SPAN and BR in DIV

I have filled data enclosed in a SPAN tag and BR tag for line break, in a DIV control. From the DIV, I wanted to remove a patricular text, ie removing the whole SPAN and BR associated with the text too using jquery or javascript. I tried .remove() in jquery. It seems not working. I dont know what is the correct way. The script I used f...

Countdown Timer to activate a controller method

Hi all! I am building a survey page where users have a limited time to answer all their questions. The time given is stored in the model as @test.time_allowed, which is an integer representing seconds. I need to have a simple and non-user-tamperable way to get a timer to display on the view and execute a controller action when it winds ...

Flash and JavaScript communication within IE

I am having in issue with IE passing a string back into an swf using the EternalInterface class in Flash CS4. I have an swf with the following code: var externalString:String = ExternalInterface.call("IncomingJS") which is inside an event listener attached to an Event.ENTERFRAME and an if statement waiting for ExternalInterface.avai...

Chat scroll bar

I'm working on my chat box, when new posts are added to the bottom, how could I make the scroll bar follow new data at the bottom as its added, or stay where you are if say your in the middle rereading something, kinda like most irc clients do? ...

Simple way to send e-mail using javascript

Hi All, I wanted to know how to send e-mail using javascript. I dont want to use long functions with tag n all other stuff. Interested in only one/two liner statement which will allow me to send mail. I have used something like that earlier : function sendmail(_frm) { var eml="[email protected]"; var bod="&body="+_frm.selOne.value+...

Jquery validate error message placement location

Hi, I am trying to use jquery validate plugin on my 5 questions quiz form. But I have issue with how to display the validated error message for require field. My form is something like this: <form id="quiz"> <table width="100%"> <tbody> <tr id="qntr"> <td id="qntd">My question 1</td> <!-- if field is empty, validate error mess...

JQuery function not found

Hi, following code: // also tried function getDeletedDates() var getDeletedDates = function() { var s = new Array(); $(".deleted").each(function(i, e) { s.push($(e).attr("data-day")); }); }; $(function() { $("#delete_send").click(function() { alert("drin"); $.ajax({ ...

HTML tag showing in bottom on ckeditor

I am using CKEditor 3.2 and I am facing the problem to hide the HTML tag which is showing in bottom on CKEditor. Is anybody have done this type of customization please share with me. ...

How do I get users information using javascript/jquery - session/cookies/etc

Hi All, I'm working on one web application, I dont have through idea about how to get users information like Session's data, cookies , and others.. I want to know : Is there any way ? and how ? to get above information and client side information using javascript/jquery. What are others client side data can i access using javascript/...

How to bookmark a page which got parameters from one jsp page and generated output?

Hi I have one jsp which accepts avlue from textbox and passes it to another jsp page when button is clicked. Then by getting this value I have written one query which works perfectly. Gives the output and generates the proper report. But now i wants to bookmark this generated report. Can anyone tell me what i have to do for this thing? ...

javascript conflict

why does some javascripts come in conflict with some other ones? I mean I had been using javascript code for image gallery and then tried to get the text watermark in jquery. Why is that after using the jquery, the gallery totally disappeared? there was no common ids that I used inthe two scripts. Any reason for that? ...