buddylee17 216 Practically a Master Poster

Here are a few scripts available to get rid of the IE click to activate problem.
http://www.findmotive.com/2006/10/13/ie-click-to-activate-flash-fix/
http://blog.deconcept.com/swfobject/

buddylee17 216 Practically a Master Poster

No problem. The preloader is very important with large swfs. Users want to see results, even if it is just a simple bar filling up to let them know that the site will soon be loaded.

buddylee17 216 Practically a Master Poster

So you want a 50x50 image to fit inside a 25x25 cell? It sounds like you are trying to fit 48 ounces of water into a 24 ounce bottle. I'm sorry but I'm not understanding what you ask.

buddylee17 216 Practically a Master Poster

Yes, this is called a preloader. It's a movie clip that should go in at the beginning of the timeline and play until getBytesLoaded=getBytesTotal. Here's a tutorial with many downloadable examples and actionscript which should get you going in the right direction.

iamthwee commented: Yeah that's better than my suggestion +15
buddylee17 216 Practically a Master Poster

Here's a good guide to configuring Apache on XP.
http://www.pcstats.com/articleview.cfm?articleID=1868

buddylee17 216 Practically a Master Poster

This will only work locally (and may not work at all). I have only got this to work on XP-Professional. Go to Control Panel->Administrative Tools. You may have to click Switch to Classic View to find Administrative Tools. Now go into Data Sources (ODBC). Click on MS Access Database and click Configure. Enter a name for the Data Source Name. Under database, click Select. Now go find where you have the db saved.

buddylee17 216 Practically a Master Poster

What about just doing something like: <a href="delete.asp" onclick="return confirm('Are you sure you wish to continue?')">Delete</a> Or, if you need a function for several links:

<script type="text/javascript">
function confirmSubmit(){
return confirm('Are you sure you wish to continue?');
}
</script>
<a href="delete.asp" onclick="return confirmSubmit();">Delete</a>
buddylee17 216 Practically a Master Poster

You are treating specialevents as one value, when it is actually an array. What I would do would collect all values of the array and shove them into one variable:

$selectedevents='';
foreach($_POST['selectedevents'] as $val ) {
$selectedevents .= $val.", ";
}
$selectedevents=substr($selectedevents,0,-2);

Now the variable $selectedevents is ready to go into the db.

buddylee17 216 Practically a Master Poster

Welcome to DaniWeb! This forum is specifically for JavaScript, Dynamic HTML, and AJAX. Does your problem fit into this category? If not, post your problem in the HTML forum. Please be as specific as possible with your problem and post the code of the suspected problem.

buddylee17 216 Practically a Master Poster

IE is retarded. Here's what I've found regarding the scrollable tbody element.

buddylee17 216 Practically a Master Poster

how i can make a user registration window to make user registered with the site

You'll have to create a form with the fields you require included. This form will have to be submitted to a server side script(php, asp, coldfusion, jsp...). Then the script will send the form information to the database. So for now, you need to figure out
A.) what server side languages you have available.
B.) what databases you have available.
C.) what your database tables should be.

buddylee17 216 Practically a Master Poster

I think this would make things easier for both you and the server. You have to use foreach:

<?php
$abc[1]="ABC1";
$abc[2]="3435345";
$abc[3]="A012";

foreach ($abc as $val)
{
print $val . " ";
}
?>
buddylee17 216 Practically a Master Poster

It's called a textarea.

<textarea rows='5' cols='42'>
Put whatever you'd like to be inside the textarea here</textarea>

To make the box wider, increase the cols value. To make it taller, increase the rows value.

buddylee17 216 Practically a Master Poster

I would start off at google. Search for AJAX Examples. Here is a good simple example that doesn't involve a ton of code. In the example, a variable is passed to a cgi on the server using an xmlhttprequest and receives the cgi's response. If you'll notice, the url never changes and the page doesn't refresh. The tutorial is pretty explanatory but post back if you are unclear about what any of the code does and I'm sure you will get help.

buddylee17 216 Practically a Master Poster

This is the file that I have working:

<?php
if ($_POST['save'])
{
$space = $_POST['textspace'];
$myFile = "testFile.txt";
$fh = fopen($myFile, 'w') or die("can't open file");

fwrite($fh, $space);

fclose($fh);
echo "Saved";
}
if ($_POST['edit']){
$myFile = "testFile.txt";
$fh = fopen($myFile, 'r');
	if(filesize($myFile)!=0)
	{
	$textspace = fread($fh, filesize($myFile));
	}
	else
	{
	$textspace = "The file is empty";
	}
	fclose($fh);
}
if ($_POST['show'])
{
$myFile = "testFile.txt";
$fh = fopen($myFile, 'r');
if(filesize($myFile)!=0)
{
$theData = fread($fh, filesize($myFile));
}
else
{
echo "The file is empty";
}
fclose($fh);
echo $theData;
}
?> 
<form action="notesx.php" method="post">
<fieldset>
<legend>
CapĂ­tulo 01:
</legend>
<textarea id='userInput' name="textspace" value="" cols="40" rows="3" >
<?php
if(isset($_POST['edit'])){
echo $textspace;
}
?>
</textarea>
<br>
<input type="submit" name="save" value='save'/>
<input type="submit" name="edit" value='edit'/>
<input type="submit" name="show" value='show'/>

<br>
<p><b id='boldStuff2'></b> </p>

</fieldset>
</form>
buddylee17 216 Practically a Master Poster

No problem. Have you looked into putting all the variables into an array?

buddylee17 216 Practically a Master Poster

You should be placing the variable in between the textarea tags with a conditional:

<textarea id='userInput' name="textspace" value="" cols="40" rows="3" >
<?php
if(isset($_POST)){
echo $textspace;
}
?>
</textarea>

and for the edit, you've just got to read the file and assign it to a variable:

if ($_POST['edit']){
$myFile = "testFile.txt";
$fh = fopen($myFile, 'r');
	if(filesize($myFile)!=0)
	{
	$textspace = fread($fh, filesize($myFile));
	}
	else
	{
	$textspace= "The file is empty";
	}
	fclose($fh);
}
buddylee17 216 Practically a Master Poster

This should do the trick:

<?php

	$abc1="ABC1";
	$abc2="ABC2";
	$abc3="ABC3";
	
	for($i=1; $i<=3; $i++)
	{
	$abc = ${'abc' . $i};
	echo $abc." ";
	}
	
?>
buddylee17 216 Practically a Master Poster

Do you mean like:

for($i=1; $i<=3; $i++)
{
$abc="ABC";
$abc .=$i;
$abc .="  ";
echo $abc;
}

Outputs: ABC1 ABC2 ABC3

buddylee17 216 Practically a Master Poster

Alright I stand corrected. I've never even noticed that button. It's so small!

oh yes flash does understand html tags, but you have to set the text property to dynamic or input and then click a button that looks like this: <> and if you mouse over it says "Render Text as HTML".

buddylee17 216 Practically a Master Poster

No, with AJAX, JDOMP, or Flash, the url is never seen. The request is sent "behind the scenes". The user doesn't see any change in the url throughout the data exchange. Here is a simple example of how it works.

buddylee17 216 Practically a Master Poster

Save the union query. Create a new create table query that uses the union you just created.

buddylee17 216 Practically a Master Poster
buddylee17 216 Practically a Master Poster

Go into the script and add your email address to the mail functions to property.

buddylee17 216 Practically a Master Poster

Yeah, I tried using &amp; but it truncated the text. I don't believe Flash interprets html. I know the <br> tag gets displayed as plain text.

buddylee17 216 Practically a Master Poster

I believe you have to use url encoding to get Flash to read it. For example, %26 will be displayed as &. Here's the urlencode manual.

buddylee17 216 Practically a Master Poster

If it's in the query string (myscript.php?myvar=value), you use get: $var=$_GET['myvar']; You can put as many variables as needed into the query string:myscript.php?myvar=value&var2=value&var3=value...
Go to google and search for something. You'll notice many variables in the url.

buddylee17 216 Practically a Master Poster

In dreamweaver, create a new php file. Clear all of the code out of the code view. Now click toggle plain text, copy and paste all of the following into dreamweaver:

<?php
      if(isset($_POST['submit'])){
      $numfilesuploaded = $_POST['numuploads'];
      $count = 1;
 
          while ($count <= $numfilesuploaded)
          {
                  $conname = "new_file".$count;

                  $filetype = $_FILES[$conname]['type'];
                 
                  $filename = $_FILES[$conname]['name'];
                  if ($filename != '')
                  {
                    if ($filetype == "application/msword" || $filetype=="application/vnd.openxmlformats-officedocument.wordprocessingml.document")
                    {
                        $maxfilesize = $_POST['maxsize'];
                        $filesize = $_FILES[$conname]['size'];
                        if($filesize <= $maxfilesize )
                        {
                              $randomdigit = rand(0000,9999);
                             
                              $newfilename = $randomdigit.$filename;
                              $source = $_FILES[$conname]['tmp_name'];
                              $target = "files/".$newfilename;
                              move_uploaded_file($source, $target);
                              echo $count." File uploaded | ";
                      
                        
                        }
                        else
                        {
                            echo $count." File is too big! 10MB limit! |";
                        
                        }
                    }
                    else
                    {
                        echo " The file is not a supported type |";
						echo $filetype;
                    }
                  }
          $count = $count + 1;
          }
      
      }
?>
<?php
    $numuploads = 1;
    $count = 1;
?>
<form action="<?php echo $_server['php-self'];  ?>" method="post" enctype="multipart/form-data" id="something" class="uniForm">
<?php
      while ($count <= $numuploads)
      {

?>
      <input name="new_file<?php echo $count; ?>" id="new_file<?php echo $count; ?>" size="30" type="file" class="fileUpload" />
      <?php
            $count = $count + 1;
      }
?>
      <input type = "hidden" name="maxsize" value = "10240000">
       <input type = "hidden" name="numuploads" value = "<?php echo $numuploads; ?>">
      <br>
      <button name="submit" type="submit" class="submitButton">Upload Files</button>

</form>

Name the above file uploader.php
Move the file to your server. In the same directory as the uploader.php file, create a new folder and name it files. Now go into your browser and test the uploader.php file.

buddylee17 216 Practically a Master Poster

Use javascript:

<script type="text/javascript">
if (navigator.appName == "Microsoft Internet Explorer") 
{
document.write('If you are using an outdated version of internet explorer your browser may not show the images correctly. In order to prevent this please download the latest version of Microsoft Internet Explorer:<a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=9AE91EBE-3385-447C-8A30-081805B2F90B&displaylang=en"><font size="2">  Click Here for the latest release</font></a>');
}
</script>
buddylee17 216 Practically a Master Poster

So are you saying that you already have an upload script but dont know how to implement?

buddylee17 216 Practically a Master Poster

You could do this a number of ways. The easiest, in my opinion would be Flash.
However, if Flash isn't an option, JDOMP or AJAX will do it. Both of these will require some understanding of JavaScript and the DOM. In all three however, the same basic steps occur. Variables are sent to the php script and the output of the php script is sent back as a response. The url never changes.

buddylee17 216 Practically a Master Poster

Tack the course name onto the query string:

<a onclick="window.open('popup.php?course=Excel 2003 Level 1','', 'width=210, height=600, location=no, menubar=no, status=no,toolbar=no, scrollbars=no, resizable=no'); return false" href="">Excel 2003 Level 1</a>
<a onclick="window.open('popup.php?course=Excel 2003 Level 2','', 'width=210, height=600, location=no, menubar=no, status=no,toolbar=no, scrollbars=no, resizable=no'); return false" href="">Excel 2003 Level 2</a>

Then use php in the form:

<?php 
$course=$_GET['course'];
?>
<form action="req_out.php" method="post" name="form1" class="course_header style1 style2">
          Request  course outline          
        </form>        </td>
      </tr>
      <tr>
        <td width="12%" bgcolor="#04508E" class="content style1">Email Address :</td>
        <td width="17%" bgcolor="#04508E"><input name="email" type="text" class="content" id="email"></td>
        <td width="10%" bgcolor="#04508E"><span class="content style1">Company :</span></td>
        <td width="17%" bgcolor="#04508E"><input name="company" type="text" class="content" id="company"></td>
        <td width="7%" bgcolor="#04508E"><span class="content style1">Course :</span></td>

 <td width="17%" bgcolor="#04508E"><input name="course" type="text" class="content" value="<?php echo $course;?>"></td>
buddylee17 216 Practically a Master Poster

Do a conditional on which drop down to present.

<?php
if($person=="teacher"){?>
<select name="teacher">
<option value="option1t">option1</option>
<option value="option2t">option2</option>
<?php }else{?>
<select name="student">
<option value="option1s">option1</option>
<option value="option2s">option2</option>
<?php }?>
</select>
buddylee17 216 Practically a Master Poster

It looks like you may not have published the swf prior to putting it on the web. The reason I say this is because the file has no content. Go to the swf that you have on your local machine and open it up. Does it work correctly? If not, open the fla in Flash and hit Shift+F12. This will insure that the swf is up to date. Now copy this file to the server and check it again.

buddylee17 216 Practically a Master Poster

I guess that depends on your security needs. DaniWeb stores (encrypted) password in cookie. I hardly ever login here because authentication is done with cookies. However, I wouldn't want my bank or email account to be authenticated with a cookie.

buddylee17 216 Practically a Master Poster

Replace this: <a href="index.html"><IMG SRC="images/arrow_prev.gif" BORDER=0></a> with this: <a href="javascript:history.back()"><img src="images/arrow_prev.gif" border="0"></a>

buddylee17 216 Practically a Master Poster

You are right about the onclick function. The onclick function is a JavaScript event handler so you'll need to incorporate JavaScript (else you'll have to have a page refresh after each button is clicked). Here is a link to a memory game tutorial written in JavaScript and PHP. I believe this is similar to what you are asking.

martin5211 commented: nice example +1
buddylee17 216 Practically a Master Poster

You could try checking the referring page before incrementing the Session counter. Obviously you'll have to change the url to the one you are looking for:

if($answer1==$res["ans"] && $_SERVER['HTTP_REFERER']=="http://localhost/ques2.php")
{
$_SESSION['ans']++;
}
buddylee17 216 Practically a Master Poster

Yes it will. Generally a cookie lasts until:
a.)It is manually deleted or modified by the user.
b.)It expires.
Also, Cookies need to be set in the header. This means they must be sent before any HTML is set to the page, or they will not work.

buddylee17 216 Practically a Master Poster

This will set a cookie named user which will expire in one hour:

<?php
if (isset($_COOKIE["user"])){
  $message= "Ouuu you already have one account!";
  }
  else{
  setcookie("user", "Current User", time()+3600);
  $message="Welcome new user";
  }
?>
<html>
<head>
</head>
<body>
<?php
echo $message;
?>
</body>
</html>
buddylee17 216 Practically a Master Poster

Sounds like the link on the back button is wrong. Post some code or a link to the page.

buddylee17 216 Practically a Master Poster

I would go with PHP and MySQL, however it's all up to you. PHP and Access will work fine as long as the site doesn't receive a lot of traffic.

buddylee17 216 Practically a Master Poster

index1.php has to be inside the htdocs folder.

buddylee17 216 Practically a Master Poster

I believe this should work. Lets say that you have 2 animations that take 2 frames each(4 frames total):

var randomNumber = Math.floor(Math.random()*4)

if (randomNumber == 0){
gotoAndPlay(1);
}
if (randomNumber == 1){
gotoAndPlay(1);
}
if (randomNumber == 2){
gotoAndPlay(3);
}
if (randomNumber == 3){
gotoAndPlay(3);
}
buddylee17 216 Practically a Master Poster

It sounds like you need an onchange event to trigger an AJAX function. Basically, when an option from the drop down menu is selected, the appropriate elements of the form will change. Is this correct?

buddylee17 216 Practically a Master Poster

What do you need to do? I'm sorry, but the question seems a bit vague.

buddylee17 216 Practically a Master Poster

Images are very tricky for new designers. You have to understand that the html file contains a pointer ( <img src="images/image1.jpg" /> ) to the image. The src attribute value is the pointer that tells the browser exactly where the image to download is. In this case, the image, image1.jpg, is inside of the images folder which is a subfolder of the current directory folder. You'll have to make sure that the folder hierarchy is word for word. If things don't match up exactly, you get the little red x instead of the image.

buddylee17 216 Practically a Master Poster

Don't do this. You are going to get hammered with spam. At least use javascript to mask your email address. You need some type of form processor on the server to validate and sanitize the mail. Your time will be much better spent figuring out whats wrong with the CGI or searching for other mail forms on the web, such as this one for php.

buddylee17 216 Practically a Master Poster

So, let me get this straight. You want one dynamic form which changes based on what the user selects. Is this correct?

buddylee17 216 Practically a Master Poster

Well, you could have the user come to a common page where they select teacher or student. That page could then direct the user to the appropriate form.

A common conceptual error is the idea that php can interact with the browser after the page has been loaded. PHP alone cannot change anything on the users screen after the page is loaded. It takes javascript to modify the users screen after a page loads. Remember, php runs on the server. JavaScript runs on the browser. They can however interact through a xmlhttprequest (AJAX).