Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; GTB6.5; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; eSobiSubscriber 2.0.4.16; InfoPath.2; .NET CLR 1.1.4322; .NET4.0C)
Timestamp: Fri, 1 Oct 2010 12:01:16 UTC
Message: Object expected
Line: 1
Char: 1
Code: 0
URI: http://www.domain.com/staff/tpr/view_tpr.php?tpr_reference_number=1061160
Hey, Airshow,
Thanks for the reply. I am working on it at the moment so that is a great help.
Having said that, where am I putting this code??!?!? Sorry, I work on databases mainly. JS means near to nothing to me :-( lol
OK, excellent. So, this is what I've got.
I am building an online control panel for a business. This particular function was for updating reports. The main page shows the report detail and below this it displays all of the actions taken again that report. Each time a use logs an action it is shown in this list. This is a bit irrelevant.
Anyway - I wanted to allow the user to select an action entry and then be able to edit it. As far as entering data into a database, retrieving it, and editing or deleting it is concerned, I do this all day everyday so I have a good knowledge on this. As far as JavaScript is concerned, my knowledge is slightly lacking.
In the main page that presents the user with the report and action logs, I have this:
<script>function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=805,height=575,left = 470,top = 200');");
}
// End -->
</script>
The above opens the pop up window absolutely fine. One thing that did concern me was for reasons unknown to me, the old data can appear. For example, if I update the details field in the pop up window and clicked submit, it would update the database and close the window but on clicking the pop up window again, it shows me what was previously in the 'details' box. If I hit …
I agree with Clarkeez - My reply was more about how to use it - if you wanted to use it yourself
Good question. When you create a URL link, you can place variables in the URL. If the URL variable was ?ref=home, they could have called this from the URL. A good example of this would be, if you created a link which was http://www.mydomain.com?ref=link, you could have use the $link = $_GET in a form etc.
Obviously the GET function, gets the variable from the URL. Not the safest way to pass variables, but it can be done.
if you put http://www.domain.com?VAR=variable you can call this form a domain.
The most common way I know is for searches.
An example of this would be if you set your domain name as above you could have
$variable = $_GET['url_variable';
$query = "SELECT * FROM database_name" .
"WHERE field_name = '$url_variable' ";
$result = mysql_query($query)
or die(mysql_error());
$row = mysql_fetch_array($result);
I want to be able to open a window with a variable. For example, I will use domain.com?reference=1234- This link will open a pop up window as follows:
<a href="javascript:popUp('http://www.domain.co.uk/staff/tpr/update_action_log.php?action_reference=<?php echo $row2['action_reference']; ?>')" title="Click Here edit this entry"><?php echo $row2['action_reference']; ?></a>
When I open this window, it is always showing data put in last, it isnt refreshed.
I wanted to open this pop up window, enter data and then click submit and make the data enter the database and then refresh the parent window.
Every time I have done this, either the parent or the pop (or both) is showing old data.
HELP!!
It seems so basic. I have used pop ups before and not had this problem
I have been working on this sytem all day and reviewing that post, I feel like I explained it terribly.
I am creating a online control panel for clients to process orders and view invoices.
Prior to the invoice being raised, it must go through our orders database. I am using PHP on a linux server.
When an order is placed and entered into the order database, the client then needs to view the order and select ACCEPT TERMS. When they do this, the order is updated and then the values are entered into an invoice table in a seperate database.
Once the user click ACCEPT TERMS they are then transferred to a page that runs a script to set the variables and insert the fields into the invoicing database. What I didn't consider is this:
The orders and the invoicing databases have two tables. The invoicing database has INVOICE and INVOICE_DETAILS. The invoice table contains the header information, such as the client details and the INVOICE_DETAILS holds all of the transactions such as QTY, DESC, UNIT PRICE. When this displays on a page, I use a while loop to show all the entries for that invoice in the INVOICE_DETAILS table.
To transfer all of the order entries into the invoice_details table, can I simply use an insert query on the ACCEPT TERMS page and then it keeps transferring the details until all have been transferred? for example
$query1 = "SELECT * FROM order_details " .
"WHERE customer_reference = '" . $_SESSION['session_name] . "' AND order_reference = $order_reference AND invoiced = 'No'";
$result1 = mysql_query($query1) …