User Profile

Collapse

Profile Sidebar

Collapse
Nitestarz
Nitestarz
Last Activity: Jul 23 '07, 06:38 PM
Joined: Jul 16 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Nitestarz
    replied to Dynamic Form
    So I have everything working now on my form and ready to go except the insertbefore. I have looked at a bunch of tutorials and everytime I try something it doesnt work?

    Could I please see an example using my code?

    Code:
    function add_student(){
    
    //// Create Line breaks ////
    var linebreak=document.createElement("p");
    var linebreak0=document.createElement("p");
    ...
    See more | Go to post

    Leave a comment:


  • Nitestarz
    replied to Naming Dynamic Input Boxes
    Thank you! Works beautifully! :-)
    See more | Go to post

    Leave a comment:


  • Nitestarz
    replied to Naming Dynamic Input Boxes
    Excellent. Thank you!

    Is there anyway to get it to print Student3_Firstn ame instead of like this: Student_Firstna me3.
    See more | Go to post

    Leave a comment:


  • Nitestarz
    started a topic Naming Dynamic Input Boxes

    Naming Dynamic Input Boxes

    The following will add an input box on submit everytime a button is clicked. I would like it so that it names the input box differently everytime it is added starting with the number2, for example Student_Firstna me2, Student_Firstna me3, Student_Firstna me4, etc.

    [CODE=javascript]
    <input name="add_stude nts" type="button" class="submit" onClick="add_st udent()" value="Add More Students">...
    See more | Go to post
    Last edited by pbmods; Jul 21 '07, 01:04 AM. Reason: Changed CODE language. Thanks for using CODE tags!

  • Nitestarz
    replied to Dynamic Form
    I am having the hardest time trying to get this to work!
    See more | Go to post

    Leave a comment:


  • Nitestarz
    replied to Adding a label to a TextNode
    ahhh! i see how that works now! thank you :-)
    See more | Go to post

    Leave a comment:


  • Nitestarz
    replied to Adding a label to a TextNode
    I think i am more confused now!
    See more | Go to post

    Leave a comment:


  • Nitestarz
    replied to Adding a label to a TextNode
    Hmmm. It doesnt seem to be adding. Here is my whole code i am using:
    Code:
    function add_student(){
    
    ///Create Label///
    var label = document.createElement('label');
    
    //// Create Line breaks ////
    var linebreak=document.createElement("p");
    var linebreak0=document.createElement("p");
    
    //// Create text ////
    var header = document.createTextNode("Student
    ...
    See more | Go to post

    Leave a comment:


  • Nitestarz
    replied to Adding a label to a TextNode
    duhh!!! thank you..my brain is slowww today
    See more | Go to post

    Leave a comment:


  • Nitestarz
    started a topic Adding a label to a TextNode

    Adding a label to a TextNode

    ok, I have a TextNode:
    [code=javascript]
    var firstname_text = document.create TextNode("First Name: ");
    [/code]

    [Please use CODE tags when posting source code. Thanks! --pbmods]

    How would I be able to add a <label> tag to it so that when it prints out it is wrapped in the <label> tag?

    Thanks!!!!
    See more | Go to post
    Last edited by pbmods; Jul 19 '07, 03:59 PM. Reason: Added CODE tags.

  • Nitestarz
    replied to Dynamic Form
    I am just really confused with this. Please help!
    See more | Go to post

    Leave a comment:


  • Nitestarz
    replied to Dynamic Form
    Do I have to append that to anything?
    See more | Go to post

    Leave a comment:


  • Nitestarz
    replied to Dynamic Form
    how can i get it to print directly below the onclick?
    See more | Go to post

    Leave a comment:


  • Nitestarz
    replied to Dynamic Form
    here is the code for the positioning, shorteneded down as there are a bunch of input boxes:

    javascript:

    [CODE=javascript]function add_student(){

    //// Create Line breaks ////
    var linebreak=docum ent.createEleme nt("p");
    var linebreak0=docu ment.createElem ent("p");

    //// Create text ////
    var header = document.create TextNode("Stude nt Information");...
    See more | Go to post
    Last edited by acoder; Jul 18 '07, 10:01 AM. Reason: Code in tags

    Leave a comment:


  • Nitestarz
    replied to Dynamic Form
    got it! thank you! :-)
    See more | Go to post

    Leave a comment:


  • Nitestarz
    replied to Dynamic Form
    ok, got it to work! thanks :-)

    How can i get it to position directly underneath the button onclick?

    html code:

    <input name="add_cours es" type="button" class="submit" onClick="add_co urse()" value="Add More Courses">
    See more | Go to post

    Leave a comment:


  • Nitestarz
    replied to Dynamic Form
    yes, i think this is breaking it:

    document.firstn ame_text.append Child(span_text );
    See more | Go to post

    Leave a comment:


  • Nitestarz
    replied to Dynamic Form
    still doesnt want to work!
    See more | Go to post

    Leave a comment:


  • Nitestarz
    replied to Dynamic Form
    here is the javascript:

    [CODE=javascript]function add_student(){

    //// Create Line breaks ////
    var linebreak0=docu ment.createElem ent("p");

    //// Create text ////
    var firstname_text = document.create TextNode("First Name: ");

    //// Create input boxes ////
    var StudentFirstnam e=document.crea teElement('inpu t') ;
    StudentFirstnam e.type='text';
    ...
    See more | Go to post
    Last edited by acoder; Jul 17 '07, 11:18 AM. Reason: Code in tags

    Leave a comment:


  • Nitestarz
    replied to Dynamic Form
    this is where my head starts to spin! :-)

    var span_text = document.create Element('span') ;
    var span_text.style .color = "white";
    var span_text.style .backgroundColo r = "567297";
    var span_text.style .fontWeight = "bold" ;
    var span_text.style .padding = "2px";
    var span_text.style .width = "100";

    document.firstn ame_text.append Child(span_text );...
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...