Usable Forms
Jul 16, 2004This is an article discussion thread for discussing the SitePoint article, "Simple Tricks for More Usable Forms" .......
View 12 RepliesThis is an article discussion thread for discussing the SitePoint article, "Simple Tricks for More Usable Forms" .......
View 12 RepliesHow do I make my website viewable and usable by everyone on my network (in other words, locally)? I'm working on a web-application (primarily Javascript and html) that will be located in a folder that everyone has access to at my company. This page is a fairly basic (a person signs-in, their name appears in a table below....the table is constantly growing).
My goal is to make everyone able to dynamically add to this table. They need to be able to refresh the table and see it in its current state, and add their names to and continue growing the table. Of course, if I just place my basic web application in the folder everyone has access to, they open it to its original state. I'll copy in my working code so far, if that give a better visualization of what I mean.
<html>
<STYLE TYPE="text/css">
body{margin: 0; padding: 0}
tr.headerT
{
font-family: Calibri;
font-size: 16pt;
color: white;
text-align: center
} .....
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.
View 2 Replies View Relatedhow to add forms in javascript, but it's limited to text input forms.
<script type="text/javascript"><!--
function updatesum() {
document.form.sum.value = (document.form.sum1.value -0) + (document.form.sum2.value -0);
}
//--></script>
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.
<input type="button" value="D20" onclick="this.form.display.value = Math.round (20 * Math.random())" class="buttonHi" /> <input name="display" type="text" size="6" value="" />
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.
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....
I have to iframes within one page. When I triger action in one frame, I
need to update the content's of other frame's selection list.
How to access second frame's form element from my first frame in index
page?
Suppose I named my second frame "content", and form element is named
simply "form1". If I try to access that form by refering:
parent.content.document.form1, I get nothing at all.
If I have a form as below:
<form name="Show" style="position:absolute;top:200;left:450;background-
color: yellow">
Mouse location.<br>
X: <input type="text" name="MouseX" value="0" size="4"><br>
</form>
Then accessing the value of the text box is simple:
alert(document.Show.MouseX.value)
But what if I use a div instead, how can I get at the same value?
<div id="Show" style="position:absolute;top:200;left:450;background-
color: yellow">
Mouse location.<br>
X: <input type="text" name="MouseX" value="0" size="4"><br>
</div>
Is it possible to access the value of a radio button or change a radio
button to enabled/disabled without using the forms tags<FORM></FORM>? In
other words is the forms tag required for these actions?
i have two forms(form1 and form2) on my html page.
question1 : can i access form 1 variables in form 2?. if so how?
question 2: when form2 action is saveci.jsp . can i access form1
variables in saveci.jsp. if so how?.
basically when form2 is submitted, form1 variables should be accessed
in the jsp which processes form2.
i'm trying to use javascript to change the content of a textbox in a
different frame.
by clicking on a 'folder' link in 'leftFrame' i want to put the value
assigned by that link into the 'folderName' textbox in the
'uploadForm' form in 'mainFrame'. i'm doing this as...
onClick="parent.mainFrame.uploadForm.folderName.value='fold er'"
this works perfectly fine with IE and Safari on my Mac OS X machine
and IE 6 on my PC laptop but anything Mozilla-based on either machine
gives me an error i just can't seem to get round...
'parent.mainFrame.uploadForm has no properties'
I'm working on a simple Twitter app that checks whether a user is following another user, but I'm having trouble picking up on the inputted values in my form.
I've got this form on my page:
And using the form plugin, here's my JS:
The only thing that's being alerted is "username, username" and it's not registered text inputted into the fields at all.
I'm trying to add an input element to all forms using appendChild.
The script first searches for input elements with the name of "myinput".
If it finds an input element with that name, it assigns the value "myvalue".
If it can't find an input element with that name, it tries to create a new one for all forms.
Code:
What's wrong with my code?
i need to be able to select the year and according to the year only be able to select certin months.
i was thinking an if statement but (if year = 2006 then months= jan,mar,dec) sorta thing but i cant get that part working. any direction would be nice.
maybe there's an easier/different way to do this?
<script language="javascript">
function downloadForm(formMonth,formYear){
month = document.getElementById(formMonth).value;
year= document.getElementById(formYear).value;
location.href = "/pdf/qa/customer-satisfaction-leaderboards-" + year + "-" + month +".pdf";
}</script> Code:
I am working on creating a project and I need some help. I have 2 form boxes, one that displays text, and one that does not. What my goal is, is to have someone type the text displayed in the top form in the bottom one and have the word that they are typing highlighted in the display text. If someone type the word wrong, it will be red text in the bottom form. Code:
View 1 Replies View RelatedI have to create a dynamic HTML page that actually contains two separate HTML forms.Can anyone tell me how can I create two forms in a single HTML page.
View 1 Replies View RelatedI'm not a JS person, so hopefully this'll be nice an easy .
The follwoing bit of code:
Code:
<script language="javascript">
// if form exists , set cursor in first input field
function focusonform()
{
if (document.forms[0]) {
document.forms[0].elements[0].focus();
}
else
{window.focus();}
}
</script>
This appears to work fine on a page with no forms using Mozilla 1.0, IE6 on win2000. But NOT on IE6 on XP - I get the following message:
A Runtime Error has occured.
Do you wish to Debug?
Line: 70
Error: 'document.forms.0.elements.0'
I was wondering, I have several pages with different forms, these pages are in a frameset. I was wondering is there a Javscript I can put in a .js file that will set focus to the first form element in each page with out having to write a script for each page?
View 2 Replies View RelatedI am trying to create a form (a quiz to be exact) and I know how to create one in php. The only problem with this is that the location that I am planning on installing the quiz does not allow me php access, a cgi-bin or even internet access . Iam able to use html pages from a location stored on the desktop or in a network folder.
My idea is to have the first page be the actual quiz with the users selecting the answers. The following page (whether its a popup, text file, or a new page) would be where the answers are displayed and then ultimately printed to paper. Most of the scripts that I have found that would do something similar are email style scripts (I am unable to use this method)
This is what I have in php and is the type of format I am looking for in javascript. (I'm not very proficient in php as I just started and I have no clue about javascript) Code:
I'm embarking on a rather interesting wine cellaring project where I need to enable a user to add form fields (a complete table row with several fields) on demand.
If they start filling out the form and need another row for another bottle, I need them to be able to click a button that adds a new row to the table with the same fields.
I also need perhaps another button that will create the row and duplicate the form field values of that row. The winery, wine namen and variety may be the same but the year may change and I dont wan thte user to have to do any double entry. I've been researching DOM and have been looking at sites like Quirksmode.
Am I heading in the right direction? I'm just about to go an buy a book on DOM and start really getting into it.
I'm making a form and I need it to do this:
From a drop-down box, the user chooses their country.
- User selects a country other than Australia, nothing happens.
- User selects Australia, another drop-down box appears with Australian states
* If they select a state other than Victoria, nothing happens
* If they select Victoria, another drop-down box appears with Region
I'd like the subsequent drop-down boxes to be either inactive and unclickable (technical terms here ) or not visible at all until the above conditions happen.
I need someone to point me to the write direction here. I know nothing of javascript, and I've tried looking everywhere I can on Google.
I have a drop down of all the sizes I have in a database. I call them to a form with the ID number as the value. What I want is when a user selects a size, it gets added to the table. For example:
<table>
<tr>
<td>Paper</td><td>size</td><td>quantity</td>
</tr>
<!--Repeat this bit with javascript according to the Paper/size chosen on the drop down -->
<tr>
<td>Glossy</td><td>4x6</td><td><input quantity form></td>
</tr>
<!--End repeat here -->
</table>
Java script is not my kind of language. Anyone know how to make a two slot form that valadates. If a field is not entered it adds a * next to it.
View 1 Replies View RelatedI'm encountering a problem when trying to modify the innerHTML of a div when the div contains a <form></form> element.
Is there a way to fix this?
i have an array in an HTML form.
UserName[1], UserName[2]...
all the UserName r actually a checkbox.
now i need to disable them upon a disable button.
in my function i created a loop
for (Counter=1; Counter <=CheckMarkCounter; Counter++)
//CheckMarkCounter is alredy set to something like 5.
{
document.Form1.UserName[Counter].disabled=true;
}
but that failed to work.
so i tried
to do the following, write the statment into a string and run it by using eval:
st='document.Form1.UserName['+Counter+'].disabled=true'
eval(st);
as for the string, its fine but still the eval gives me an error: document.Form1.Username.1 is null or not an object....
I'm trying to create a fairly simple form which contains a label, a
button, and a textbox.
I've done quite a bit of reading and, from what I can figure, the
following should work, but isn't....
var rowCommentBox = document.createElement("TR");
var cellCommentBox = document.createElement("TD");
var frmCommentBox = document.createElement("FORM");
frmCommentBox.setAttribute("METHOD", "POST");
var strAction = ""submitComments.asp?Org="+strOrg+"&date="+activeWeekBegins""
frmCommentBox.setAttribute("ACTION", strAction);
var rowFrmCommentBox = document.createElement("TR");
var cellFrmCommentBoxLabel = document.createElement("TD");
var strFrmCommentLabel = document.createTextNode("comment:");
var cellFrmCommentBoxButton = document.createElement("TD");
var btnFrmCommentBoxButton = document.createElement("INPUT");
btnFrmCommentBoxButton.setAttribute("TYPE", "SUBMIT");
btnFrmCommentBoxButton.setAttribute("VALUE", "UPDATE");
var cellFrmCommentBoxTxtbx = document.createElement("TD");
var txtbxFrmCommentBoxTxtbx = document.createElement("INPUT");
txtbxFrmCommentBoxTxtbx.setAttribute("TYPE", "TEXT");
txtbxFrmCommentBoxTxtbx.setAttribute("cols", "50");
txtbxFrmCommentBoxTxtbx.setAttribute("VALUE", strComments);
cellFrmCommentBoxLabel.appendChild(strFrmCommentLa bel);
rowFrmCommentBox.appendChild(cellFrmCommentBoxLabe l);
cellFrmCommentBoxButton.appendChild(btnFrmCommentB oxButton);
rowFrmCommentBox.appendChild(cellFrmCommentBoxButt on);
cellFrmCommentBoxTxtbx.appendChild(txtbxFrmComment BoxTxtbx);
rowFrmCommentBox.appendChild(cellFrmCommentBoxTxtb x);
frmCommentBox.appendChild(rowFrmCommentBox);
rowCommentBox.appendChild(frmCommentBox);
tbodyOrgToAdd.appendChild(rowCommentBox);