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
    Regular Coder
    Join Date
    Dec 2005
    Posts
    217
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Question javascript problem??

    Hello frens of CF
    This is my first question regarding JS...
    I have made a simple chatroom....
    it has 3 frames , one for displaying messages ,second for entering the messages and third for displaying the online usersn and logout link.......
    i had got some problems listed as...
    >when the scroll bar appears in the message displaying frame then the scrolling is in up direction but i want the scrolling to the down(automatic) so the user dont have to scroll down for reading the messages
    >when tried to chat in private with more than one ,than the pop up window is replaced by another rather than opening a new pop up
    >when tried to Logout by clicking the button in 3rd frame the page redirects to the login page in third frame only...but i want to redirection should go to the whole page
    >when message is entered in field , then by clicking enter button didnt work ..but it works by clicking the mouse to the send button..but i want to make it work by clicking the enter button which may be easier..
    >whent the message is entered and sent the message remains in the field but i want to clear the text from the field once the message is sent and the cursor should remain in the field for further entering

    :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ::::::
    that's the problem i am suffering from...
    Please help me in the topic specified with the codes .....
    Again Thank you in advance

  • #2
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,075
    Thanks
    0
    Thanked 256 Times in 252 Posts
    >Put an anchor in the last message
    Code:
    <a name="bottom"></a>This is the last message.
    and then the form action URL should end with #bottom.

    >Use different window target for each member.
    Code:
    w = window.open(url, "user1");
    w.focus();
    ...
    w2 = window.open(url, "user2");
    w2.focus();
    Take note that space is not allowed in target name, and also special characters except underscore.

    >redirecting to the topmost window:
    Code:
    window.open(url, "_top"); 
    or
    top.location.href=url;
    >when there is only one text field and a button, the form is automatically submitted when Enter key is pressed.

    >In onload of the messages list page, reset the message field in the other frame.
    Code:
    <body onload="parent.frames['targetFrame'].document.forms[0].messageField.value=''; parent.frames['targetFrame'].document.forms[0].messageField.focus();">
    Glenn
    ____________________________________

    My Blog
    Tower of Hanoi Android app (FREE!)
    Tower of Hanoi Leaderboard
    Samegame Facebook App
    vBulletin Plugins
    ____________________________________

  • #3
    Regular Coder
    Join Date
    Dec 2005
    Posts
    217
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Thanks alot for the help:::::
    if problem continues then i will consult you again


  •  

    Posting Permissions

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