473,378 Members | 1,471 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Adaptive forms

Hi
I'm new to javascript and been forced to jump in at the deep end(at
least this feels like the deep end to me!).

I need a form with two buttons, and when one of the buttons is pressed
it displays a text box, like so.

<form method = "POST" action="<?php echo $_SERVER['PHP_SELF']; ?>">

<button type="submit">Show Text Field</button><br>

<button type="submit">Submit</button>
</form>

How do i go about implementing this in JavaScript?
thanks

Apr 27 '07 #1
1 1390
On Apr 27, 11:40 am, Damo <cormacdeba...@gmail.comwrote:
Hi
I'm new to javascript and been forced to jump in at the deep end(at
least this feels like the deep end to me!).

I need a form with two buttons, and when one of the buttons is pressed
it displays a text box, like so.
<form ... >
<button type="button" onclick="showFi(this.form)">Show Text Field</
button><br>
<input type="text" name=extra size=40 style="display:none"><br>
<button type="submit">Submit</button>
</form>

and this function in script :
function showFi(form){
var style=form.extra.style
style.display=style.display=='none'?'':'none'
}
Apr 28 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Hong Kong Is A Good Place | last post by:
how can i connect my sql server 2000 to Adaptive Sybase Server 11.5 and 12.0? Thx.
1
by: jsausten | last post by:
My client has a custom app using a Sybase Adaptive Server Anywhere 7 DB backend. I need to regularly extract read-only data from a couple of tables in this database and I would have thought it...
19
by: James Fortune | last post by:
I have a lot of respect for David Fenton and Allen Browne, but I don't understand why people who know how to write code to completely replace a front end do not write something that will automate...
3
by: Joshua Russell | last post by:
Hi, Both the methods below open up a windows form called MasterForm. However, one works better than the other. Method 1 opens the form correctly but I don't have any reference to the instance of...
3
by: M D | last post by:
I've got a data source with a .cdb extension that appears to be accessed via a runtime engine of adaptive server anywhere v.6.0.3. Can anyone advise me how to connect to this data source? What's...
4
by: Nacho Nachev | last post by:
Hello, AFIAK ASP.NET (1.1) uses a technology called 'Adpative Rendering' to output HTML that is compliant with the client browser or at least stick to HTML 4 specification or IE. This seems...
7
by: Mike Bulava | last post by:
I have created a base form that I plan to use throughout my application let call the form form1. I have Built the project then add another form that inherits from form1, I add a few panel controls...
13
by: MD | last post by:
I have been converting a program from VB6 to VB.Net and enhancing it as well. All has been progressing OK although its been hard work. Now, all of a sudden, when I try to execute a ShowDialog()...
3
by: Lloyd Sheen | last post by:
I have the following situation: Need a user resizable user control. After much trying with user control I came across the idea of hosting the controls in a form marked as not TopLevel = false. ...
3
by: Geraldine Hobley | last post by:
Hello, In my project I am inheriting several forms. However when I inherit from a form and add additional subroutines and methods to my inherited form I get all sorts of problems. e.g. I sometimes...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.