Got some problems with a php script that outputs a jQuery script.
The purpose of the jQuery code is that when you select an item from the select field that other items need to be disabled(works correct in all conditions) and that at the same time text in corresponding divs' text are altered.The thing is that the script basically works.. however when you've made a selection only the disabling works everytime but the divs are only updated once, so you need to refresh the page if you want to do it again..[code]
The purpose of the jQuery code is that when you select an item from the select field that other items need to be disabled(works correct in all conditions) and that at the same time text in corresponding divs' text are altered. The thing is that the script basically works.. however when you've made a selection only the disabling works everytime but the divs are only updated once, so you need to refresh the page if you want to do it again..
I'm working on a list with doctypes and fases. There are n types and n fases. The fases can be ordered by dragging them.
example:
[btn Append new type] - a - a.1 - a.2
[Code]....
I have a fancybox (lightbox) to append new doctypes and fases, but after appending either one, the functions dont work anymore (dragging and opening the lightbox of the appended doctype.
The HTML gets appended without a prob. But it seems that the initiation of the draggable <ul> and the lightbox links doenst work.
I tried adding Javascript to re-initialize the functions, but this doenst work.
How can i fix the prob that appended links with the right class show the lightbox when they are clicked, and how do i make an <ul> draggble after one is added?
p.s. function appendFase(docTypeId,appendThis){ $(docTypeId).append(appendThis); $(docTypeId).sortable('refresh'); } gives error's...
In forms, we have all seen where people have numerous options to choose from in a SELECT field, or they can select Other, and type something in a different text field.
I would like to be able to disable this Other text field if the SELECT isn't on Other.
I know how to disable the submit button, but I don't know how, or even if, you can disable/enable a specific text field.
Not 100% sure why or how to make this work.I have 5 options in a select drop-down. Only two of them are to disable a text field. I have written it successfully to disable on one option. How would I add the second option? I have tried many different ways, and i know its something small that i am missing.Below is the code that does not work but shows the 2 options that disable my text field.
<script type="text/javascript"> function type_disable() { var qr_type = document.getElementById('qr_type');
I have a password text field, where copy paste from anywhere must be disabled. I have a textarea where the user must be limited to enter only 250 characters. <textarea name="description" id="description" maxlength="250" rows="4" dojoType="dijit.form.SimpleTextarea" style="width:200px;overflow:auto;word-wrap:break-word;">${fn:trim(status.value)}
I am trying to submit a form in javascript on clicking 'Button1'.On submission,it will disable the html table 'HTMLTable1' present in it.The code which I am using is as:
function OnButton1_Click ( ) { var oRows = document.getElementById('HTMLTable1').getElementsByTagName('tr'); var irows = oRows.length ;
[code]...
But On submit,the html table is getting disabled just for a moment then again it becomes active and user can interact with it.
I have a HTML table in a form with a submit button.In HTML table I have links present in first three rows for each columns of HTML table.I want to disable those links when user submit the form.How can I handle this in javascript?
I am currently using this plugin [URL]..(HTML) to display a div with content, depending on what is entered.Is there a way to disable the submit button if the div contains a certain message?
I have a field with country names and want to have a second field load the cities based on the country (3 cities per country), A javascript or even PHP would do, the values would eventually be in a database, however a solution with static values would be great.
I'm looking for a method of making a form field appear (namely a textbox) upon selection of a particular checkbox in a form field. I'm able to do it from a dropdown menu item, but how do you do it with checkboxes? Code:
I have the following code I picked up which tries to fill in a text field with data depending on a user's menu item selection. I place this code in the header:
var groups = new Array(); groups["apple"] = "fruit"; groups["grape"] = "fruit"; groups["milk"] = "diary"; groups["cheese"] = "diary"; groups["chicken"] = "meat"; groups["beef"] = "meat";
function printColorAndGroup(){ var value = document.getElementByName('food').options[document.getElementByName('food').selectedIndex].value; document.getElementByName('food_group').value = groups[text]; document.getElementByName('food_color').value = colors[text]; }
I then use the following html in the body: Code: Food: <select name="food" onchange="printColorAndGroup()"> <option>apple</option> <option>grape</option> <option>milk</option> <option>cheese</option> <option>chicken</option> <option>beef</option> </select>
Group: <input type="text" name="food_group"> Color: <input type="text" name="food_color"> But when I run this nothing happens... Here's the page [URL]. None of the code above is colored... looks like I'm using the wrong tags here. Which tags should I use to post this stuff correctly?
I have a form with two select fields (facility[] and lightbox[]), along with a few other text inputs. Both of the select fields allow the user to select multiple options. This is fine for our needs, as long as the user only selects fields from within one select box. As soon as the user decides to make a selection from the other select field, I'd like to permit that, but clear all other selections from the first field.
I'm using jquery validation plugin but i don't know how to do a thing:I'd like to enable a text field after selected a value from a selection list.The select field is this:
I have been using the jquery autocomplete plug-in for some time now and find it very useful. Lately I have come across the following problem in one of my JSP pages. The autocomplete suggestions are displayed and formatted properly. But when I select the one that I want, the result briefly appears in the input field and disappears. Simultaneously, the entered result automatically triggers another jquery search. The contents of my JSP page is given below. The same jquery code works perfectly well with other JSPs.
Code: <%@ include file="../common/include.jsp" %> <script> var cols = []; // column mappings : 0=Last name, 1=First Name, 2=Title, 3 = Employee ID $ .ready function { .....
How to reset an input field to its default value, which is depend on another. There is a way to clear the input field but not resetting to its default value.
Example
I have 2 radio buttons. Depends of the radio button selection some other input fields are required. Those things are already done using the click function. It clears the input field. But I need to reset to its default value.
I have a simple form - I want to disable the text field if Choice 2 from the dropdown menu is selected. I have this working with the code below, but for some reason if I go back and select choice 1 after selecting choice 2 the text field remains disabled. I only want it to be disabled if choice 2 is selected.
I am looking for a working replacement of the following function for Mozilla (this was written for IE):
// encloses the selected area into starting and closing tag // if no closing tag is given the starting tag will replace the selection function encloseSelection(startingTag, closingTag) { editRange = editArea.document.selection.createRange();
if (closingTag) { editRange.pasteHTML(startingTag+editRange.htmlText +closingTag); return; }
//editRange.collapse(false); // move insertion point to end of text range (append tag) editRange.pasteHTML(startingTag); // replace selection with startingTag }
Longer version: I am working on making an older "WYSIWYMG"-editor (written for IE) Mozilla-compatible. Everything works fine so far, but I am not able to figure out a solution to the above problem.
I'd like to enclose a selected text in one of the famous "designMode=on" iframes with HTML-strings. I've tried numerous ways - by now without luck.
I have set up my website quite some time ago that has served its purpose very well, however I will now be adding an order form functionality. So far, by reading books and traversing forums, I have been able to develop a page where the user 1.Enters data into the required fields, that is then submitted to a MYSQL database via PHP, 2.Can retrieve orders that are stored in the database, 3.Delete orders that are stored in the database.
I have wamp installed on my computer as the webserver. I have also incorporated two drop down lists that both retrieve their values from tables within the database. The first drop down list retrieves the Australian States that I have stored in a table, and once the submit button is pressed, it stores the State that is selected to a separate table. This drop down list functions as it should. An extract from "From Place an order.php"
<?php $dbcnx = @mysql_connect('localhost', 'root', 'tingling'); if (!$dbcnx) { exit('<p>Unable to connect to the ' . 'database server at this time.</p>'); } .....
The second drop down list retrieves product names from a table that contains products and their prices. What I would like to happen, is that when the product is selected from this drop down list, a text box is automatically filled with its corresponding price. I had this drop down list working as per the "States" drop down list, but could not get it to auto populate the text field. I got some assistance from a friend and was able to get the text box to auto populate with its corresponding price, however when the page was submitted to the database, the "id" number of the product name from the drop down list was stored, and not the product name.
<select name="productSelection" onchange = "getProductDetails(this)"> <option selected value="1product">Select Product</option> <?php $products1 = @mysql_query('SELECT * FROM products'); if (!$products1) { exit('<p>Unable to obtain author list from the database.</p>'); .....