Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Senior Coder
    Join Date
    Nov 2010
    Posts
    1,383
    Thanks
    264
    Thanked 32 Times in 31 Posts

    Help with onchange event

    HI, i know very little about javascript, just enough to get me into trouble actually lol.

    Here is what im working with. I have a custom Instant messenger for members.

    It uses embed object macromedia as well as javascript to diplay the window and send messages.

    What i want to do is simply add an onchange that when one person is typing it shows they are typing (ie xxxxx is typing....)

    My experience is in php and html and i looked thru the script and the javascript functions but im not sure what im looking for exactly. Do i need to have access to the swf or fla file and be able to edit them to do this? I dont see any form inputs or i would know exactly where to put the onchange lol. Im guessing the input is in the swf or fla file not sure how that works.

    what im guessing is that in the embed or the object tags (ill play with it) i can put something like

    Code:
    document.write('test on change\n');
    i think i need to wrap that in doc write script type=javascript in quotes so it parses.
    If i can get that text to show up inside the IM where i want it then i can try to figure out how to set focus on box and recongize onchange and do some testing.
    I think i might even be able to doc write the onchange command but not sure.

    Thanks
    Last edited by durangod; 05-21-2012 at 04:01 PM.

  • #2
    Senior Coder
    Join Date
    Dec 2010
    Posts
    2,398
    Thanks
    12
    Thanked 570 Times in 563 Posts
    When using "document.write" in an event handler like onchange you will erase the current document (and all of its content) and create a new (blank) one.

    You should immediately learn about other DOM manipulating methods like .innerHTML, document.createElement, .appendChild() etc.

  • Users who have thanked devnull69 for this post:

    durangod (05-21-2012)

  • #3
    Senior Coder
    Join Date
    Nov 2010
    Posts
    1,383
    Thanks
    264
    Thanked 32 Times in 31 Posts
    Thanks for the tips, i did a search thru agent ransack and found the inputs in the fla files. But since i cannot edit the fla (i dont own flash) im screwed on this one i think.


  •  

    Posting Permissions

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