I am trying to query the value of a textfield outside of a form but
with no success so far... the reason why I am not using a form is that
there seams to be an annoying issue with hitting the [Enter] key (at
least in Mozilla) when there is only one textfield in the form... the
[Enter] key seams to trigger some type of a submit... but when the
textfield is defined outside of a form this is not an issue... However
I don't know how to access the value for the textfield outside the
form.. Code:
<div> </div><div>I just found out that jQuery can match on partials,.. is this correct?</div><div>and if so how do I make it match on the whole text.</div><div>[code]......
I'm trying to load xml using ajax call and later query the xml using a input field, the results of which should populate into a div. I would be searching by site id or title in the xml.Right now, after the ajax call nothing happens.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head>[code].....
Basically i have a form with jqueryui implemented (autocompletes) and I need the form to display the number of current results as the user fills the form, i.e. once the user has finishedinputtingdata into one field, the form will query the database with the current form details and return just the number of results ($mysql_num_rows)
I'm building a multi-language PHP/mySQL -site. I'm also building a CMS for the site.
There are 5 languages. In the CMS fields for e.g. english bodytext are called (id=) 'bodytext_en'. German looks like 'bodytext_ge', etc.
The '_en' part tells us that it's a textfield for english texts. How can i check if ALL english fields are filled out, without defining each and every field separately. Like:
I have a point where the user will get an overlay div, to keep this div centered I move and mess with the CSS property "top". Though, I was testing and when I tabbed into the following textfield, it pushes the div down - as if there is text in the .val() field. (so it keeps going to the "else" statement even just tabbing INTO the field).
Does anyone know how to fix this and keep it from pushing the div down just from tabbing between textfields?
i want to display contents of a form in a plane text format. for that i want to track a number of textfields in the form..... do i need to write a seperate line for each textfield ? i tried
for(i=1;i<7;i++) { var cont[i]=document.getElementById("txt"+i).value ------- ------------ ------------- } but it didn't work out..
I have a problem with buttons + textfields. I want to change the value/text of several textfields at once, if i click on a button. If i click again, i want to clean the textfields again.
So i made following javascript-function, which should be startet, when i click on the button.
variable-declaration + button:
HTML Code:
textfields:
HTML Code:
JS-function:
Code:
When i use (f.e.) onclick="this.form.name.value="${user.name1}", then there is no problem and i get the right output. But in this way, i can't change the value of all textfields at once and also i can't implement the "clean"-function for the second "click".
I think i use the wrong variable-syntax in the js-function, but i don't know what's wrong there. Is it even possible to get the get the values of the "user"-variable in javascript in this way?
I have a scenario with 3 x 12 textfields and looking for a javascript that could do the trick.
What I'm looking for is a smart way of extracting the values of the first three textfields and then multiply them. This will be done for all 12 rows. I then would like to add the result from the 12 rows together to create a final value that will be presented in a seperate textfield.
row1=value1*value2*value3; row2 =value1*value2*value4; and so on....untill row12. then row1+row2+...row12
To show you what I mean I've created a small page with 3 x 2 fields at this link: [URL] The idea is then to have 12 rows and not two. Also - it should call for the function onChange.
I guess combind all the values in three seperate arrays, multiply and then add the values together could do the trick, but so far I havn't manage to do this. Maybe a for(i<12)-code could help.
if ($('input:#hohe_innen').val()< $('input:#hohe').val()){ $('#msg').html("Innenmaß ist kleiner Außen"); } else { $('#msg').html("Inner size is bigger than out size: cause inner "+$('input:#hohe_innen').val()+" and out "+ $('input:#hohe').val());
[Code]...
Inner size is bigger than out size: cause inner 50 and out 100
I'm trying to write a function that does a simple math function between some textfields.
There are 4 variables : Unit price, Discount, Quantity and Total
Unit price is a fixed variable.
Discount, Quantity and Total depend on the fixed variable and also on the values of eachother. (ie : if qty=2 then total=2xUnit Price) etc...
I want to be able to show the changing values in real time.
So if I have 3 textfields and I change qty, I want it to update Total based on the discount and the qty. If I update discount, I want to update Total based on qty and discount.
I'm guessing I would have to write three functions and call each one from their respective textfields.
How to write a function, and call it so that passes the unit price to the funtion, gets the values of all of the textfields and then changes them all to their new values?
In a form, how do I have a set of radio buttons with the last one being an other option that shows and hides a textfield depending on if it is selected or not? I have seen how to disable the textfield if the radio button is not selected, but not how to hide it. Is this possible?
I want to make few forms but 1 submit button. I want to do 1 page , 5 forms , 1 submit button so when i click on the submit button it will send the 5 forms as 1 form.
Where the inputs sum1 and sum2 are text fields you put whatever numbers you want in. That works fine. Great. Now what I'm having trouble with is modifying the code so that it will add one form with an input number with a form that spits out a randomly generated number.
This is what I'm using for my random number generator. So basically I want to be able to put, say, 5, into the input text field above this. And then click on the d20 button to get a random number, say, 15, and then have the first code add the inputted 5 with the randomly generated 15.
I have an html page with a div element within a form for dynamically creating textfields.
The problem is when I click a link on the page, or the submit button, then click the back button, the new textfields in the div element are not there anymore.
Does anyone know how this scenario is usually handled?
Any way to define the length of a textfield? I have just set all the field with a width so that they look like clear and easy to read, However, When I see the page of mac os, They are totally not the result in IE of FF, Does there any way to define it absolutely?
I have already change the size attribute and set the width of the input.
I want to prepopulate the value of the two textfields with the field label e.g. Name, Email Address, until the fields are in focus.
I have this working for the Name field:
Obviously I can repeat this code on the email field as well, but wondered if there is a way to make it a function with the label value not hardcoded so I can use the same technique on forms with many fields.
The script creates new fields with calendar in a form, if new information is added to a field and then a new field is created the information is lost in FF Live demo: [URL]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title>Calendar Text Input</title> <script language="javascript" type="text/javascript" src="datetimepicker.js"></script> <script type="text/javascript"> [Code]...
I have 3 TextFields, called txtUSD, txtEUR, txtAUS. And a PopupList with the same values, minus the txt part, but I need to form the names of the TextFields to use based on the selection that the user made. So I've done this:
Code: function btConvert_Click(event){ var amount = document.getElementById("txtAmount").value; var rates = document.getElementById("lstConvertTo").value; var from = "txt" + document.getElementById("lstFrom").options[document.getElementById('lstFrom').selectedIndex].text; var to = "txt" + document.getElementById("lstConvertTo").options[document.getElementById("lstConvertTo").selectedIndex].text; var curr_from = document.getElementById(from).value; var curr_to = document.getElementById(to).value; if(curr_from > curr_to){ amount * rates; } else { amount / rates; } alert(result); }
But every time I try it I get this error: Code: mobile/main.js line 215: Result of expression 'document.getElementById(from)' [null] is not an object.
What I would like to do, is to show one image ('1.jpg') if three textfields in my form are filled, but another image ('2.jpg'), if all or any of the fields are blank.
Using DOM in IE, how can I loop through FORMs and access FORM elements in a specific form? For example, www.hotmail.com has about 13 forms. I believe the one displayed is dependent on the URL. If I want to access the submit button of the visible form, which is usually the last one, how is that done?
Currently, I look for type=submit using DOM but it doesn't find anything and only loops through the first FORM elements.
I've been trying to teach myself JavaScript via a book and a number of JavaScript Tutorials Online. I have more understanding of what I am doing, although definetly not has much as what I have read on this newsgroup.
I'm trying to learn a new skill in order to hopefully get a job. My job went to india while I was out on medical leave (carpal tunnel.)
My question, I have two JavaScript / Htm pages identical to the one below. I'm trying to figure out how I could put both of these "identical" javascript pages into One HTM page. But I am clueless as to what to look for and or how to proceed. I'm thinking that I need to somehow add a checkbox_checker() and a checkbox_checker(2) or something like this.
I've looked at the "For Dummies" book on JavaScript, and my Beginning JavaScript Book as well as Google'd. Funny thing is though you have to have enough "knowledge" of JavaScript to know what to look for....