dhtml

code to set a select box option value as an object

我是研究僧i 提交于 2019-11-29 02:14:03
问题 in an html page i have got, i have a select box like this with values. <select onChange="return filler(this.value);"> <option value="{'name':'rajiv',age:'40'}">a</option> <option value="{'name':'mithun',age:'22'}">f</option> </select> i want to pass a javascript array or object as the option value. right now it is treating the option value as a string. i want it to be an array so that i can access it by this.value.name,this.value.age in the filler function. is this possible? 回答1: You will not

Best server-side framework for heavy AJAX Java application

跟風遠走 提交于 2019-11-29 01:16:01
问题 There are zillions of Java web application frameworks. 95% were designed before the modern era of AJAX/DHTML-based development, and that means these new methods are grafted on rather than designed in. Has any framework been built from the ground up with e.g. GWT + Extjs in mind? If not, which framework has adapted best to the world of forms with dynamic numbers of fields and pages that morph client-side? 回答1: Echo2 / Echo3 by Nextapp (www.nextapp.com) is totally awesome. Advantages over GWT:

Is there a good in-browser code editor? [closed]

家住魔仙堡 提交于 2019-11-28 15:06:05
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed last year . We've all seen in-browser rich text editors, which allow you to edit colored/styled text in a WYSIWYG manner. But what about code editors, which automatically highlight code based on language rules as you type? Think Eclipse in a textarea (but without the refactoring support). Do such things exist? I imagine

TinyMCE API v4 windowManager.open - What widgets can I configure for the body option?

亡梦爱人 提交于 2019-11-28 14:30:44
问题 I would like to fill the body of a modal dialog with custom HTML, generated by Javascript. The documentation for this method is mostly empty. I have only found examples for loading an external file or adding a textbox. Is there a documentation for the available types? More specifically, is there a type to add general markup to the body of a dialog from a Javascript variable? 回答1: After I beautified the minified version of tinymce, i found that these may be some of the body types for

window opener close issue for javascript

余生长醉 提交于 2019-11-28 14:24:50
I have a problem with browsers window managament with javascript. I have two page in my proof of concept application. First page contains login information (username, password, login button etc.) and second page is a managament screen. I need that when the user pressed to the login button on the login screen it open to main screen and main screen must be open new window without full screen. I mean close, minimize, maximize buttons and bottom bar of the windows os must be stayed on the screen. During opening the new window on the login screen, it must be close itself automatically. I have found

JQuery Mobile .page() function causes infinite loop?

只谈情不闲聊 提交于 2019-11-28 12:35:29
I'm dynamically creating a listview with data from a AJAX response. It successfully creates the listview and populates it, but when i call JQM's .page() function on it, it seemingly goes into an infinite loop where the listview is appended forever. Is this a bug in JQM or am I doing something wrong? pageScript(function($context){ $context.bind("pagecreate", function(event, ui){ createMenu(); //function that deletes existing ul#menu and dynamically creates new one. $('ul#menu').page(); //here's where it causes a problem $('#menu a').bind('click', function(){ $.mobile.changePage($(this).attr(

Custom dropdown box using javascript and css

北战南征 提交于 2019-11-28 11:37:39
问题 Is it possible to create a custom dropdown box using javascriit and css. for which i need to place a background-image for dropdown box using javascript If yes or no ? if yes . give any suggestion ? without using JQuery 回答1: You can check out jQTransform 回答2: Here is a good tutorial on creating custom drop-down. JQTransform (as suggested by Olafur) is sufficient for me. But if you need more control such as adding icons, it's worth looking at the tutorial. 回答3: This might be overkill; but

How to create a modal popup using JavaScript? [closed]

情到浓时终转凉″ 提交于 2019-11-28 06:56:11
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 2 years ago . How to create a modal popup window with background with gray color using JavaScript and CSS? Can anyone show me an example? 回答1: I would recommend the jQuery one... http://jqueryui.com/demos/dialog/ 回答2: You can look into creating a JQuery dialog; I believe this will get you the

How can I dynamically create a tweet button?

只谈情不闲聊 提交于 2019-11-28 06:01:15
I'm currently trying to create a tweet button with the horizontal count feature dynamically: JavaScript var twitter = document.createElement('a'); twitter.setAttribute('href', 'http://twitter.com/share'); twitter.setAttribute('class', 'twitter-share-button twitter-tweet'); twitter.setAttribute('data-url','http://mindcloud.co.uk/idea/?idea=' + this.id); twitter.setAttribute('data-count', 'horizontal'); twitter.setAttribute('data-via', 'jtbrowncouk'); twitter.style.top = '20px'; twitter.style.left = '300px'; twitter.innerHTML = "Tweet"; The problem i'm having is that the button is being

Change textNode value

隐身守侯 提交于 2019-11-28 05:36:12
Is there any way to change the value of a DOM textNode in web browser? I specifically want to see if I can change the existing node, rather than creating a new one. To clarify, I need to do this with Javascript. All text in the browser is stored in #textNodes which are children of other HTML nodes, but cannot have child nodes of their own. As answered below, content can be changed by setting the nodeValue property of these Objects. Ash If you have a specific node (of type #text) and want to change its value you can use the nodeValue property: node.nodeValue="new value"; Note: innerText (and