Jump to content
Larry Ullman's Book Forums

shaneg

Members
  • Content Count

    15
  • Joined

  • Last visited

Everything posted by shaneg

  1. The suggested cookie method has been implemented. It works great. Thanks.
  2. Both ideas are very helpful, and I think a combination of both may do what I need. I'm not sure exactly how to add an event handler to the close event (which is needed in both ideas). I've had difficulty with that before, but I can figure it out. I'll try it. Thanks!
  3. Yes, it is likely that the user would sometimes want multiple child windows open at one time. For example, while working on customer A in a child window, the phone rings with a call from customer B, so the user opens a second child window, but doesn't want to close the first child window that is in the process of being worked on.
  4. My site includes a parent-window that has a table of customers. By clicking on a customer, the user initiates the opening of a child-window that has a table of further data for that specific customer. Clicking on a customer in the parent-window runs the following code: if(window.varwins["study"+tcustid] && !window.varwins["study"+tcustid].closed){ alert('A study for this customer, '+tcust+', is already open.'); } else{ varwins["study"+tcustid]=window.open("crxindex.php?getcustid="+tcustid,tcustid); } This works very well. However, if there is a child-window open,
  5. I have used a couple of your books extensively to develop a couple websites. I don't recall seeing the following topic covered. On my current project, I need my users to be able to locate and open a spreadsheet, word, or pdf file that is located (via an in-common cloud server) on their individual, local desktop computer. I don't want the file to open within the website, but instead the spreadsheet file, for example, should open via the software on the desktop, thus allowing the user to be outside of the website and edit or view the file, and then resave it on the desktop (via the cloud ser
  6. Aaaah, that is slick! (And works exactly as I needed.)
  7. Function A has called function B, executed a few lines, and now I want to return to function A and execute the underlined part of this: function A(){ .... .... B(); } function B(){ .... .... return [return true]; } The first return is for function B. The second return is for function A. Of course, I can just put the underlined code in function A after calling function B, but in this case I want to assign the code as a part of the function B return. As written, the above code does not work; the second return on the line causes a syntax error. Is ther
  8. Per instructions and examples in the book, I am using javascript to initiate use of mysql within a php file to populate the data in a grid within my original javascript file. Everything works fine! However, sometimes, it takes a few seconds for the php file to complete running. I am finding that I need to disable the grid until the php file has completed. I know how to disable the grid using jquery $.blockUI(); and re-enable the grid using $.unblockUI(); using javascript commands in my javascript file. But I cannot figure out how to delay the $.unblockUI(); until the php file has completed
  9. Thank you! I think I have this resolved. And it seems to work great. (Yes, the grid plugin is already running ajax.) I gained knowledge from each of your replies and each time (after letting it sink in) added another piece to my understanding of how this can work. You have been thorough, and I really appreciate it!
  10. I bought the Ajax book, and you're right, it is very good. However, I still have not been able to figure out my problem. I'll try to restate it. Step 1: I am using javascript to display 2 grids that allow me to input variables into multiple columns of records in 2 tables of a MySQL database. Step 2: I am using php to apply math to variables from table 1 against variables from table 2 in the database and generate a mathematical product which is now saved in another field of the record in table 1. Step 3: I then use javascript to redisplay the grid showing table 1, but instead of the variable
  11. Within a javascript function, if certain conditions are true, I need to utilize MySQL for recalculating some fields, and then return right back into the javascript function. If I use location.href....... as a line in the function which refers to a php file that utilizes MySQL, I can get the calculating done, but I don't get returned back to the function. On the other hand, if go to php within my function and use include...... this will also get the calculating done, and I even then return to the function, but I don't want the php include... to run unless certain conditions are true within the
  12. Thank you both so much! I'm digesting the suggestions. Summarizing my objective: There should be only 1 row resulting from $r1. I am then going to use that result to multiply it by a column in several rows resulting from $r2, using this product to update a second column in each of the $r2 rows. It looks like I have 3 ways to do this: 1) using "list" outside of mysql (I didn't know about this possibility.) , 2) using "select ... into" within mysql, or 3) using a select statement that includes both tables at once. As I try to figure out the best option, I have 1 other question for now: W
  13. Larry, I have 2 of your books: "PHP 6 and MySQL 5 for Dynamic Web Sites" and "Effortless E-Commerce with PHP and MySQL", but do not have your MySQL book. If I just need to get this book to answer my question, that's fine, but I wasn't sure that my answer would be found there. I have made a lot of progress, but can't figure this out: I am needing to get a value from a column in xacres table and multiply it by a value in xinputs table. But I can't figure out how to save the first value as a variable to be used by the SELECT statement for the second table. I have the following: $q1 = 'SEL
×
×
  • Create New...