Jump to content

meomike2000

Members
  • Posts

    171
  • Joined

  • Last visited

    Never

Posts posted by meomike2000

  1. that float works well till you start to have diffrent size monitors, like older ones, and newer wide screen, then setting the table size to 50% seems to change everything relative to sizes.

     

    the page may not always look correct on diff monitors....

     

    the other fix is to create a master table that would include the four smaller tables as table data.

     

    this lets you make a table with four columns wide and then you can specify the size of the middle to and not the outer two.

     

    <table border="1" width="100%">
    <tr><td></td><td width="size">1</td><td width="size">2></td><td></td></tr>
    <tr><td></td><td width="size">3</td><td width="size">4></td><td></td></tr>
    </table>
    

     

    this lets the outside columns adjust to compensate for diff monitors and keeps your tables correct.

     

  2. why dont you try to create a page in html that would lay out the page you want then just include the php files in the correct spot or you can just intermingle the html inside the php to get the lay out and the script..

     

    check this out the file will be named index.php in my case.

     

    <?php
    session_start();  
    
    //includes.
    include 'dirconf.php';
    include 'find/get_num_users.php';
    
    echo '<link rel="stylesheet" type="text/css" href="../home/styles/generic1.css" >';
    
    //set page title. 
    echo '<title>' . $title . '</title>';
    
    echo '<html>
    <head></head>
    <body text="#ffffff" link="#ffffff" vlink="#ffffff" alink="#ffffff">
    <table border="0" cellpadding="0" width="100%">
    	<tr height="25px">
    		<td colspan="2">';
    			include '../home/test_title.php';
    			echo '<center><font size="+1">Are you <i>"n"</i>?</font></center><br><br>';
    		echo '</td>		
    	</tr>
    	<tr>
    		<td width="40%" valign="top">';	
    		echo '<form method="post" action="auth.php">
    				<br>';
    				if($cutoff>0) {					
    					echo '       <input type="button" name="signup" value="sign up" style="width:90px;" onClick="window.location=\'../signup/signup.php\'">';
    				}		
    				echo '<br><br>
    				enter username: <input type="text" name="username"><br >
    				<br >
    				enter password: <input type="password" name="password"><br >
    				<br >
    				       <input type="submit" name="submit" style="width:90px;" value="log in">';	
    	echo '</form><br><br>
    	<center>';
    		echo $numusers;
    	echo	'</center>
    		</td>
    		<td width="70%" valign="top" align="center">
    				<br><br><br><br>';
    				include 'find/find_user.php';		
    	echo	'</td>
    	</tr>
    	</table>
    
    </body>
    </html>';
    
    ?>
    

     

    hope this helps..

     

    mike

  3. i have a web site that uses jpeg images as backgrounds.

     

    all works well exept that some images appear to big for the page,,, it cuts the top and sides off.

     

    i dont want to stretch an image if not wide enough or not tall enough but,

    what can i do to get the image to fit the page and not be to tall and wide.

     

    this is the code that i have

     

    echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
    	"http://www.w3.org/TR/html4/strict.dtd">';
    
    if($img==null) {
       echo '<body link="#ffffff" vlink="#ffffff" alink="#ffffff">';
    }else{
      echo '<body background="/home/'.$img.'" height="100%" link="#ffffff"  vlink="#ffffff"   alink="#ffffff">';
    }
    

     

    and my style sheet has this

     

    body {
    font-family: arial, helvetica, sans-serif;
    color:#ffffff;
    background-color:#00bfff;
    background-attachment:fixed;
    background-position:center center;
    }
    

     

    can anybody help....

    thanks mike....

  4. i am trying to create a simple messenger,,, all works pretty good...

     

    the only problem that i have is for the main body i use <textarea>,

    when you enter information in the message area, <textarea>,

    the iformation is then stored in a table and when the user that the message was sent to checks his messages he gets the message... all that works great but what was put in the message box, <textarea>, does not hold format.....

     

    if i put in

     

    this

    is

    a

    test

     

     

    i get

     

    this is a test...

     

     

    not

     

    this

    is

    a

    test...

     

    hope this makes sense...

     

    thanks mike

  5. you have to have a username and password to get to it.....

     

    will this help:

     

    //used to set where cursor will be on page load.
    echo '<script type="text/javascript">
    function setFocus()
    {
          document.getElementById("message");
          message.focus();
    }
    onload = setFocus;
    </script>';
    
    //includes. 
    include '../login/dirconf.php';
    
    //open connection to database server.
    $connection = mysql_connect($host, $user, $pass) or die ('unable to connect!');
    
    //select  database to use.
    mysql_select_db($db) or die ('unable to select database!');
    
    $query = "select fr_uid, fruser, sub, mess from messages where touid = '" . $userid . "' and mid = '".$mid."'";
    $result = mysql_query($query) or die ('error getting page info:' . mysql.error());
    
    $row = mysql_fetch_row($result);
    
    //set message display in box.
    $test = "\n\n\n\n...............!!original message!!...............\n\n".$row[1]." wrote:\n\n".$row[3];
    
    //finish page header here.
    echo '<title>' . $title . '</title>';
    echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
    	"http://www.w3.org/TR/html4/strict.dtd">';
    
    echo '<body>';
    
    $error = $_SESSION['error'];
    $error_string = $error; 
    $userid;
    echo 	$error_string. '<br >
    <form method="post" action="send_mess.php?userid=' .$userid. '">reply to message # '.$mid.'<br>
    
            To:   <input type="text" name="to" size="30" value="'.$row[1].'"><br>
    <br>
    Subject:   <input type="text" name="subj" size="30" value="RE: '.$row[2].'"><br>
    <br>
    <textarea rows="10" cols="50" wrap=hard id="message" name="message">';
    echo $test;
    echo '</textarea><br>
    <br>
    <input type="submit" name"submess" value="send">     <input type="button" name="cancel" style="width:90px;" value="cancel" onClick="window.location=\'message?userid=' . $userid . '\'"><br>
    </form>';
    
    
    unset ($_SESSION['error']);
    
    echo '</body>';

  6. that works, but still the same thing cursor after the message..

     

    the problem could be something else not sure...

     

    what i am trying to accomplish is a simple message system, you can send and receive messages fine, now i have attempted to add a reply so that u can reply to a message.

     

    this reply button sends some message identification information to a php script that gets the username that sent the message. the original subject and message.

     

    all is in the correct spot on the form and i have added and re: to the subject and that works fine.

     

    in the message area is the problem.

     

    i want to be able to give some area at the top of the textarea for the new message but still show the original message below that.  and i want the focus to be on that box and be at the top......

     

    hope that makes sense.....

     

    mike.....

  7. i have tried it that way and i get the same result.

     

    the focus is on the box, but i use information from another form to be the default message for the box.

     

    the cursor is after this default text... i want it at the top of the input box and not after that....

     

    that is the only problem i have.. i  know very little about js like i said.

     

    you said to onload=setFocus() outside of html..  is this correct for that....

     

    echo '<title>' . $title . '</title>';

    echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"

    "http://www.w3.org/TR/html4/strict.dtd">';

    echo 'onload=setFocus()';

    echo '<body>';

     

    thanks mike...

  8. i have a simple message system and i use focus to set the location of the cursor to the correct box when the page loads... my problem is when i click on reply and the page loads, the focus is on the correct box,,, but that box has the original message information displayed and that is the box that i want the focus to be on,,, just it is at the bottom of the box after the original message,,,, can somebody help me get this to the top. i know very little about js ...

     

    this is what i got. also the page is php.

     

    echo '<script type="text/javascript">
    function setFocus()
    {
         document.getElementById("message").focus();
    }
    </script>';

     

    and i use this to get the original message in the box.

     

    //set message display in box.
    $test = "\n\n\n\n...............!!original message!!...............\n\n".$row[1]." wrote:\n\n".$row[3];
    

     

    and this is the box.

     

    <textarea rows="10" cols="50" wrap=hard id="message" name="message" onload=setFocus()>';
    echo $test;
    echo '</textarea><br>

     

    any help would be great...

     

    thanks mike......

  9. i have added this

     

    echo '<script type="text/javascript">
    function setFocus()
    {
         document.getElementById("message").focus();
    }
    </script>';

     

    and i added the id="message" to the textarea input.... but no luck on the focus... what am i still missing here.......

     

    thanks mike....

  10. the page is wrote in php, and this is what the page looks like.....

     

    /open connection to database server.
    $connection = mysql_connect($host, $user, $pass) or die ('unable to connect!');
    
    //select  database to use.
    mysql_select_db($db) or die ('unable to select database!');
    
    $query = "select fr_uid, fruser, sub, mess from messages where touid = '" . $userid . "' and mid = '".$mid."'";
    $result = mysql_query($query) or die ('error getting page info:' . mysql.error());
    
    $row = mysql_fetch_row($result);
    
    $message = "<br><br>".$row[1]." said// ".$row[3];
    $error = $_SESSION['error'];
    $error_string = $error; 
    $userid;
    echo 	$error_string. '<br >
    <form method="post" action="send_mess.php?userid=' .$userid. '">reply to message # '.$mid.'<br>
    
        To:   <input type="text" name="to" size="30" value="'.$row[1].'"><br>
    <br>
    Subject:   <input type="text" name="subj" size="30" value="RE: '.$row[2].'"><br>
    <br>
    <textarea type="text/html" rows="5" cols="50" wrap=hard name="message">';
    //echo $message;
    '</textarea><br>
    <br>
    <input type="submit" name"submess" value="send">     <input type="reset" value="clear"><br>
    </form>';
    
    
    unset ($_SESSION['error']);
    
    
    ?>

     

    what else could couse it to not work......

  11. would this be what you mean.....

     

    <textarea rows="5" cols="50" wrap=hard name="message" default="\n\n reply to"></textarea><br>

     

    cause that dont work...... nothing changed.

     

    also have tried....

     

    <textarea rows="5" cols="50" wrap=hard name="message">default="\n\n reply to"</textarea>

     

    and that actually displays in the box: default="\n\n reply to" ...

     

     

  12. i have created a simple messenger with php.... to enter message i have used a simple html form with some input areas and one textarea to type the message in. all that works great...

     

    problem is that i have a reply page and on that form it fills in the proper information and i would like to be able to put the original message infor in that form,

     

    problem i have is that i would like to have a couple of blank lines at the top of the textarea and then display the message data.... no matter what i try it will not work....

     

    anybody have a fix for this...

     

    thanks mike....

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.