Hello!
i need a dropdown menu "< select >" which contains multiple checkboxes.
so people can drop down and select many options ( all the checkboxes should be inside the dropdown )
someones call the dropdown a combobox ( so just to make anyone understands )
i want this with javascript/css & not java applet or flash.
Thank you!
...
I made a chat using PHP and JavaScript chat and there is a disconnect button which removes user from the chat removing him from user list first. But if the user closes browser then he will remain in the user list. How do I check if he left?
This must be done without putting any handles on page closing in JS because if user kills the bro...
I have a mysql database containing upc numbers that I would like to print to labels with a zebra printer (LP2824). I would like to somehow be able to send those numbers directly to my label printer, which is not the default printer without the user being prompted.
As far as I can tell, IE is the only option as some type of activeX contr...
I'm making a small app in Adobe Air which I need to interact with the Github Gist API. However I'm kind of stuck.
If you're not familiar with Adobe Air you can still help, the XMLHttpRequest javascript object can do cross domain requests, as there is no domain as such. So theres nothing Adobe Air specific here.
Where I'm stuck is I th...
$("#submit_js").click(function() {
var commentmsg = $('#comment').val();
$.post(
"user_submit.php",
{comment: $("#comment").val(), aid: imgnum, uid:$("#uid").val()},
function(data){
/*alert(data);*/
//$('#greetings').html('Your choice was submit...
I've seen this somewhere before but I can't seem to find the little snippet.
If I have a div that sets opacity (or animates up) on hover, but I hover off that div before its done animating, I want it to toggle back. Otherwise I hover over it a few times and I have 10+ seconds of animation/flashing to wait for.
Here is my code:
$("a.pr...
I have several forms on my website in which fields are dynamically created or altered based on what is altered in previous fields? Is there a good framework for doing this easily?
...
Hi folks,
This is a continuation of this question:
http://stackoverflow.com/questions/1987811/move-div-based-on-user-voting
I first posted the question as an unregistered user, and then later registered, so I couldn't edit or add to my original question...
Justin Johnson really helped me out with the code, but I'm still having a proble...
I am trying to use this block of code to replace ALL "123"'s in a long string with a different number.
var new_id = new Date().getTime();
$('#food').after(
"<div id='123' name='123'> etc etc".replace('123', new_id)
);
But it's only replacing the first 123 with the new_id. Is there a way to replace all of them?
...
I have been looking for a way to allow the user to easily change the order of entries in a formset. I found a StackOverflow question that addresses this subject, with the accepted answer referencing a Django Snippet that uses a JQuery tool to allow drag 'n drop of the entries. This is nifty and cool, but I have a problem with 'extra' e...
I have an html box with which users may enter text. I would like to ensure all text entered in the box is either encoded in UTF-8 or converted to UTF-8 when a user finishes typing. Furthermore, I don't quite understand how various UTF encoding are chosen when being entered into a text box.
Generally I'm curious about the following:
H...
I know that, in jQuery, we are told to use $(document).ready() in order to ensure that the DOM elements are ready for interaction. I know that this definitely applies if the script tags are in the <head>. If they are at the end of the <body>, after all of the DOM elements, should I still use a DOM-ready function? Are there browsers in wh...
Hi,
I have a TinyMCE field initialized as follows:
... extended_valid_elements: "ul[type],li,a[name|href|target|title],img[class|src|border|alt|title|hspace|vspace|width|height|align|name|style],hr[class|width|size|noshade],span[class|align|style],iframe[src|class|width|height|name|align],#p/div,strike",
force_br_newline...
I am using the following JavaScript to add a number of inputs based on a number in a drop down menu. It works fine in firefox and chrome, but in IE7 the inputs all float left on a new line.
function add(number)
{
var foo = document.getElementById("listInputs2");
var count = 1;
foo.innerHTML = "";
while ( count <= (number) )
{
//Creat...
Hi there.
I'm creating a little iphone webapp for my school using the iWebkit (fancy css/javascript for making the interface for iphone / ipod touch web sites / webapps.
There is a feature called Popup which simulates a popup that you get in settings on your iPhone when you reset all settings (i.e. confirmation popup).
How can I make ...
I'm trying to write a function that reads the oncontextmenu event for a div item. (I need it to find out whether the ctrl key was being pressed, e.g. by using e.ctrlKey.)
This works:
<div id="item_2" class="lineitem" align=center oncontextmenu="alert('foo');">test</div>
But this does not:
<script language="JavaScript">
function asd...
hello ,I used webView to show javaScript,one image was included in the javaScrip,but the webView not run the image on the contrary appear a "?"image. Idonot why?
my code:
demo.html
<html>
<script language="javascript">
/* This function is invoked by the activity */
function wave() {
document....
i have a event i trigger on every link in my site.
but then i want it to NOT trigger on links i've got class='nofocus' on.
for example
<a>link</a>
<a class='nofocus'>register</a>
$('a').live('click', function() {
$('#searchbox').focus();
}
how do i rewrite the $('a) so the second link wont trigger the event?
...
So, i need to press Ctrl+Shift+Del in a program way.
I want my extension to press Ctrl+Shift+Del and then press 'Enter'
(to clean all history,cookies,cache and so on).
i do next:
var e=document.createEvent('KeyboardEvent');
e.initKeyEvent( 'keypress', true, true, window, true, false, true, false, 46, 0);
document.dispatchEvent(e);
Acc...
The following code opens the new window without scrollbars in Firefox, IE and Opera.
var options = {
height: 300, // sets the height in pixels of the window.
width: 300, // sets the width in pixels of the window.
toolbar: 0, // determines whether a toolbar (includes the forward and back buttons) is displayed...