Creating FORMs Dynamicaly 
Author Message
 Creating FORMs Dynamicaly

I have seen people asking how to create FORMs dynamicaly 'cause QueryStrings
have anoying limits (2k at maximum... Am I right?)... Well the code below
works fine for me (on IE only):

<SCRIPT LANGUAGE=javascript>
function InsertHiddenFields(frm, name, value) {
 var str = "";
 for (i = 1; i < InsertHiddenFields.arguments.length; i += 2) {
  str += "<INPUT TYPE=hidden NAME=\"" + InsertHiddenFields.arguments[i] +
"\" VALUE=\""+InsertHiddenFields.arguments[i+1]+"\">";
 frm.innerHTML = str;


<SCRIPT ID=clientEventHandlersJS LANGUAGE=javascript>

function button1_onclick() {
 InsertHiddenFields(frmMain, "XPTO", "1", "ABCD", "2");    // Create the
hidden fields XPTO and ABCD



<P><INPUT id=button1 type=button value=Button name=button1
LANGUAGE=javascript onclick="return button1_onclick()"></P>

// The actual form container!
<form name=frmMain></form>


Fri, 07 Feb 2003 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Passing parameters dynamicaly from a form to another

2. textarea and scrollbar dynamicaly hidden

3. Dynamicaly populating a list box

4. creating ps tax forms

5. How do I create a form dictionary

6. problem with function creating forms

7. ? checking dynamically created form fields

8. Creating form objects in a function

9. Creating RDO connections in outlook forms

10. How to create a Log on Form

11. Help me Create User-Friendly FORM?

12. Can I create programetically add a page and field to the current form in calendaer item


Powered by phpBB® Forum Software