Results 1 to 3 of 3

Thread: Help with Javascript...

  1. #1
    Advanced User Anza Power's Avatar
    Join Date
    May 2008

    Default Help with Javascript...

    Hello, I don't know if this is the appropriate place to post this, if not I apologize and ask that this thread be moved/merged...

    Anyways I've made that riddle gae called The Calculator, and I've used simple Javascript to make it cool and unique, but one skill I haven't managed to get to work, is making some buttons change something in another object on the page...

    Just out of randomness I tried putting in, let's say I wanna change the value of a button on the screen when you push a picture, so I put in onClick="B1.value='Something new'" (with B1 being the name for that button) and it worked, but then I found out that it's uneffective in Firefox, only in IE, can anyone tell me why?

    Here's an example of what I'm talking about:

    Can you test it with all browsers you have and tell me which ones work and which don't?

  2. #2
    Veteran Damar's Avatar
    Join Date
    Jun 2006


    it worked in ie and opera but not firefox

    on looking it i changed a small part and got it working in all 3.. this is the part i changed for the b1 button was not defined in firefox for how it interpret javascript

    <p align="center"><input type="button" value="AA" id="B1"></input></p>
    <p align="center"><input type="button" value="Click Me" onClick="B1.value='BB'" id="B2"></input></p>

    hope that helps you a bit

  3. #3
    Advanced User Anza Power's Avatar
    Join Date
    May 2008


    ^ Oh wow thanx alot dude, now it works...

Similar Threads

  1. Javascript Trick
    By bread in forum Tests, Quizzes, Tricks & Illusions
    Replies: 100
    Last Post: 07-25-2007, 15:52:55

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts