User Profile

Collapse

Profile Sidebar

Collapse
rubenhan
rubenhan
Last Activity: Dec 31 '08, 01:14 AM
Joined: Dec 5 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • using closure to pinpoint a form to empty itself

    Hi,

    I'm trying to use closure to pinpoint a form from a list of forms with the same name to erase its onblur function when the chosen form goes onblur.
    For example, there will be indefinite numbers of text input forms with the same name "name[]" like this and same function "calculate( )" when onblur,

    name[] onblur= function () {calculate()};
    name[] onblur= function () {calculate()};
    name[]...
    See more | Go to post

  • rubenhan
    started a topic fixing a variable's value in a function

    fixing a variable's value in a function

    Hi,

    I would like to assign an integer to a add() through a variable. So I initially wrote this.


    Code:
    var i=0;
    name.onblur = function {add(i)};
    i++;
    if I created like 4 add(i), then i = 3. Then, if I onblur my first add(i), which I want it to be add(0);, it will instead add(3).

    In other words, how do I make sure I put a permanent value into a function through a variable?...
    See more | Go to post

  • @Dormilich,

    Thank you. I'll use getElementsByNa me.

    Is there a method to find a current position of that array? In other words, is there a way to catch getElementsByNa me.item()?

    Should I just do

    Code:
    var j;
    var position = document.getElementsByName[j];
    See more | Go to post

    Leave a comment:


  • how can I get the position in the array of getElementsByName

    Hi,

    I have multiple text input fields with the same name "name[]" and "age[]" which will return an array of information when I get document.getEle mentByName("nam e[]") (should I use getElementsByNa me("name[]") instead?)

    For example,

    name[] age[]
    name[] age[]
    name[] age[]

    What I want to pull off is, when "name[]" goes onblur,...
    See more | Go to post

  • thank you guys. all solved.
    See more | Go to post

    Leave a comment:


  • to add onblur function to an appended Input element

    Hey, guys.

    My basic idea is this. When I write "1" in the pre-existing text field and onblur, I want to add a new field with a set of attributes, which turned out to be the same as the pre existing text field. (I don't want to use clonenode because of the compatibility issue)

    So I want that new text field to behave like the old text field. However, the new text field does not create another text field when...
    See more | Go to post

  • rubenhan
    started a topic onblur add dynamic form does not work

    onblur add dynamic form does not work

    Hi guys,

    I'm a javascript beginner and I am trying to write this simple javascript code that will add text field when I type some texts in the preexisting text field. When the text field is onblur, javascript will see if the type of the text's value is either number or string.
    Depending on its type it will create either a text field or a button. However, for some reason, nothing is happening. Could you check my code and see...
    See more | Go to post
No activity results to display
Show More
Working...