Search:

Type: Posts; User: traq; Keyword(s):

Search: Search took 0.02 seconds.

  1. Thread: Element help

    by traq
    Replies
    23
    Views
    11,154

    Not exactly. You can use an array to store a...

    Not exactly. You can use an array to store a list of values:
    var myArray = [ 'hello', 'world' ];

    console.log( myArray[0] ); // hello
    console.log( myArray[1] ); // world

    Or, you can use a...
  2. Thread: Element help

    by traq
    Replies
    23
    Views
    11,154

    I'm not quite sure what you mean by that. You...

    I'm not quite sure what you mean by that.

    You can provide a new value each time you call a function:
    var hello = function( name ){
    var greeting = "Hello, " + name + "!";
    return...
  3. Thread: Element help

    by traq
    Replies
    23
    Views
    11,154

    That's fine - the problem isn't that you're using...

    That's fine - the problem isn't that you're using the innerHTML property, it's just that you're getting into a situation where you have to carefully plan what you replace and when.


    I would...
  4. Thread: Element help

    by traq
    Replies
    23
    Views
    11,154

    As you can see, adding an element with the id of...

    I have looked all around the script and now i have added the id for p but i dont understand where i should add the id for b[/QUOTE]

    As you can see, adding an element with the id of "p" won't...
  5. Thread: Element help

    by traq
    Replies
    23
    Views
    11,154

    Are you testing your code? I would highly...

    Are you testing your code? I would highly recommend using a console like Firebug or Chrome's Dev Tools. This makes it easy to find simple problems - the console will literally tell you what, and...
  6. Thread: Element help

    by traq
    Replies
    23
    Views
    11,154

    cool. Is it working the way you want? If your...

    cool. Is it working the way you want?

    If your question has been answered, please mark your thread "resolved":
    On your original post (post #1), click [edit], then click [go advanced]. In the...
  7. Thread: Element help

    by traq
    Replies
    23
    Views
    11,154

    ...that's really weird. The links were working...

    ...that's really weird. The links were working yesterday. I fixed them. Here's the correct URL: http://jsfiddle.net/traq/9my2g/4/
  8. Thread: Element help

    by traq
    Replies
    23
    Views
    11,154

    That's fine — you don't have to. It's an example...

    That's fine — you don't have to. It's an example so you could see how to integrate the getGender... function with your existing createProfile function. You can call the createProfile function...
  9. Thread: Element help

    by traq
    Replies
    23
    Views
    11,154

    Did you try that? Did it do what you wanted? ...

    Did you try that? Did it do what you wanted?

    Did you look at the working example I set up for you?
  10. Thread: Element help

    by traq
    Replies
    23
    Views
    11,154

    No, you shouldn't be replacing your original...

    No, you shouldn't be replacing your original function at all. Simply add a call to the new function at the spot you want the gender term inserted.

    Look at, and experiment with, the working...
  11. Thread: Element help

    by traq
    Replies
    23
    Views
    11,154

    I… don't see where you're trying to use it. You...

    I… don't see where you're trying to use it. You seem to have replaced your entire characterProfile function with the contents of my getGenderFromRadio function.

    example usage
  12. Thread: Element help

    by traq
    Replies
    23
    Views
    11,154

    Do you mean you want the value of the checked...

    Do you mean you want the value of the checked button?


    function getGenderFromRadio(){
    var radio_gender = document.getElementsByName( 'gender' );
    for( var i=0; i<radio_gender.length; i++...
Results 1 to 12 of 12