Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: SV: Re: Generaing a text box


Message #1 by "Robert Nyman" <robert.nyman@c...> on Wed, 18 Sep 2002 12:05:40 +0200
Can you position the textbox in a particuler position?

Regards,
Chandrabhan Dutta Majumdar
Software Engineer,
Infosys Technologies Ltd.
Tel : 80-852-0261 Extn : 51594
E-mail : chandrabhan_dutta@i...


-----Original Message-----
From: Robert Nyman [mailto:robert.nyman@c...]
Sent: Wednesday, September 18, 2002 3:36 PM
To: javascript
Subject: [javascript] SV: Re: Generaing a text box


It depends on what browser/browsers you're targeting,
but for IE 5 and up and Netscape 6 & 7:

<input type=3D"button" value=3D"Create textbox" 
onClick=3D"createTextBox()">

function createTextBox(){
	var oTextBox =3D document.createElement("input");
	oTextBox.setAttribute("type", "text");
	oTextBox.setAttribute("value", "Some text in the text box");
	document.body.appendChild(oTextBox);  // This, of course,
depends on where you want it to appear...
	// It can, for example, also be
document.getElementById("someDiv").appendChild(oTextBox);;
}


/Robert


-----Ursprungligt meddelande-----
Fr=E5n: Elindram, Maheedhar [mailto:Maheedhar_Elindram@s...]
Skickat: den 18 september 2002 11:50
Till: javascript
=C4mne: [javascript] Re: Generaing a text box


thanks Hovik for ur response.

I want to generate a new text box in my page,
   and that should be on click of a button.

More clearly, on clicking a button, a textfield should be generated.

Can you help plz....

Maheedhar

> -----Original Message-----
> From:	Hovik Melkomian [SMTP:melvik@b...]
> Sent:	Wednesday, September 18, 2002 2:46 PM
> To:	javascript
> Subject:	[javascript] Re: Generaing a text box
>
> I didnt get ur Question but if u wanna read the value of textbox & do
> dothing its code is:
>
> FormsName.TextBoxName.Value
> I dont know what u wanna do?!
>
> HIH,
> Hovik
> ----- Original Message -----
> From: "Elindram, Maheedhar" <Maheedhar_Elindram@s...>
> To: "javascript" <javascript@p...>
> Sent: Wednesday, September 18, 2002 1:34 PM
> Subject: [javascript] Generaing a text box
>
>
> hi,
> How do i generate a text box oncliking a button within the form. Can
> anyone help me out in this. thanks in advance
>
> Maheedhar
>
>
>
> ---
>
> Improve your web design skills with these new books from Glasshaus.
>
> Usable Web Menus
> 
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=3Dnosim/theprogram
> me
> r-20
> Constructing Accessible Web Sites
>
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=3Dnosim/theprogramm
e
> r-20
> Practical JavaScript for the Usable Web
>
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=3Dnosim/theprogramm
e
> r-20
>
>
>
>
> ---
>
> Improve your web design skills with these new books from Glasshaus.
>
> Usable Web Menus
> 
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=3Dnosim/theprogram
> me
> r-20
> Constructing Accessible Web Sites
>
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=3Dnosim/theprogramm
e
> r-20
> Practical JavaScript for the Usable Web
>
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=3Dnosim/theprogramm
e
> r-20


---

Improve your web design skills with these new books from Glasshaus.

Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=3Dnosim/theprogramm
e
r-20
Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=3Dnosim/theprogramm
e
r-20
Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=3Dnosim/theprogramm
e
r-20



---

Improve your web design skills with these new books from Glasshaus.

Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=3Dnosim/theprogramm
e
r-20
Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=3Dnosim/theprogramm
e
r-20
Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=3Dnosim/theprogramm
e
r-20

  Return to Index