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.
Page 2 of 2 FirstFirst 12
Results 16 to 24 of 24
  1. #16
    Regular Coder
    Join Date
    Feb 2012
    Posts
    123
    Thanks
    19
    Thanked 3 Times in 3 Posts
    Okay...I only changed the js file that you corrected. It's not doing anything at all. When I press enter it goes to a second line, but doesn't refresh and doesn't post. I used the same code that I just posted in the previous thread; other than u're new code that you sent. I have no idea what's wrong

    Checked in Chrome...Firefox...IE.... All same thing...
    Last edited by XCalibre; 03-01-2012 at 07:27 AM.

  2. #17
    Regular Coder
    Join Date
    Feb 2012
    Posts
    123
    Thanks
    19
    Thanked 3 Times in 3 Posts
    Okay...I went back to the original code that I first posted. It works, but still can't get it to enter. It only works on hitting the SEND button.

    I will try to start from scratch with original code. I really appreciate all the suggestions and help you guys have given. Hopefully I can get this figured out. Anymore help would be great. Thank you all.

  3. #18
    Senior Coder DanInMa's Avatar
    Join Date
    Nov 2010
    Location
    Salem,Ma
    Posts
    1,577
    Thanks
    13
    Thanked 248 Times in 248 Posts
    Quote Originally Posted by XCalibre View Post
    Okay...I went back to the original code that I first posted. It works, but still can't get it to enter. It only works on hitting the SEND button.

    I will try to start from scratch with original code. I really appreciate all the suggestions and help you guys have given. Hopefully I can get this figured out. Anymore help would be great. Thank you all.
    dude, I had it working and posting messages on your page.

    I cant troubleshoot it, if you keep reverting and changing the code.

  4. #19
    Regular Coder
    Join Date
    Feb 2012
    Posts
    123
    Thanks
    19
    Thanked 3 Times in 3 Posts
    Quote Originally Posted by DanInMa View Post
    dude, I had it working and posting messages on your page.

    I cant troubleshoot it, if you keep reverting and changing the code.
    I tried that last code that was said to be working. It wasn't working for me. I will go back and copy and paste the code again, and give it a try again. You said it was working, but not on my Chrome, so I tried it with Firefox and then with IE, and it didn't work for me. Let me try it again. It's been this way forever...driving me mad LOL....

    Sorry if I've misunderstood anything u've said. Not trying to Thank you.

  5. #20
    Regular Coder
    Join Date
    Feb 2012
    Posts
    123
    Thanks
    19
    Thanked 3 Times in 3 Posts
    Okay...I have reverted the index.tpl back to the working copy that was said to be correct. This was done on post 2. Changes were...

    Id was given to the form: id="newmessage
    Submit was replaced by button in the input type.

    Then in post 14, a new send_message.js was given that was said to be working. I used that as the current send_message.js.

    In Internet Explorer it just goes to a second line when entered. Clicking send does nothing.

    Firefox and Chrome do the same thing...nothing....

    Here is the converted code, given from post 2 and post 14. What am I doing wrong? I made all the changes that were given, but nothing is working in any browers... I'm not trying to be difficult. It's being difficult with me LOL! Very frustrating. I've been at this for over a week just trying to figure out how to get it to enter.

    INDEX.TPL - ALL CODE

    Code:
    <?php
    
    /**
     * SocialEngine
     *
     * @category   Application_Widget
     * @package    Widget
     * @copyright  Copyright 2012
     * @license    free
     * @author     XCalibre
     */
    
    ?>
    
    
    <SCRIPT LANGUAGE="JavaScript">
    
    function open_pop(){
    window.open('application/widgets/shoutbox/emot_box.html','mywin','left=20,top=20,width=470,height=230,toolbar=1,resizable=0');
    }
    
    </SCRIPT>
    
    <html>
    
    <head>
    
    <script src="application/widgets/shoutbox/js/jQuery.js" type="text/javascript"></script>
    
    <style type="text/css">
    
    
    /* Main Shoutbox */
    		.chatBox {
    		padding: 5px;
    		height: 268px;overflow: auto;
    		width: "100%";
    		font-family: Arial,Helvetica,sans-serif;
    		font-size: 11px;
    		background-color: #CFCFCF;
    		-moz-border-radius-topleft: 6px;
    		-moz-border-radius-topright: 6px;
    		-moz-border-radius-bottomright: 0px;
    		-moz-border-radius-bottomleft: 0px;
    		-webkit-border-radius: 1px 1px 0px 0px;
    		border-radius: 1px 1px 0px 0px;
    		border-style:solid;
    		border-width:1px;
    		border-color:#3C0000;
    
    }
    
    		.chatBox .user {
    		background-color: #DFDFDF;
    		text: bold;
    }
    
    		#username {
    		background-color:#DFDFDF;
    		text: bold;
    }
    
    /* Logging Messages */
    
    		.chatBox .main {
    		background-color: #fff;
    		height: 175px;
    		padding: 5px;
    		overflow: auto;
    }
    
    /* New Messages */
    
    
    		#newMessageContent {
    		font: 14px ariel, sans-serif;
    		width: 400px;
    				border-radius: 1px 1px 0px 0px;
    		border-style:solid;
    		border-width:1px;
    		border-color:#000000;
    		margin 5px;
    }
    
    /* Smilies*/
    
    		.chatBox .messageBox .smiley {
    		float: left;
    
    } 
    
     		#insertSmilies {
    		height: 38px;
    		width: 100px;
    		border-radius: 1px 1px 0px 0px;
    		border-style:solid;
    		border-width:1px;
    		border-color:#000000;
    		margin 5px;
    	
    }
    
    /* End Smilies */
    
    /*  SIZE OF SEND BUTTON */
    
    		#newMessageSend {
    		height: 38px;
    		width: 100px;
    		border-radius: 1px 1px 0px 0px;
    		border-style:solid;
    		border-width:1px;
    		border-color:#000000;
    		margin 5px;
    
    
    }
    
    		.chatBox .messageBox .left {
    		float: left;
    
    }
    
    </style>
    
    </head>
    
    <body>
    
    
    <div class="chatBox">
    
    	<div class="user">
    		
        	Welcome <input type="text" size="13px" name="username" id="username" value="<?php echo $this->translate('%1$s', $this->viewer()->getTitle()); ?>" readonly="readonly" style="border:hidden"/>
    		
    	</div>
    	
    	<div class="main">
    
    	</div>
    
    
    	<div class="information">
    Enter Text Below:
    
    	</div>
    
    
    	<div class="messageBox">
    
    	<form name ="newMessage" id="newmessage" class="newMessage" action="" onclick="">
    
    		<div class="left">
    
    			<textarea name="newMessageContent" id="newMessageContent"></textarea>
    	
    		</div>
    		
    		<div class="smiley">
    
    			<input type="button" value = "Smilies" id="insertSmilies" onClick="open_pop()" />
    
    		</div
    
    
    		<div class="right">
    
    			<input type="submit" id="newMessageSend" value="Send" />
    
    		</div>
    		</form>
    </div>
    
    <script src="application/widgets/shoutbox/js/refresh_message_log.js" type="text/javascript"></script>
    <script src="application/widgets/shoutbox/js/send_message.js" type="text/javascript"></script>
    <script src="application/widgets/shoutbox/js/protect.js" type="text/javascript"></script>
    
    </script>
    </body>
    </html>
    SEND_MESSAGE.JS - ALL CODE

    Code:
    $(function() {
    	$('form.newMessage').submit(function(e) {
               e.preventDefault();
    		
    		var username = $("#username").val();
    		
    		var message = $("#newMessageContent").val();
    		
    		if (message.length > 0 || message == "Enter your message here") {
    			return false;
    		}
    		
    		var dataString = $("#username,#newMessageContent").serialize();
    		
    		$.ajax({
    			type: "POST",
    			url: "/application/widgets/shoutbox/send_message.php",
    			data: dataString,
    			success: function() {
    			message="";
    			}
    		});		
    	});
    //this function below watches for "enter" in the keyup action, jsut inside of the newmessage textarea
    $("#newMessageContent").keyup(function(e){
      var key;
    if(window.event){
        key = window.event.keyCode; 
    }    
    else{
    key = e.which;     //firefox
    }
    
    if (key === 13 )  {
    if (e.shiftKey === false){
    $("#newMessageSend").click();
    }   
      }   
    });
    
    });
    *EDITED*

    I changed the tpl file that had the id of newmessage to match the $('form.newMessage').submit(function(e) { in the js file. change was from id="newmessage" to id="newMessage" as well....
    Last edited by XCalibre; 03-02-2012 at 11:03 AM.

  6. #21
    Senior Coder DanInMa's Avatar
    Join Date
    Nov 2010
    Location
    Salem,Ma
    Posts
    1,577
    Thanks
    13
    Thanked 248 Times in 248 Posts
    ok this is bugging me now. I think maybe we are a step behind each other .
    If you want Id be happy to setup a time where we could work on it this weekend.
    Im on eastern time

  7. #22
    Regular Coder
    Join Date
    Feb 2012
    Posts
    123
    Thanks
    19
    Thanked 3 Times in 3 Posts
    Quote Originally Posted by DanInMa View Post
    ok this is bugging me now. I think maybe we are a step behind each other .
    If you want Id be happy to setup a time where we could work on it this weekend.
    Im on eastern time
    That works for me. You can private me or just type in here. I"m available anytime. I'm in the US....CST as well.

  8. #23
    Regular Coder
    Join Date
    Feb 2012
    Posts
    123
    Thanks
    19
    Thanked 3 Times in 3 Posts
    Okay...I have the shoutbox working in all three browsers.

    IE...FF...Chrome....

    But in IE, the smilies windows will show page not displayed. Works fine in FF and Chrome. And the actual shoutbox works great.....it's just when you click on smilies, the popup window opens, but says page not displayed. Anyone with any ideas?

    Thanks.

  9. #24
    Regular Coder
    Join Date
    Feb 2012
    Posts
    123
    Thanks
    19
    Thanked 3 Times in 3 Posts
    UPDATE:

    Thanks for all the help everyone! U guys have been awesome. I have all problems fixed and alternating colors for the messages. Smilies working.. All spacing is properly placed. Again, I appreciate all the time helping me.

    Blessings,

    X


 
Page 2 of 2 FirstFirst 12

Posting Permissions

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