AI Zone Admin Forum Add your forum

NEWS: Chatbots.org survey on 3000 US and UK consumers shows it is time for chatbot integration in customer service!read more..

Virtual Recruiting Assisstant
 
 
  [ # 76 ]

Wonderful…good to see u back Dave Sir,May Almighty help you recover with your injuries,

Yes I have edited chat.php ‘s form slightly and also added some lines of javascript in index.php for not allowing a user to send empty strings..(I wanted to do the same functionality as u have done with morti…but ended up here,making submit button disable instead:)),also added a timer too smile

well now i am working to make my chat scrollable,
I have used an html scroll box

<div width:1000px; border:1px solid #ccc;font:16px/26px Serif; overflow:auto;”>
<?php
echo $res;
?>

</div>
but the problem is that when the chat goes out of the scroll box’s bounds,the previous chat is erased :( 
Can you please help me out what is wrong with this code or should I add to it??I have tried using readonly textbox and textarea too….but in vain

 

 
  [ # 77 ]

Thank you, Maleeha.

I know this is a silly question, but you have a link to a working example of your page? I would like to see what is happening, and I would like to be able to view the source of the document as a whole. This will make it easier for me to be able to best advise you on how to proceed.

{This post created using Dragon NaturallySpeaking smile}

 

 
  [ # 78 ]

No sir,the question is not at all silly….I am highly thankful to you that you are showing your concern and dedication….

index.php is as follows:

<?PHP
//———————————————————————————————————————————————-
//Program-o Version 1.0.4
//PHP MYSQL AIML interpreter
//Written by Elizabeth Perreau
//Feb 2010
//for more information and support please visit http://www.program-o.com
//———————————————————————————————————————————————-
[color=blue]include_once(“bot/chat.php”);
include_once(“timer3.php”);
//TIMER ADDED
?>

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html >
<head>
<meta http-equiv=“Content-Type” content=“text/html; charset=iso-8859-1” />
<title>Program-O AIML Chat Bot</title>
<style type=“text/css”>
<!—
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
}
.demouser {
color: blue;
}
.demobot {
color: green;
}
—>
</style>

[removed]
[color=red]//STARTING OF JAVASCRIPT
function ontest(){
document.chat.chat.focus();
}
function enableButton(){
var chat=document.chat.chat.value;
if(chat.length>0)
{
document.chat.submit.disabled=false;

}
else
  document.chat.submit.disabled=true;

}
//ENDING TAG OF SCRIPT
[removed]
</head>

<body>

<div width:1000px; border:1px solid #ccc;font:16px/26px Serif; overflow:auto;”>
<?php
echo $res;
?>
</div>

<div>

<?php
  echo $res;
  echo “<br>”;
  echo $formchat;
?>
 
</div>
 
</body>
</html>
[/color]


in Response_handler my form changed slightly for the button disable implementation:


$form = ”
      <form name=“chat” id=“chat” method=“post” action=”“>
  <a name=“chat”> </a>
  <input type=“text” name=“chat” id=“chat” size=“35” maxlength=“50” >
  <input type=“hidden” name=“action” id=“action” value=“checkresponse”  >
  “.$buildformvals.”
  <input type=“submit” name=“submit” value=“SAY” disabled=“disabled” >
  </form>”;

I have also increased $convoLines in config.php from 1 to 5 (only to see the effect…It is displaying more lines than before )

{This post created using Dragon NaturallySpeaking }

:O ??

 

‹ First  < 4 5 6
6 of 6
 
  login or register to react