hielo 65 Veteran Poster

do I need to replace total with
this?

On your original post, you posted one Javascript code and two php code block. On your SECOND php code block replace line 2 with what I posted earlier. That line of code is basically removing anything that is neither a number nor a period.

Also, feedback such as "it still doesn't work" is not helpful. Have you verified that it is even attempting to execute the query?

Does it execute the die() statement? If so, try changing the die() statement to: ... or die('Error querying database: ' . mysqli_error($dbc) ); so you can get a description of the error.

hielo 65 Veteran Poster

line 5 of the javascript block is NOT the same as what you actually have on your live page. This is what you actually have: document.getElementById("amt1").value = "$" + total.toFixed(2); This means that on your php page, your $total variable should have a STRING that begins with a dollar symbol. If your DB field (price) is expecting a decimal, then get rid of the leading dollar sign symbol: $total = preg_replace('#[^0-9\.]#','',$_POST['amt1']);

hielo 65 Veteran Poster

but for whatever reason the code still does not upload the given file when i click submit ticket.

Are you sure it is uploading to the right file? Upon closer inspection you have $TicketsHTML.='...<form action="<?PHP_SELF?>"...' It should be: $TicketsHTML.='...<form action="' . $_SERVER['PHP_SELF'] . '"...' On another note, on line 16 of your original post, you are setting $result to 'OK', BUT you do not know for a fact that the file was actually moved. You must check the return value of move_uploaded_file(). $result = move_uploaded_file(...) ? 'OK':'Error'; Lastly, also be sure the destination folder has write permissions.

hielo 65 Veteran Poster

On your php you have: if (isset($_POST['fileframe'])) but on your html you have <input type="hidden" name="filename" value="true"> so change the name of the hidden field to name="fileframe"

hielo 65 Veteran Poster

I did read the manual and could not find what you have said above

Well, it's not stated in "plain english" as I stated above, but if you know how to read/interpret what's on the manual then you would make sense of it.

If you go to http://us3.php.net/manual/en/function.stripslashes.php you will see that the description is: string stripslashes ( string $str ) The left-most "string" indicates that the function returns a string value
The "string" within the parentheses states that what you pass to it should be a string

By contrast if you read he manual for implode (http://us3.php.net/manual/en/function.implode.php)

then you can see that it returns a string and the arguments can be either:
a string AND an array
OR
just a an array

hielo 65 Veteran Poster

...stripslashes($_POST); did you even bother to read the manual?
a. stripslashes expects a string NOT an array. $_POST is an array
b. it does NOT expect a reference. In other words, I had the following string in a variable $name="O\'malley"; then simply calling stripslashes($name); would not change the value of $name. You have to "receive" the value returned by stripslashes() and reassign it to $name: $name=stripslashes($name); On another note, what you are trying to do is already given at:
http://www.php.net/manual/en/function.get-magic-quotes-gpc.php#82524

hielo 65 Veteran Poster

But I don't have a fixed value, instate of that I have a variable, and I would like to pass that as a value.

Of course you don't. I did not post PHP. I posted a sample html code/result of what YOUR PHP code should generate. In other words, after your page loads up, that is what you should see if you look at your browser's source code. I was expecting you to realize that:
a. each row of

<tr>...</tr>is generated from within a while construct - that is when you are iterating over the records of your db query result

b. Instead of
... value="3"... you would actually need to put the variable you are using for extracting the relevant value from your db query.

...
$result=mysql_query("SELECT id, email FROM Person") or die( mysql_error() );
if( mysql_num_rows($result) ==0 )
{
  echo 'No Records found';
}
else
{
 echo '<table>';
  while( $row = mysql_fetch_assoc($result))
  {
    echo sprintf('<tr><td>%s</td><td><form method="post" action="yourEditPage.php"><input type="hidden" name="pid" value="%s"/><input type="submit" name="editRow" value="Edit"/></form></td></tr>', $row['email'], $row['id']);
  }
 echo '</table>';
}
hielo 65 Veteran Poster

Now I would like to show the details of a particular record, by clicking on a row, and the details will be shown in a new page

Assuming that each record has a unique id, all you need to do is:
for every row add a table cell that includes a <form> . It should include a hidden field with the product id for the row in question, it should "point" to the page where you will get the product details, and it should have its own Edit button.

Ultimately, your table should be similar to the following (where pid is the product id for the row in question):

<tr><td>row 1 cell 1</td><td>row 1 cell 2</td><td>...</td><td><form method="post" action="yourEditPage.php"><input type="hidden" name="pid" value="3"/><input type="submit" name="editRow" value="Edit"/></form></td></tr>
<tr><td>row 2 cell 1</td><td>row 2 cell 2</td><td>...</td><td><form method="post" action="yourEditPage.php"><input type="hidden" name="pid" value="31"/><input type="submit" name="editRow" value="Edit"/></form></td></tr>
hielo 65 Veteran Poster

you have:
12 items in imgs1
11 items in lnks1
11 items in alt1

Make them all the same number of items.

hielo 65 Veteran Poster

You are welcome!

hielo 65 Veteran Poster

...I want to take a string from database and load it into xml dom object but i can't.

You need to verify that your string is actually a valid xml string. Look at the example on the url I provided earlier. Notice that the variable XMLString has a "complete" xml string. You need to do the same. Most likely you are trying to initialize it with an invalid xml string.

hielo 65 Veteran Poster

document is an object that exists (is defined) when you are running your javascript from a BROWSER window.

I opened the JavaScript with 'Microsoft Windows Based Script Host'

There you have it - you are NOT using a browser. instead of document.write try Wscript.Echo

hielo 65 Veteran Poster

xmlDoc.load is used to load an exisisting XML file. Since you want to load it from a scring, you need to use xmlDow.loadXML instead.

Refer to:
http://www.devguru.com/technologies/xmldom/quickref/document_loadxml.html

hielo 65 Veteran Poster

To answer your question, first obtain a reference to your table. If you have your table an id: <table id='MyTable'>...</table> then use var t = document.getElementById('MyTable') to obtain a reference to the table. Since 't' now holds a reference to the table, then assuming you are interested in the x+1th CELL (where X is 0) of row 0 then alert(t.rows[0].cells[1].innerHTML) should show you the html in that cell.

On another note, based on your description, it sounds like you want/need an inline editor. I suggest you look at either of these:
http://www.appelsiini.net/projects/jeditable (the demo is at http://www.appelsiini.net/projects/jeditable/default.html)

http://code.google.com/p/jquery-in-place-editor/ (the demo is at http://jquery-in-place-editor.googlecode.com/svn/trunk/demo/index.html)

hielo 65 Veteran Poster
I don't understand what you mean.

On line 1 of your original post you have: if(!empty($_POST['nbs_zip2']) and then on line 23 you have: elseif(!empty($_POST['nbs_contact_year2']) && !empty($_POST['nbs_zip2'])) What I was saying is that when BOTH nbs_zip2 AND nbs_contact_year2 are filled, line 23 will not execute because the condition on line 1 is true! You need to give priority to the condition on line 23. In other words, line 23 should be THE if clause, NOT an elseif clause.

hielo 65 Veteran Poster

It's now counting and working and the list is below

Based on that result, I suspect you opted to apply the fix on my first post. Try my second post. It's a complete re-write of your code. It should do what you are after.

hielo 65 Veteran Poster

Then copy all the existing files from an existing folder (FOLDER B) into FOLDER A

Refer to the "copy" function in PHP. Particularly, refer to the second user comment on its manual page:
http://us3.php.net/manual/en/function.copy.php#91256

hielo 65 Veteran Poster

You are welcome! Be sure to mark the question as solved.

Regards,
Hielo

hielo 65 Veteran Poster

But I can't get the query to work when I enter in both zipcode1 and 2 and year1 and 2 (second elseif).

When that condition is true, then the "if" and the first "elseif" are also true. Since they appear before elseif(!empty($_POST['nbs_contact_year2']) && !empty($_POST['nbs_zip2'])), they will execute first. You must move it up so that it appears first (it should be you initial "if" cluase).

hielo 65 Veteran Poster

Assuming your image is located at http://www.yoursite.com/Images/buyNow.gif, then try:

echo sprintf( '<a href="%s"><img src="%s"/></a>', $row['ProductUrl'], '/Images/buyNow.gif' );
	echo "</td></tr>";
hielo 65 Veteran Poster

try:

<?php
include("includes/db_connect.php");
$result = mysql_query("SELECT `refferer`, COUNT(refferer) as `total` FROM refferals GROUP BY `refferer`") or die(sprintf('Line: %s <br>$s',__LINE__.mysql_error()));
while($row = mysql_fetch_assoc($result)) {
    echo sprintf('%s | %s', $row['refferer'], $row['total'] );
}
?>
hielo 65 Veteran Poster

On line 7, you forgot to execute the query. You need to use mysql_query():

...
 $selectcount = mysql_query("SELECT * FROM refferals WHERE refferer = '$current'") or die( mysql_error() );
...
hielo 65 Veteran Poster

Wow, I did not see it that way. I ended up hardcoding all that.

Sorry, I thought it was clear from my previous post when I said to use either the jquery approach or the DOM node reference approach. Glad to help.

PS: Be sure to mark the question as solved.

Regards,
Hielo

hielo 65 Veteran Poster

try:

<?php
$connection = mysql_connect($host,$user,$pass) or die ("Unable to connect to Server!");
mysql_select_db($dbase, $connection) or die ("Unable to connect to Database!");

$sql = sprintf("INSERT INTO newsletter (pageTitle, headerLogo, volumeIssue, sermonDate, headerSubject, headerQuran, quranicVerse_1, 
								quranicPicture_1, quranicVerse_2, quranicPicture_2, headerHadith, hadithText, hadithPicture, headerMessiah, messiahText, 
								messiahPicture, sourceLink_1, headerMainSummary, mainSummaryText, headerMainText, mainText, mainPicture, sourceLink_2, 
								mainSeparator, headerSpecial, specialNotes) 
			VALUES (	'%s','%s','%s','%s','%s','%s','%s',
					'%s','%s','%s','%s','%s','%s','%s',
					'%s','%s','%s','%s','%s','%s','%s',
					'%s','%s','%s','%s','%s')

               ,mysql_real_escape_string( $pageTitle )
               ,mysql_real_escape_string( $headerLogo )
               ,mysql_real_escape_string( $volumeIssue )
               ,mysql_real_escape_string( $sermonDate )
               ,mysql_real_escape_string( $headerSubject )
               ,mysql_real_escape_string( $headerQuran )
               ,mysql_real_escape_string( $quranicVerse_1 )
               
               ,mysql_real_escape_string( $quranicPicture_1 )
               ,mysql_real_escape_string( $quranicVerse_2 )
               ,mysql_real_escape_string( $quranicPicture_2 )
               ,mysql_real_escape_string( $headerHadith )
               ,mysql_real_escape_string( $hadithText )
               ,mysql_real_escape_string( $hadithPicture )
               ,mysql_real_escape_string( $headerMessiah )
               ,mysql_real_escape_string( $messiahText )
               
               ,mysql_real_escape_string( $messiahPicture )
               ,mysql_real_escape_string( $sourceLink_1 )
               ,mysql_real_escape_string( $headerMainSummary )
               ,mysql_real_escape_string( $mainSummaryText )
               ,mysql_real_escape_string( $headerMainText )
               ,mysql_real_escape_string( $mainText )
               ,mysql_real_escape_string( $mainPicture )
               ,mysql_real_escape_string( $sourceLink_2 )
               
               ,mysql_real_escape_string( $mainSeparator )
               ,mysql_real_escape_string( $headerSpecial )
               ,mysql_real_escape_string( $specialNotes )
		);
//execute SQL statement
$result = mysql_query($sql);

// check for error
if (mysql_error()) { print "Database ERROR: " . mysql_error(); }
?>
hielo 65 Veteran Poster

What I am ultimately trying to do is use one onmousedown behavior to listen for clicks on an object within the dom tree.

That's what I gave you above. Within the anonymous callback function, "this" is a reference to the node you clicked on. So this.id will give you the id of that element IF it has one. But even if it does not have one, you can still get it's html content via this.innerHTML. You can even set up some function and pass a reference to "this" and have that function do whatever you need it to do that element/node.

<script type="text/javascript">
		$(function(){
			//the example below will select all the "P" tags within <div class="TopMainNav">
			//if you want ANY tag within <div class="TopMainNav">
			//then use $(".TopMainNav *")
			//if you do NOT want to restrict it to <div class="TopMainNav">
			//then use:
			//$("body *")
			$(".TopMainNav > p").bind('mousedown',function(event){event.stopPropagation();	doSomething(this,'down'); $(this).css("background-color","beige");})
						.bind('mouseup',function(event){event.stopPropagation(); doSomething(this,'up');$(this).css("background-color","");})
		});

		function doSomething( node, m )
		{
			alert( "mouse:" + m + "\nhtml:" + node.innerHTML);
		}
		</script>

You don't need an id on the element if you have access to the element via "this".

hielo 65 Veteran Poster

Instead of: window.setInterval("refresh()",600000); you need to save a reference to that call: timerID = window.setInterval("refresh()",600000); THEN (whenever you are ready), you use timerID to stop subsequent calls by passing that id to clearInterval. clearInterval(timerID)

hielo 65 Veteran Poster

Assuming the name of the table is Office AND that the name of the column is stationary, try: SELECT * FROM Office WHERE stationary LIKE '%pen%'

hielo 65 Veteran Poster
hielo 65 Veteran Poster

On line 13 of array2: $exist[] = $row; $row is an array that has TWO elements. So each time you add an element to $exist, that element does NOT have "110", "114" OR "115". It has an array, and each of those arrays in turn has TWO elements; one with index zero and one with key "contact_type". All you need to do is change: $exist[] = $row; to: $exist[] = $row[0];

hielo 65 Veteran Poster

try:

<?php
 mysql_connect("localhost", "admin", "pwd") or die(mysql_error()); 
 mysql_select_db("app1") or die(mysql_error()); 
 $firstname=mysql_real_escape_string($_POST['fname']); 
 $email=mysql_real_escape_string($_POST['email']); 
 $lastname=mysql_real_escape_string($_POST['lname']); 
 $address=mysql_real_escape_string($_POST['address1']); 
 $addressii=mysql_real_escape_string($_POST['address2']); 
 $state=mysql_real_escape_string($_POST['state']); 
 $zip=mysql_real_escape_string($_POST['zip']); 
 $phone=mysql_real_escape_string($_POST['phone1']); 
 $phoneii=mysql_real_escape_string($_POST['phone2']); 
 $advertising=mysql_real_escape_string($_POST['advertising']); 
 $otherjobtype=mysql_real_escape_string($_POST['otherjobtype']); 
 $jobtype=mysql_real_escape_string($_POST['jobtype']); 
 $objective=mysql_real_escape_string($_POST['objective']); 
 $resume=mysql_real_escape_string($_POST['resume']); 
 $weekendavail=mysql_real_escape_string($_POST['weekend_shift']); 
 $nightavail=mysql_real_escape_string($_POST['night_shift']); 
 $pt_ft=mysql_real_escape_string($_POST['shift_preference']); 
 mysql_query("INSERT INTO `data` VALUES ('$firstname', '$lastname', '$email', '$address', '$addressii', '$state', '$zip', '$phone', '$phoneii', '$advertising', '$jobtype', '$otherjobtype', '$nightavail', '$weekendavail', '$pt_ft', '$objective', '$resume')"); 
 print "Thank you for your resume. Your information has been successfully added to the database and will be reviewed by a hiring representative. Please continue to explore our site for more opportunities."; 
 ?>
hielo 65 Veteran Poster

Read comments in code:

<?php
include "functions.php";
?>
<html>
<head>
<title>
Register Form
</title>
</head>
<body>

<center>
<form method="POST" action="index.php">
<table border="0" style="width:250;text-align:left;border: 1px solid black;padding:2px; font-family:Verdana; font-size:12px; ">
<tr>
<td>
Username:
</td>
<td>
<input type="text" name="username" >
</td>
</tr>
<tr>
<td>
Password:
</td>
<td>
<input type="password" name="password" >
</td>
</tr>
<tr>
<td>
Gender:
</td>
<td>
<select name="gender">
<option value="Male">Male</option>
<option value="Female" >Female</option>
</select>
</td>
</tr>
<tr>
<td>
Birth Year:
</td>
<td>
<select name="birth_year">
<?php
$num=1988;
while($num <= 2008)
{
$num++;
echo "<option value=$num>".$num."</option> ";
}
?>
</select>
</td>
</tr>
<tr>
<td colspan="2" align="center">
<input type="submit" name="submit" value="submit">
</tr>
</table>
</form>
<?php if($_POST['submit']) { ?>
<table border="0" style="color: red;width: 250; margin-top:5px;border: 1px solid black;padding:2px; font-family:Verdana; font-size:12px; ">
<?php
	$curnum= 0;

/*
instead of these:

$username= $_POST['username'];
$password= $_POST['password'];
$gender= $_POST['gender'];
$byear= $_POST['birth_year'];

you can dynamically create those variables using a foreach. The name of the the variable would
match the relevant key in $_POST. Thus, since your $_POST has birth_year, then your variable will be $birth_year instead
of $byear.
*/
foreach($_POST as $k=>$v)
{
	${$k}=mysql_real_escape_string($v);
}

if(!$username)
{
	$curnum++;
	echo "<tr><td>".$curnum.".Please enter a username</td></tr>";
}
elseif(strlen($username) > 20)
{
	$curnum++;
	echo "<tr><td>".$curnum.".Your username is tooo long (3-20 characters)</td></tr>";
}
if(strlen($username)< 3)
{
	$curnum++;
	echo "<tr><td>".$curnum.".Your username is tooo short (3-20 characters)</td></tr>";
}


if(!$password)
{
	$curnum++;
	echo "<tr><td>".$curnum.".Please enter a password</td></tr>";
}
elseif(strlen($password) > 25)
{
	$curnum++;
	echo "<tr><td>".$curnum.".Your password is tooo long (5-25 characters)</td></tr>";
}
elseif(strlen($password)< 5)
{
	$curnum++;
	echo "<tr><td>".$curnum.".Your password is tooo short (5-20 characters)</td></tr>";
}


if($curnum == …
hielo 65 Veteran Poster

but I was unable to come up with that using $(this).id

The $() is jQuery function, so you cannot use $(this).id because "id" is a property of the DOM node, but $(...) does NOT return a DOM node - it returns a jQuery object. On the example above, "this" refers to a DOM node, so if you want the id of the DOM node, you can use either the DOM reference approach:

this.id ( and to get the html use this.innerHTML )

OR the jQuery reference approach:

$(this).attr("id")  ( and to get the html use $(this).html() )
hielo 65 Veteran Poster

mysql_query("INSERT INTO users VALUES(`id`,'".$username."','".$password."','".$gender."'.".$byear.")")

I am assuming the id you are trying to insert is an autonumber fiedld. If that is true, then instead of `id`, use NULL:

mysql_query("INSERT INTO users VALUES(NULL,'".$username."','".$password."','".$gender."'.".$byear.")")

(the database will autoincrement instead of actually inserting null).

hielo 65 Veteran Poster

try:

<?php
	$class_id = $_GET['id'];
	$HOST = 'localhost';
	$USERNAME = 'root';
	$PASSWORD = '';
	$DB = 'sjas';
	$link = mysqli_connect($HOST,$USERNAME,$PASSWORD,$DB);
	
	//get class
	$sql1 = "SELECT * FROM class,course WHERE idClass = $class_id and Course_idCourse = idCourse";
	$result1 = mysqli_query($link,$sql1) or die(mysqli_error($link));
	$row1 = mysqli_fetch_array($result1);
	
	//get students
	$sql2 = "SELECT * FROM member m,attendance a WHERE Class_idClass = $class_id and Member_idMember = idMember group by idMember";
	$result2 = mysqli_query($link,$sql2) or die(mysqli_error($link));
	$no_student = mysqli_num_rows($result2);
	$student_name = mysqli_fetch_array($result2);
	
	//Get information of assigning class
	$assigning = "Select Class_idCLass,Venue_idVenue,day01,day02,day03,day04,day05,day06,day07,day08,day09,day10,day11,day12 from attendance, class where Venue_idVenue IS NULL and Class_idClass = $class_id group by Class_idClass";
	$assigning_result = mysqli_query($link,$assigning) or die(mysqli_error($link));
	$assigning_no = mysqli_num_rows($assigning_result);
	$assigning_venue = mysqli_fetch_array($assigning_result);
	
	//For Assigning Day duration
	$assigning_day = "Select Class_idCLass,Venue_idVenue,idVenue, idTime_Slot from attendance, class, time_slot, venue where Venue_idVenue IS NULL and Class_idClass = $class_id and idTime_Slot = 1 group by Class_idClass";
	$assigning_day_result = mysqli_query($link,$assigning_day) or die(mysqli_error($link));
	$assigning_no = mysqli_num_rows($assigning_day_result);
	$assigning_venue = mysqli_fetch_array($assigning__day_result);
	
	//For Assigning Night duration
	$assigning_night = "Select Class_idCLass,Venue_idVenue,idVenue, idTime_Slot from attendance, class, time_slot, venue where Venue_idVenue IS NULL and Class_idClass = $class_id and idTime_Slot = 2 group by Class_idClass";
	$assigning_night_result = mysqli_query($link,$assigning_night) or die(mysqli_error($link));
	$assigning_no = mysqli_num_rows($assigning_night_result);
	$assigning_venue = mysqli_fetch_array($assigning_night_result);
	
	//Get Assigned Venue's information
	$assigned = "Select Class_idCLass,Venue_idVenue,day01,day02,day03,day04,day05,day06,day07,day08,day09,day10,day11,day12 from attendance a,class c where a.Class_idClass is not Null and a.Venue_idVenue is not Null Group by Class_idClass";
	$assigned_result = mysqli_query($link,$assigned) or die(mysqli_error($link));
	$assigned_venue = mysqli_fetch_array($assigned_result);
	$assigned_venue_no = mysqli_num_rows($assigned_result);
	
	//For Assigned Day duration
	$assigned_day = "Select Class_idClass,Venue_idVenue,idTime_Slot from attendance, class, time_slot WHERE Class_idClass = idClass and idTime_Slot = 1 and Time_Slot_idTime_Slot = idTime_Slot …
hielo 65 Veteran Poster

I couldn't wait till tomorrow!

LOL. Glad to help. Be sure tom mark the question solved.

Regards,
Hielo

hielo 65 Veteran Poster

For some reason, the error message doesn't have the full text (ending height with just heig)?

On the field in question, look at the size of the field in your db. In other words, look at the maximum number of fields it can accept. Now look at the text you are trying to insert for that field. Are you exceeding the limit? If so, you will need to increase the size of your field.

hielo 65 Veteran Poster

Yes:

$i=0;
$j=0;
do{
  do{
   echo $i . " " . $j;

  }while(++$j<10);
}while( ++$i < 10);
hielo 65 Veteran Poster

try:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>hielo</title>
		<script type="text/javascript" src="http://jqueryjs.googlecode.com/files/jquery-1.3.2.min.js"></script>
		<script type="text/javascript">
		$(function(){
			var img=$('img[src$=toolbar_favforums.gif]');
			var div = $('<div style="border:1px solid black;"></div>').insertAfter(img);
			$( $(img).remove() ).appendTo(div);
			
		});
		</script>
	</head>
	<body>
		<img src="http://www.daniweb.com/rxrimages/toolbar_favforums.gif" alt="" onclick="alert(1)">
	</body>
</html>
hielo 65 Veteran Poster

try:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>hielo</title>
		<script type="text/javascript" src="http://jqueryjs.googlecode.com/files/jquery-1.3.2.min.js"></script>
		<script type="text/javascript">
		$(function(){
			$('input.addForm').live('click',function(){
				var f=$(this).closest('form').clone(true);
				$(f).insertAfter($(this).closest('form'));
				
			});
		});
		</script>
	</head>
	<body>
<?php
	echo "<form enctype='multipart/form-data' action='rapidinsert.php' method='post' name='changer'>
         <br /><br />
		  <font color='#D99C29' face='Arial' size='3px'>Add Noun </font><input type='text' name='noun' value='' size='30' />       <input type='submit'  value='Submit' style='font-size:10px' />
		  <input type='button' class="addForm" value='Add form' style='font-size:10px' />
		  </form>";
?>

	</body>
</html>
hielo 65 Veteran Poster

Request.QueryString

Wrong. That is ASP (Server-Side) code. It does not exist in javascript. You need to look at location.search (which contains the querystring) and extract if from there OR you can use the code given at:
http://www.eggheadcafe.com/articles/20020107.asp

If you use that, then instead of:

var s=Request.QueryString("status");

you would need:

var s=queryString("status");
hielo 65 Veteran Poster

read comments in the code

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>hielo</title>
		<script type="text/javascript" src="http://jqueryjs.googlecode.com/files/jquery-1.3.2.min.js"></script>
		<script type="text/javascript">
		$(function(){
			//the example below will select all the "P" tags within <div class="TopMainNav">
			//if you want ANY tag within <div class="TopMainNav">
			//then use $(".TopMainNav *")
			//if you do NOT want to restrict it to <div class="TopMainNav">
			//then use:
			//$("body *")
			$(".TopMainNav > p").bind('mousedown',function(event){event.stopPropagation();	$(this).css("background-color","beige");})
							.bind('mouseup',function(event){event.stopPropagation(); $(this).css("background-color","");})
		});
		</script>
	</head>
	<body>
<div class="HeaderLogo">
<div class="logo">Copyright &copy; 2010 My Website All Rights Reserved.<br />
<img src="../images/template_2/website-logo.png" alt="MY Website - CMS" width="413" height="51" />
</div>
</div>

<div class="CenterWidth">
<div class="TopMainNav">
<p>My First Sentence Text</p>
<p>jhdasfhjklas</p>

</div>

<div class="ContentArea">Text</div>


<br style="clear:both;" />

</div>	
	</body>
</html>
hielo 65 Veteran Poster

try:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>hielo</title>
	<script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>
	<script type="text/javascript">
	$(function(){
		$('input[name^="qty"]').each(function(){
			update(this);
		});
	});

function update(el)
{
	var tr = el.parentNode;
	while (tr.nodeName.toLowerCase() != 'tr'){
		tr = tr.parentNode;
	}


	var qty= tr.cells[3].getElementsByTagName('input')[0].value;
	var price = tr.cells[2].getElementsByTagName('input')[0].value;

	var total = Math.round(qty*price*100);


	tr.cells[5].innerHTML = cToD(total);


	var rows = tr.parentNode.rows;
	var i = rows.length;
	var gTotal = 0;
	while (i--){
		gTotal += Math.round(rows[i].cells[5].innerHTML * 100);
	}
	document.getElementById('grandTotal').innerHTML = "<div class=\"field\"><input type=\"hidden\" size=\"3\" class=\"textbox\" id=\"total\" name=\"total\" value=\""+ cToD(gTotal) +"\"/></div>"+ cToD(gTotal) +"";
}


function cToD(c)
{
	if (c<10) return '0.0' + c;
	if (c<100) return '0.' + c;
	c += '';
	return (c.substring(0,c.length-2)) + '.'+(c.substring(c.length-2));
}
	</script>
	</head>
	<body>
	<!-- Your table stuff goes here -->
	</body>
</html>
pietpiraat commented: Coding is spot on! +1
hielo 65 Veteran Poster

Look at the browser's source code. Somewhere in that code you must have a script, link, and/or img tag where you have a FULL url that starts with "http://", BUT you are accessing/viewing the page via "https://". The warning you are describing would happen when these differ in the protocol. If the tag in question refers to a file on your server, then do not use a full url - use a relative path.

Note: It is possible that there may be a script that is dynamically importing other files using http. Same goes for css.

hielo 65 Veteran Poster

"first" and "last" are "special". There is no such thing as "second", "third", etc. However, you can used an index selector. This:

$("ul.tabs li:first").addClass("active").show(); //Activate first tab

is equivalent to this:

$("ul.tabs li:eq(0)").addClass("active").show(); //Activate first tab

So to activate the second tab, you just need to increment the index by 1:

$("ul.tabs li:eq(1)").addClass("active").show(); //Activate Second tab

Likewise if you want to activate the:
third => li:eq(2)
fourth => li:eq(3)
etc.

hielo 65 Veteran Poster

You need an element that contains/wraps both, the tabs and the content of the tabs. On the example below, this container is 'tabWrapper'. The the example below as test.html and try it:

<!DOCTYPE html>
<html>
<head>


  <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
<style type="text/css">
.tab_content{display:none;}
</style>
  <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
  <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
  
  <script>
  var t=null;
  $(document).ready(function() {

	t=$('#tabWrapper').tabs();
	t.tabs('select',2);
  });
  </script>
</head>
<body style="font-size:62.5%;">


     <div id='tabWrapper'>
          <ul class="tabs">
          	<li><a href="#tab1">tab1</a></li>
          	<li><a href="#tab2">tab2</a></li>
          	<li><a href="#tab3">tab3</a></li>
          </ul>
          
          <div class="tab_container">
          	<div id="tab1" class="tab_content">
          		<!--Content-->1
          	</div>
          
          	<div id="tab2" class="tab_content">
          		<!--Content--> TAB 2
          	</div>
          
          	<div id="tab3" class="tab_content">
          		<!--Content--> TAB 3
          	</div>
          </div>
     </div>
</body>
</html>
hielo 65 Veteran Poster

you need to use the script tag:

<script runat=server language='javascript' src='pathtoyourfile.js'></script>
<%
'asp code here...
%>
hielo 65 Veteran Poster
//first tab is index 0,
//second tab is index 1, etc.
$('.tabs').tabs('select', 1);

Refer to:
http://docs.jquery.com/UI/Tabs#method-select

hielo 65 Veteran Poster

You are welcome!

hielo 65 Veteran Poster

well for example if i type in "po" it should give me all possible definitions such as police and pocket but instead it gives me definition for police and just word pocket where it shouldn't even return "word" it should only return definition.

The problem is that when you type "po", your $def ends up with the following:

$def="police-protects people from crimes and danger<br>pocket-a small holding space atached to the close"

so, when you split at the hyphens, $definition SHOULD get the string

"protects people from crimes and danger<br>pocket" because it is BETWEEN hyphens. What you needed to do was NOT to store those hyphens to begin with:

...
if ($def=="")
{//value of array is placed in the def variable
$def=preg_replace('#^([^-]+).#','',$a[$i]);
}
else
{//else it is placed below def variable
$def=$def."<br>" . preg_replace('#^([^-]+).#','',$a[$i]);
}
...
hielo 65 Veteran Poster

read through the comments:

<%

'NO! Use Server.MapPath() to determine the full path of the db
'you do not need to do all these
'
'sFile = request.ServerVariables("PATH_TRANSLATED")
'sSplit = split(sFile, "\")
'for iCtr = 0 to uBound(sSplit) - 1
'	sDir = sDir & sSplit(ictr) & "\"
'next

Dim objConn, sql, affectedRecords
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("patriots.mdb")

'on the code you posted you are not using password anywhere. My guess it that on your form is named
'FPassword, but if not be sure to use the correct field name
sql="UPDATE [Users] SET [FVerify]=True WHERE [FPin]='" & Request.Form("pin") & "' AND [FUsername]='" & Request.Form("username") & "' AND [FPassword]='" & Request.Form("password") & "'"

objcommand.Execute ra,parameters,options

objConn.Execute sql, affectedRecords

objConn.Close
Set objConn = Nothing

If 0 = affectedRecords Then
	Response.Redirect "whatever.asp"
End If
%>