javascript

Photo Gallery Editor (some product planning questions)

I need to create an interface for building photo galleries. I've got a good idea of how I want the UI to work, and I'm looking for input regarding existing scripts I could use, jquery plugins, general advice, etc.. The UI will consist of a narrow column on the left that will contain small thumbnails of all the users images. The rest of ...

What is the best way of sliding section of html using javascript?

Guys, I have a hidden section in my Html template (Am using Django templates), the hidden section is a login form, i want when a user clicks some login text(link), the html text hidding the form should slide downwards revealing the form. I have a feeling this can be done in Javascript! Am using django, please give step by step details...

How can I handle Java object serialization with JavaScript?

public class Person { private String firstname; private String lastname; private PhoneNumber phone; private PhoneNumber fax; // ... constructors and methods private void calculate() { } } I have serialized the Java object located on the server side and sent it to the client XStream xstream = new XStream(new DomDriver()...

Getting JavaScript exception happening in iframe surface

Here is the situation: A page (iframe.html) has an iframe loading another page (iframe-content.html). An JavaScript error might happen when iframe-content.html is loaded in the iframe. I'd like that exception to be visible to the browser (e.g. shown in Firefox error console, or Firebug). Here is what I see: When iframe.html is init...

Syntax for Instantiating JavaScript Date Objects

Hello, In JavaScript, it seems you can do either write: new Date().getTime(); ...or: (new Date).getTime(); The first one is logical, but the second one seems a little unusual to me... Is there any difference between these two ways of creating a Date object, and what is the purpose of the second? Thanks, Steve ...

Content ideas for a short JavaScript lesson.

I'm giving a short (30 mins) skills development talk on JavaScript to my peers on Friday, and would appreciate some suggestions for intermediate to advanced topics to cover. We all use JS daily and are quite familiar with more than just the basics, and I'd like to come up with an interesting as well as technically advanced topic. ...

Chaining selectors in jQuery

I'm a guy used to mootools' way of chaining selectors, and I can't seem to find anywhere how to do the same in jQuery. Suppose I have a select element in the selectObj variable. What I need is to get the last option in that select. In mootools I would have done something like: var option = $(selectObj).getElement('nth-child(last)') Ca...

Open source Javascript RTE

What open source RTE do you use in your day to day web dev tasks and why? I've been using both TinyMCE and FCK but both seem very clunky and buggy. I've had nightmares with FCK while trying to extend it and it has loads of bugs in IE. Ideally I'd be looking for something that fun to maintain and easy to extend while providing most of t...

How to open exernal link in new window through PHP ?

I want to open All external link into new window/tab through php without touching every external link code. and i don't want to this without target="blank". I can do this through javascript but i want to know if there is a PHP solution. ...

asp.net hidden field not setting new value, need disabled alternative

I have a hidden field on my page <input runat="server" type="hidden" id="selectedIndex" /> and it is being set by this bunch of code, an onclick event to a gridview's row: var gridViewCtlId = '<%=GridView.ClientID%>'; var selectedIndex = '#<%=selectedIndex.ClientID%>'; var itemVisible = '<%=ItemVisible.ClientID%>'; var gridViewCtl =...

YUI support of rtl languages

Does YUI support rtl languages? (rtl: right to left, such as hebrew or arabic). If so, how? I want to display a MenuBar where the different menu items start near the right margin and go to the left. ...

using mouseover/mouseout in gridview with alternating rows

I currently have a gridview with alternating colors, Silver and White, with a blue header (not selectable, obviously). Initially, I had this onmouseover/onmouseout thing working but for some reason, yesterday morning it failed to work, and all day yesterday, I have been struggling, googling for answers and coming up short. Here is the ...

Problem adding item to sortable list

I'm not entirely sure how to post this question, but here goes... I have a web app that has a list of sortable items. I sort them ajax style using Sortable. That works like a charm. I can drag and drop the items till my heart is content. At the same time, there is a button that allows for the creation of new items on my list. This ...

Adding 'onClientClick' javascript to an ASP.NET Login control

I've got to put a login page from a 3rd party website in an iframe on another website that I'm developing. I need to add some JavaScript to break out of the iframe when the user logs in, but I can't make the login button to execute the JavaScript and do the postback for the login - just one or the other. Here's the code from the iframe'...

ExternalInterface.call() not getting return value

I have a Javascript function that returns the innerHTML of a div. I am attempting to call this function from Actionscript and store the return value. I know that the Javascript function is being called because there is an alert that displays the return data, The data that is returned to Actionscript, however, is null. I am not sure w...

IE 7 error writing to a document

Hi all, I am using the prototype JavaScript library to read the contents of a text area (which is often the complete mark-up for another HTML page), create a new window and then set the new window content to be that same mark-up, like so: var htmlContent = $("msHTML").value; var win = window.open("preview.cfm", "Preview HTML", "left=2...

How can I strip the subdomain and .com/.org etc from a domain in Javascript?

I want to get just the domain name(yahoo, google, stackoverflow) from the domain in javascript. How can I easily pull just this out and drop any subdomain and any extension? See comment, I need it to work for any domain if possible. ...

Add and Retrieve Rows aaded to DataGrid using Javascript ASP.Net 1.1

I am able to add a row by using javascript DOM cloneNode method, Now I would like to read all the Rows of the dataGrid on the Server side. Any Help would be appreciated ...

Jquery Hidden Field in Table

Hi all, I was wondering if anyone knew of a way to access a hidden field (by client id) within a table row using jquery. $("#tblOne").find("tr").click(function() { var worker = $(this).find(":input").val(); }); I find that the above works for a row that has only one input, but i need some help figuring out a way t...

How can I allow my user to insert HTML code, without risks? (not only technical risks)

Hi guys. I developed a web application, that permits my users to manage some aspects of a web site dynamically (yes, some kind of cms) in LAMP environment (debian, apache, php, mysql) Well, for example, they create a news in their private area on my server, then this is published on their website via a cURL request (or by ajax). The n...