casper_wang 1 Junior Poster in Training

102 views and not one person has a solution to this?

ready_state does NOT work because the page I am waiting on is loading multiple frames (hence firing document complete multiple times)

The new code snip I found DOES work (in that it pops up the message at the end of each frame, when main frame is loaded, and about 3 more times for advertising frames).

after the "submit" button for the account info is pressed I want the page to wait until the log in has completed (meaning it redirects to another page and fully loads) before continuing with next line of code.

I am disappointed, when I joined this web site the PHP and html sections were jumping and everyone was out to help each other.

I am sensing (with 102 views to this page) there are a lot of leechers out there just looking for free code.
24 hours I expected some sort of response. This is very disappointing.

Do I need to remove this site from my bookmarks as I have other sites that are no longer "supportive"

casper_wang 1 Junior Poster in Training

Found this to be a cleaner bit:

procedure TForm1.WebBrowser1DocumentComplete(Sender: TObject;
  const pDisp: IDispatch; var URL: OLEvariant);
  var
    CurWebrowser : IWebBrowser;
    TopWebBrowser: IWebBrowser;
    Document     : OLEvariant;
    WindowName   : string;
      begin { TForm1.WebBrowser1DocumentComplete }
        CurWebrowser := pDisp as IWebBrowser;
        TopWebBrowser := (Sender as TWebBrowser).DefaultInterface;
          if CurWebrowser=TopWebBrowser then
            begin
              ShowMessage('Document is complete.')
            end
          else
            begin
              Document := CurWebrowser.Document;
              WindowName := Document.ParentWindow.Name;
              ShowMessage('Frame ' + WindowName + ' is loaded.')
            end;
      end;

However I still haven't found how to recall the instance and it work...
I may just be overly tired as it is 12am no.

casper_wang 1 Junior Poster in Training

Greetings fellow coders, I have read many tutorials, and tried many different code snippets but I have hit a brick wall and decided its time to give my brain a rest and see if other coders can find a solution.
with the push of a button I will log into a web site, do some tasks, then log out.

I got the log in no problem, however my wall is going to the next link...

The page is NOT waiting to load before continuing.

As the code is NOW it logs in and before logging i even completes it goes to the next link so log in actually fails.

unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, ToolWin, ComCtrls, Menus, ActnMan, ActnCtrls, ActnMenus,
  TabNotBk, jpeg, ExtCtrls, OleCtrls, SHDocVw, StdCtrls, PNGButton, mshtml,
  Buttons, inifiles;

type
  TForm1 = class(TForm)
    MainMenu1: TMainMenu;
    Options1: TMenuItem;
    opt_switch: TMenuItem;
    opt_exit: TMenuItem;
    Help1: TMenuItem;
    hlp_about: TMenuItem;
    Panel1: TPanel;
    Image2: TImage;
    Panel2: TPanel;
    PageControl1: TPageControl;
    TabSheet1: TTabSheet;
    Panel3: TPanel;
    WebBrowser1: TWebBrowser;
    CoolBar1: TCoolBar;
    Animate1: TAnimate;
    ToolBar1: TToolBar;
    png_btn_home: TPNGButton;
    png_btn_back: TPNGButton;
    png_btn_forward: TPNGButton;
    png_btn_stop: TPNGButton;
    png_btn_refresh: TPNGButton;
    URLs: TEdit;
    StaticText1: TStaticText;
    StaticText2: TStaticText;
    StaticText3: TStaticText;
    StaticText4: TStaticText;
    StaticText5: TStaticText;
    Button1: TButton;
    cur_user: TEdit;
    Button2: TButton;
    TabSheet2: TTabSheet;
    updates: TMemo;
    Button3: TButton;
    StaticText6: TStaticText;
    procedure png_btn_homeClick(Sender: TObject);
    procedure png_btn_backClick(Sender: TObject);
    procedure png_btn_forwardClick(Sender: TObject);
    procedure png_btn_stopClick(Sender: TObject);
    procedure png_btn_refreshClick(Sender: TObject);
    procedure WebBrowser1CommandStateChange(Sender: TObject;
      Command: Integer; Enable: WordBool);
    procedure FormCreate(Sender: TObject);
    procedure FindAddress;
    procedure WebBrowser1BeforeNavigate2(Sender: TObject;
      const pDisp: IDispatch; var URL, Flags, …
casper_wang 1 Junior Poster in Training

I would like to see a law passed that forces any judge or lawyer that participates in any type of computer related complaint be certified in computer terminology, computer usage, and computer technology to include how the internet works and force them to understand that if a company is so afraid of their "intellectual property" that they should never post it on the web.
Why? because every page you visit, every word you read, every song you listen to, every video you watch is automatically downloaded to your cache in order for you to view it.
You don't want me to have this? GET IT OFF THE NET.
Freedom of the internet: the way it started, the way it was intended, the way it should be FREE.

casper_wang 1 Junior Poster in Training

yep he is correct. try this code, must have been very tired last night when I played with this.

home.php

<?php
require ('config.php');

// session_start();
$user->session_begin();

if(isset( $_GET['userid'] ))
{
$userid = $_GET['userid'];

mysql_select_db($db1) or die ("Unable to select database!");
		$sql = 'SELECT * 
			FROM ' . registrations . "
			WHERE userid = '$userid'";
			$result = $db->sql_query($sql);
				while ($row = $db->sql_fetchrow($result))	
						{
$displayname = $row['displayname'];
$db->sql_freeresult($result);

$_SESSION['getdisplayname'] = $displayname;

require ('outlineget.php'); 

mysql_select_db($db2) or die ("Unable to select database!");

echo '
<html>
<head>
<title>profile</title>
<style type="text/css">
// style code...
</style>
</head>';

		$sql = 'SELECT * 
			FROM ' . usersprofile . "
			WHERE displayname = '$displayname'";
			$result = $db->sql_query($sql);
				while ($row = $db->sql_fetchrow($result))	
						{
$profnamedb = $row['profname'];
$db->sql_freeresult($result);

echo '
<table id=content  border="0" cellspacing="2" cellpadding="2" >';
 echo '<tr ><td align="center"> 
                <span ><font size=4 >'.$row['displayname'].'\'s'.
'<font size=3>&nbsp&nbsp&nbsp Profile</font></span>
	     </td></tr> <br/>';
     
//....table data is displayed ...no problem here

if ($educationdb != NULL)
echo '<tr><td><font face="arial">
<div class="signupFormLftcol">Education: </div>
<div class="signupFormRgtcol" >'.$educationdb.'</div></td></tr>';

echo '</table>';
}
?>

outlineget.php

<?php
require ('config.php');

mysql_select_db('db1') or die (mysql_error());
	$sql = ' SELECT profilepic 
		FROM ' . registrations ."
		WHERE displayname = '$displayname'";
		$result = $db->sql_query($sql);
		while ($row = $db->sql_fetchrow($result))
			{
$profpic = $row['profilepic'];
$_SESSION['profpic'] = $profpic;

echo '
<html>
<head>
       
<style type="text/css">

 // ...style code...

</style>
</head>

<body>

<table width="99%" border="2" cellpadding="3" cellspacing="0" BGCOLOR=A9A9A9>
<tr><td><font face="Arial" font size="2" align="center"><img src="pic1.gif"></td>
</tr>
<tr><td align="right"><font face="Arial" font size="2"><a href="home.php" class="uline">Home</a>&nbsp|&nbsp<a href="logout.php">Log out</a></td></tr>
</table>

<table width=95%>
<tr><td >
<table  width="200" border="1" cellpadding="1" cellspacing="0">
		<tr><td height="25" align="center"  BGCOLOR="A9A9A9"><font face="arial" font size="4">'.$displayname.'</td></tr>
// …
casper_wang 1 Junior Poster in Training

Try this:


home.php

<?php
require ('config.php');

// session_start();
$user->session_begin();

if(isset( $_GET['userid'] ))
{
require_once('outlineget.php'); 
// calling another program which also has database connections. This is the one that is //executing after  a REFRESH and which do not execute before using a REFRESH
$userid = $_GET['userid'];
// $conn=mysql_connect( ) or die ('I cannot connect to the database because: ' . mysql_error());

mysql_select_db($db1) or die ("Unable to select database!");

		$sql = 'SELECT * 
			FROM ' . registrations . "
			WHERE userid = '$userid'";
			$result = $db->sql_query($sql);
				while ($row = $db->sql_fetchrow($result))	
						{

$displayname = $row['displayname'];
$db->sql_freeresult($result);

$_SESSION['getdisplayname'] = $displayname;

mysql_select_db($db2) or die ("Unable to select database!");

echo '
<html>
<head>
<title>profile</title>
<style type="text/css">
// style code...
</style>
</head>';

		$sql = 'SELECT * 
			FROM ' . usersprofile . "
			WHERE displayname = '$displayname'";
			$result = $db->sql_query($sql);
				while ($row = $db->sql_fetchrow($result))	
						{
$profnamedb = $row['profname'];
$db->sql_freeresult($result);

echo '
<table id=content  border="0" cellspacing="2" cellpadding="2" >';
 echo '<tr ><td align="center"> 
                <span ><font size=4 >'.$row['displayname'].'\'s'.
'<font size=3>&nbsp&nbsp&nbsp Profile</font></span>
	     </td></tr> <br/>';
     
//....table data is displayed ...no problem here

if ($educationdb != NULL)
echo '<tr><td><font face="arial">
<div class="signupFormLftcol">Education: </div>
<div class="signupFormRgtcol" >'.$educationdb.'</div></td></tr>';

echo '</table>';
}
?>

outlineget.php

<?php
require ('config.php');

// $conn=mysql_connect(".....") or die ('I cannot connect to the database because: ' . mysql_error());
mysql_select_db('db1') or die (mysql_error());

$displayname = $_SESSION['getdisplayname'];
	$sql = ' SELECT profilepic 
		FROM ' . registrations ."
		WHERE displayname = '$displayname'";
		$result = $db->sql_query($sql);
		while ($row = $db->sql_fetchrow($result))
			{
$profpic = $row['profilepic'];
$_SESSION['profpic'] = $profpic;

echo '
<html>
<head>
       
<style type="text/css">

 // ...style …
casper_wang 1 Junior Poster in Training

Great, I'm glad you got a work around for the time being. If you need any other assistance don't hesitate to ask.

casper_wang 1 Junior Poster in Training

swatisinha.339, go post your advertising elsewhere please. I have reported all 18 of your posts to the mods and hope for an admin to delete your posts and ban your IP so you can not create another account here again.

casper_wang 1 Junior Poster in Training

one of his requirments was "free"

casper_wang 1 Junior Poster in Training

nice Shanti, works on my test server no problems.

make sure to create the new files sugested in the code above:
connection.php
success.php

also dont forget to create a folder on your server: productimages and productimages/small

depending on where your folder is you may need to edit this line:

$prsimage="../productimages/small/".$prsimage;

as well as:

$prlimage="../productimages/".$prlimage;

Shanti very nice job, simplistic and best of all it is workable however when helping someone it is best to use
*/ footnotes /* to explain what you are doing so the coder can get a good understanding of the code, particularly if the coder is beginner or novice.
other than that nice job shanti and the op should be able to solve his issue with what you gave him.

casper_wang 1 Junior Poster in Training

Thank you for that.. post your code as well give me a link to your site so I can see what it is doing as well.

Thank you

casper_wang 1 Junior Poster in Training

Swefil:
Give this a try and let us know if it works for you:

http://www.smartform.com/

casper_wang 1 Junior Poster in Training

thank you makemoneyonline

hmmm I like that name, make money... $$$ cha qing

casper_wang 1 Junior Poster in Training

Not true. Just wrap that word in a span, give it a class, and give that class a margin in your css.

He didnt want to go through the css for a simple few spaces, and the html code for space would be the simplest.


Hope you got it working e_vel.

If you are happy with it please mark this as solved.

casper_wang 1 Junior Poster in Training

yes, please post the code so I and others may look for a problem in the code itself.

casper_wang 1 Junior Poster in Training

no, he wants the page to reload with all the form fields filled in with the info that was entered only highlighting incorrect or missing fields.

when you fill out an application you fill in several form fields if one field is missing or incorect it will reload with an error.
He wants the reload to re-populate the fields the user had entered that was correct.

follows the line of sessions.

casper_wang 1 Junior Poster in Training

why not just use java to scroll it for you?
use a marque type script

casper_wang 1 Junior Poster in Training

you will have to if you only want the one word seperated from the rest...

casper_wang 1 Junior Poster in Training

sorry that link was for another post.
you need to look here:
http://www.evolt.org/article/Clever_forms_with_PHP/17/60143/index.html

casper_wang 1 Junior Poster in Training

what do you mean taramichael?
The examples I gae above is very clear.

in order t set font size, width, and space you will need to use css, if you just want to space them a vew spaces then use

&nbsp;

if you want them seperated and centered use a table.

casper_wang 1 Junior Poster in Training
casper_wang 1 Junior Poster in Training

if there are errors it should not insert into the DB so it will repopulate using what is in the DB.
are you asking how to repopulate the form with their selections only highlighting the section that caused the error?

try looking at this great example:
http://www.guidesandtutorials.com/dreamweaver_8_tutorial_insert_toolbar.html

casper_wang 1 Junior Poster in Training
casper_wang 1 Junior Poster in Training

if you want your site to be seamless try using css to set your tables rather than use frames.
Frames are a thing of the past and most people today dont like them because most new web developers dont know how to render it properly to allow the user to break out of the frame.

casper_wang 1 Junior Poster in Training

when starting out a new project I always tell my students the best place to start is on paper.
write out what you want the out put to look like then do the html tid bits to get the page to look the way you want it to.
Once that is complete then you begin with the php code aspect:
connection is the first thig you will need
tables created is the next
once you have the DB set up and ready to accept inserts,updates, etc then you begin your querries.
get that far and post your question again.

casper_wang 1 Junior Poster in Training

you should create a db_connect.php and use require
it keeps your code clean and less garbled.

Also location does not need to be full adress, it can represent location local to page.

'location: http://www.kambuja-designs.com/uploa...ortitle=Upload

to

'location: /uploa...ortitle=Upload

if in same folder, add ../ if in folder outside this folder etc etc.

casper_wang 1 Junior Poster in Training

you will add to your css attributes, this is an example:

#menuList {
	position:relative; 
	font-size: 1.3em; /* ALL font size */
	margin: 0px; /* gap between page top AND main menu to sub menu */
	padding: 0px; /* sets the space above and below main menu text (border) */;
/*	z-index:100; */
}

another example:

/*  Text
 ------------ */
h1 {
	color: black;
	font-family: "Lucida Grande", "Trebuchet MS", Verdana, sans-serif;
	font-weight: bold;
	font-size: 1.8em;
          margin: 5px; 
	text-decoration: none;
}
casper_wang 1 Junior Poster in Training

yahoo, msn, and others use css for the page layout.

casper_wang 1 Junior Poster in Training

give Notepad Lite a try. it highlights errors in both php and html code

http://www.notetab.com/ntl.php

casper_wang 1 Junior Poster in Training

try to use require once rather than require.
are they each connectiong to a different Db?
and yes as a security flaw you should close the connection when you are finished.

Kavitha Butchi commented: thankyou but still the problem persists +1
casper_wang 1 Junior Poster in Training

1: support question needs to go in the proper area to get the most out of this site
2: no one here will do it for you, we are here to help you figure it out
3:google search "css" print margins

casper_wang 1 Junior Poster in Training

you will need to change the print form to look like your paper to be printed on, then the code will need to resemble the $print properties for each line to be printed.

Do a google search for php and pdf print styles

casper_wang 1 Junior Poster in Training

please make use of [ co de ][ /co de ] when posting code snips.. makes it easier on the eyes for reading and finding problems.

I will share some of my own code but you need to try and figure it on your own:

The upload form: 
<form enctype="multipart/form-data" action="upload.php" method="post" name="upload_file"> 
<input type="hidden" name="MAX_FILE_SIZE" value="5000000"> 
<input name="userfile" type="file"> 
<input type="submit" value="upload" name="file_uploaded"> 
</form> 

upload.php: 
<?php 
// file upload - in php 4.1.0 or later, $_FILES should be used instead of $HTTP_POST_FILES. 

if (is_uploaded_file($_FILES['userfile']['tmp_name'])) 
{ 
//upload 
$file_realname = $_FILES['userfile']['name']; 

//PUT in FILDER 
copy($_FILES['userfile']['tmp_name'], "path/to/folder/goes/here/$file_realname"); 
} 
else 
{ 
echo "<b><font color=red>No file uploaded.</font></b><BR>No file available or file too big to upload."; 
} 
?> 

$file_realname can be saved in database.
casper_wang 1 Junior Poster in Training

Glad I could help, glad your machine is back in working order (buying a new one is never fun or cheap)

casper_wang 1 Junior Poster in Training

One Long and Two Short Beeps Video (Mono/CGA Display Circuitry) issue.

have your video card tested. make sure it is seated properly. video card shorts are one of the most common issues with computer boots.
another thing you could try:
unplug the pc, and hit the power button (this will release any excess power stored in the cpu)
plug back in and start.
as soon as you get back on you need to get the remainder of the updates.
when I first did my install I had issues of not booting and booting etc etc.. but after I got all security updates now its no issue -until I did SP3-

casper_wang 1 Junior Poster in Training

I will do what I can for everyone.
There is this great growing fad that the great geeks of the world are following however so many of those who need help seem to always fail to find.
Its called GOOGLE :) I can help anyone, Ive GOT THE POWER muuwah ha ha ha

casper_wang 1 Junior Poster in Training

friend says may be hard drive?

computers will boot through POST without a HDD. a failing HDD will rarely cause POST error beeps

casper_wang 1 Junior Poster in Training

8 step process to computer repair.

1: make sure pc is plugged in tightly and directly to a wall outlet (extensions are often not properly grounded)
2:look inside the box and make sure no loose wires, cables, screws are touching the MB
3: look at the ends of each of the connectors from the power suply and make sure they are not touching loose metal and the ones plugged in are tight
4: make sure all cards are seated properly and tight.
5: remove the memory and test it in a secondary machine
6: remove the video card and test it in a second machine (video card short outs are the most common)
7:do the same with the sound card and each card that is in a slot.
8: take the whole machine to a certified shop for full inspection and repair job.

chances are it will end up being either a short from the power supply or the video card.
What was the last thing the computer was doing before it shut down/

casper_wang 1 Junior Poster in Training

Hi Casper:
Welcome!
Lots to learn!

Thank you selhelpbooks
always a fan of learning

casper_wang 1 Junior Poster in Training

count the beeps for us.

1 Short Beep Normal POST, computer is ok.
2 Short Beep POST error, review screen for error code.

Continuous Beep No Power, Loose Card, or Short.
Repeating Short Beep No Power, Loose Card, or Short.

my assumption here is you shorted somehow, check and make sure the box is properly grounded and that there are no metal loose items inside the box touching the mothorboard and that the MB is not touching the case.

One Long and one Short Beep Motherboard issue.
One Long and Two Short Beeps Video (Mono/CGA Display Circuitry) issue.
One Long and Three Short Beeps. Video (EGA) Display Circuitry.
Three Long Beeps Keyboard / Keyboard card error. One Beep, Blank or Incorrect Display Video Display Circuitry.

casper_wang 1 Junior Poster in Training

long beeps, short beeps or one continuous beep?

long beep: short somwhere
short beeps: memory
continuous beep: video card

casper_wang 1 Junior Poster in Training

was the update you did service pack 3?
if yes you need to unplug all usb ports, disconnect any secondary hdd and reboot with ONLY the primary HDD running.

this is a known issue for SP3 and a fix should be in the next update.

how to fix this? uninstall sp3 is one way, get the remainder of the updates is a much simpler way.
but unplugging all accessories not required for boot seemed to solve the issue for me.

as for the beeps you heard that is a memory error (long continuous beeps are video)
possible need to flush the memory:
unplug system for 30 seconds plug back in reset bios to default reboot.
restart and change bios to your normal settings reboot again.
re connect accesories should be problem solved.
I have a work around to uninstall sp3 using windows CD if this dont solve your issue

casper_wang 1 Junior Poster in Training

Try this
To uninstall Flash, please follow Adobe’s instructions, listed here: http://www.adobe.com/cfusion/knowledgeba...

Once you're done, restart your computer and follow Adobe’s instructions for reinstalling Flash: http://www.adobe.com/shockwave/download/...

casper_wang 1 Junior Poster in Training

Still is not working on IE

is only showing a broken image

I see it just fine. maybe update your flash version.
I see your flash banner for Gaming Tables. starts as a G then moves into the name.. nice professional banner.

casper_wang 1 Junior Poster in Training

excelent job. very well done

casper_wang 1 Junior Poster in Training

very good now center it by adding the tags <center> before

<script type="text/javascript" src="swfobject.js"></script>

and
</center> after

shockwave-flash"  wmode="transparent" width="900" height="100"></embed>
</object>
casper_wang 1 Junior Poster in Training

your code is missing the java script snips.
it needs to be in the file it will run in.. meaning it dont need to be in the php file but it does need to be in the html file

casper_wang 1 Junior Poster in Training

1: download swfobject.js add it to same folder as conintro.html

<script type="text/javascript" src="swfobject.js"></script>
<div id="flashcontent">
  <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"  codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0"
   width="900" height="100" id="Untitled-1" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="flash.swf?skipintro=0" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<embed src="flash.swf?skipintro=0" quality="high" bgcolor="#ffffff" width="900"
   height="100" name="mymovie" align="middle" allowScriptAccess="sameDomain"
   type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" />
</object></div>
<script type="text/javascript">
   var so = new SWFObject("flash.swf", "mymovie", "900", "100", "8", "#336699");
   so.write("flashcontent");
</script>

try this as your conintro.html

casper_wang 1 Junior Poster in Training

I just checked, it is there and updated recently.

casper_wang 1 Junior Poster in Training

on a side note. edit your .htaccess to include this:
DirectoryIndex index.php index.html

this will allow users to go to your page without typing index.php