Click here to Skip to main content
15,907,493 members
Home / Discussions / Web Development
   

Web Development

 
GeneralRe: AJAX question Pin
alex_korch28-Sep-06 9:25
alex_korch28-Sep-06 9:25 
QuestionFooter at bottom Pin
eggsovereasy27-Sep-06 7:31
eggsovereasy27-Sep-06 7:31 
AnswerRe: Footer at bottom Pin
UltraCoder9-Oct-06 17:50
UltraCoder9-Oct-06 17:50 
QuestionLive video Pin
nida baber27-Sep-06 6:17
nida baber27-Sep-06 6:17 
AnswerRe: Live video Pin
zhengdong jin28-Sep-06 23:58
zhengdong jin28-Sep-06 23:58 
GeneralRe: Live video Pin
nida baber29-Sep-06 2:35
nida baber29-Sep-06 2:35 
GeneralRe: Live video Pin
zhengdong jin29-Sep-06 18:03
zhengdong jin29-Sep-06 18:03 
QuestionCreating multiple input fields using javascript Pin
wallyson27-Sep-06 4:25
wallyson27-Sep-06 4:25 
</code>Hey,
I am trying to create multiple jscript input fields, once a user clicks on a button.
Basically the click on a button and a new set of input fields is added (many of these could be made, its the users discretion.)

Im having problems.
here is some of my code.
<code>
<script>

var cfields= new Array();
var x = 0;
function showFields()
{
var divID= 'results';
var output='';

output+= '<div style="border: 1px solid; width: 151px;padding: 3px;" id="announcements"><input type="text" value="URL"><br>'+
'<input type="text" value="Headline"></div>';

output+='';


document.getElementById(divID).innerHTML = output;
}

///////////////////////////////////////
//
//////////////////////////////////////

function newField()
{
var foo = new showFields();
cfields.push(foo);
alert(cfields);
x++;
}





</script>

<body>
<!--<a href="#" onClick="showFields();">Click here</a>
<a href="#" onClick="newField();">new Field</a>-->

<br /><br />

<table>
<tr>
<th><p>Email Generator</p></th>
</tr>
<tr>
<td>
<div style="border: 1px solid; width: 151px;padding: 3px;"><input type="text" value="Date"></div>
</td>
</tr>
<tr>
<th align="left"><p>Announcements</p></th>
</tr>
<tr>
<td>
<div style="border: 1px solid; width: 151px;padding: 3px;" id="announcements'+x+'"><input type="text" value="URL"><br>
<input type="text" value="Headline"></div>

<div id="results"></div>
</td>
<td valign="top">
<div style="border: 1px solid; width: px;padding: 3px;" align="center"><input type="button" value="+" onClick="showFields();"><br>
<input type="button" value="-"></div>
</td>
</tr>



</code>
I tryed to create a new array and stick a new instance of the function into it.
This is not working. Someone please help me.
AnswerRe: Creating multiple input fields using javascript Pin
10011000100101101000027-Sep-06 7:58
10011000100101101000027-Sep-06 7:58 
GeneralRe: Creating multiple input fields using javascript Pin
wallyson28-Sep-06 4:27
wallyson28-Sep-06 4:27 
AnswerRe: Creating multiple input fields using javascript Pin
10011000100101101000028-Sep-06 8:18
10011000100101101000028-Sep-06 8:18 
GeneralRe: Creating multiple input fields using javascript Pin
wallyson28-Sep-06 8:27
wallyson28-Sep-06 8:27 
QuestionCan a normal user admin IIS Pin
Dinuj Nath26-Sep-06 22:51
Dinuj Nath26-Sep-06 22:51 
QuestionMouse cursor setting for elements. Pin
Brady Kelly26-Sep-06 22:49
Brady Kelly26-Sep-06 22:49 
AnswerRe: Mouse cursor setting for elements. Pin
Kschuler27-Sep-06 8:51
Kschuler27-Sep-06 8:51 
Questionupdate or modify Pin
scorp_scorp26-Sep-06 21:54
scorp_scorp26-Sep-06 21:54 
AnswerRe: update or modify Pin
_AK_26-Sep-06 23:09
_AK_26-Sep-06 23:09 
GeneralRe: update or modify Pin
scorp_scorp26-Sep-06 23:50
scorp_scorp26-Sep-06 23:50 
GeneralRe: update or modify Pin
_AK_27-Sep-06 0:02
_AK_27-Sep-06 0:02 
GeneralRe: update or modify Pin
scorp_scorp27-Sep-06 0:29
scorp_scorp27-Sep-06 0:29 
GeneralRe: update or modify Pin
_AK_27-Sep-06 1:32
_AK_27-Sep-06 1:32 
QuestionAsp:Label control Pin
nannapanenikamalnath26-Sep-06 19:10
nannapanenikamalnath26-Sep-06 19:10 
QuestionSimple Regular Expression? [modified] Pin
neo_605326-Sep-06 18:00
neo_605326-Sep-06 18:00 
AnswerRe: Simple Regular Expression? Pin
_AK_26-Sep-06 23:11
_AK_26-Sep-06 23:11 
GeneralRe: Simple Regular Expression? Pin
neo_605327-Sep-06 0:02
neo_605327-Sep-06 0:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.