Jump to content

solarisuser

Members
  • Posts

    122
  • Joined

  • Last visited

    Never

Everything posted by solarisuser

  1. Heh, I went in gung-ho about using CSS, until I realized that 1024x768 and 1280x1024 see things differently, at least the way I coded it. <div style="float: left; position: absolute; width: 150px; margin-left: 0 auto; padding: 1em; text-align:left;"> Any problems that stick out?
  2. Hello All, I'm attempting to have two tables, with one being centered in the middle of the page, and one to the left of it, with in the width of 1000px (entire page has a width of 1000px). Is there a way to have the table on the left (ie - not the table in the center of the page) exist without pushing the centered table to the right? I know CSS can do this with "position:absolute" but then different resolutions will see the table-turned-div on the left in various places, so I figure tables is the solution? Please help, I'm going nuts!! Thanks
  3. It might take a little bit of time to get comfortable with INNER JOIN, but look into it. tizag has some good tutorials
  4. Hi All, I am trying to include a couple links inside this div... <div style="float: left; position: absolute; width: 0 auto; margin-left: 10em; padding: 0px; text-align:left;"> The problem is that this will work in 1280x1024, but looks wrong in 1024x768, and if I tweak it for 1024x768, it looks wrong in 1280x1024. I figured I should look at "position: relative;" but I don't want these links to push the rest of the stuff on the page to the right. Any ideas? =(
  5. Hello All, Just curious if there is a way to pass a checkbox that is NOT checked with "=> off". This would be the opposite if a checkbox IS checked, where it is passed with "=> on". Currently, I have a search page that allows users to select a checkbox and clicks the "Send" submit button, the form saves that checkbox value to a session. When that same search page is refreshed, that checkbox is already checked since the user selected and submitted it. The problem I am trying to tackle is how to let the user "un-check" that box, and click the "Send" submit button, and read from $_POST that it was unchecked. Any Ideas would help. Thanks
  6. <script type="text/javascript"> function ShowValues() { checkboxes = new Array() for (i = 0; i < 4; i++) { if (document.getElementById("Box" + i).checked == true) { message = document.getElementById("Box" + i).value checkboxes = message } } document.write(checkboxes[0]) } </script> <b>Checkboxes:</b><br/> <input type="checkbox" id="Box0" name="CheckGroup" value="Item 1"/>This is Item 1<br/> <input type="checkbox" id="Box1" name="CheckGroup" value="Item 2"/>This is Item 2<br/> <input type="checkbox" id="Box2" name="CheckGroup"/>This is Item 3<br/> <br/> <input type="button" value="Show Values" onclick="ShowValues()"/>
  7. ack, this was the feeling of despair I had originally when I realized it was shopping-cart style.. I have a table with some text fields or dropdown fields, and when a user narrows down the critereia, they click search. then the code in " if(isset($_POST['submit'])) " kicks in, and shows all results with pagination if over X amount of results. Currently, I have a dynamically generated link (e.g - checkout.php?id=123) next to each book title, but for someone checking out 20 books, it seems like a huge waste of time compared to the checkbox method. i guess the difference with this versus amazon.com's shopping cart is that amazon does not use checkboxes. this could be good for me because I can concentrate on figuring out how to get your code to work like we originally wanted to. one idea is to use javascript or something to append the checked entries id number in the URL of each page number or "next" links. (e.g - &checked=123&checked=456). The main problem is figuring out, once the initial page loads with the results and empty checkboxes, how to know what checkboxes have been selected if any once you click on a page number or next link. Any thoughts? BTW - I just had another idea - could I use onClick to put the value of "id=" in a session or something using JS for each checkbox field? For example, <input type=checkbox id=123 name=checkbox[] onClick="rememberCheckBox(this.form)">? I don't know any JS so I'm just guessing...
  8. That's awesome. I've integrated it the way it needs to look and all is well except for one thing. I am trying to figure out where I would use sessions (obviously I need to) with the code above, so the checked boxes will be remembered. Currently, the page numbers at the bottom of the search are <A HREF> links with a whole of bunch of &page=123&blah=123&etc=123 dynamically generated for each A HREF. Since the id is stored in $_POST, at one point would I use sessions? Without the page numbers being part of the form and requiring the submit button, how could I pass $_POST? Ahhh I'm confused =(
  9. So I should look at saving all "checked" <input type=checkbox> fields's id numbers into sessions when a page number is selected or not selected, right? Then have the submit button's code use the sessions instead of $_GET/$_POST? Just trying to wrap my head around it.
  10. I'd say a session only because that way if someone checks 5 records and exists the browser, the sessions will go away..?
  11. Hi All, I am curious what everyone things would be the best way to tackle this... I have a book reservation system, and it paginates depending on the number of results. I let users check a checkbox next to a record, and they can do that to as many records listed on that page. Then they click on the submit button and it works. The problem is when the results are paginated, for example, listing 10 records out of 100 (so there are 10 pages), when the user selected a few checkboxes and clicks on another page, the previously checked records are forgotten. My goal is to have those previously checked records remembered so when the user finally clicks on the Submit button, all checked entries will be used. Thanks
  12. Hi All, I have tried various collapsible field snippets I found off the web, and none of them like it when I embed a <td>something</td> inside <div>. The goal is to have many collapsible plus/minus images on a search page, and when a user clicks on one, I will be able to align the two <input> fields in the table it's in so its centered nicely an whatnot. Anyone know of anything like that? Thanks
  13. Use jpgraph and look at its examples with MySQL and you'll get it done.
  14. It works, when I put in a <span </span> before </div>, go figure! Thanks
  15. Hi All, I have a footer in CSS that works almost perfectly. I can't figure out what I need to do to get a line below the text like it currently has above the text. <style type="text/css"> #footer { clear: both; width: 98%; margin: 10px; text-align: center; font-family: Verdana; font-size: 11px; padding: 3px; border-top: 2px solid red; color: #000; } #footer .left { float: left; text-align: left; } #footer .right { float: right; text-align: right; } </style> <div id="footer"> <span class=left> test1</span><span class=righttest2</span> </div> Thanks for any help!
  16. Hi All, I am using greybox modal box which has data it saves to a SQL database. The issue I am having is trying to figure out how, once that modal is closed by clicking on "close", how to refresh the parent browser page. Any help would be appriciated.
  17. Hi All, I have this JS code that uses a checkbox to show or hide fields. If checked, it will show the fields that are hidden by default. <SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript"> <!-- function showHideSelection() { if (document.form1.gor.checked) { if (document.layers) document.layers[\'formdiv\'].visibility = "show"; else document.getElementById(\'formdiv\').style.visibility = "visible"; } else { if (document.layers) document.layers[\'formdiv\'].visibility = "hide"; else document.getElementById(\'formdiv\').style.visibility = "hidden"; } } //--> </SCRIPT> Then in the PHP page, I have this: <form name="form1"> <input type="checkbox" name="gor" onclick="showHideSelection();"> Toggle </form> When I physically click on the checkbox, it shows the hidden fields. However, when I have "checked" in that input type, like so: <input type="checkbox" checked name="gor" onclick="showHideSelection();"> Toggle the checkbox is checked, but the JS code is not executed and the hidden fields are not shown. It looks as though I'm not doing something right, could someone please correct me? Thanks!
  18. I'd assume the extra security of the newer PHP version has some things turned off in php.ini. I'd look through it and mess with some stuff.
  19. It looks nice, but I can't seem to get it to work with this test page... Could you please correct me... I have <html><script> , your code, </script>, then <FORM NAME="myform" ACTION="" METHOD="GET"> Enter something in the box: <BR> <INPUT TYPE="text" NAME="inputbox" VALUE=""><P> <INPUT TYPE="button" NAME="button" Value="Click" onClick="no_more_popup()"> </FORM> </html> I figured that'd be how I'd send the "inputbox" using $_GET to the webpage I put in your code. In that page that AJAX sends the GET, I have: <? print_r($_GET); ?> so I can see if the inputbox was sent, but it was not. Thanks
  20. Hi All, I want to have a checkbox that says "Do not show me this popup anymore" that when clicked, it automatically sends a MySQL query like "UPDATE .... SET no_more_popup = '1'". This is so the user can select the checkbox and then close the popup, without having to submit a form that executes the MySQL query. I am using PHP but I think this is purely a JS thing. Does anyone happen to know of a tutorial or script that does this, or should I look at some other technology? Thanks!
  21. Are you loading the mysql extension in your php.ini? Do that, restart the web server, and it should see it.
  22. So you have E:\dev\Xitami\webpages\gallery\include\section_init.inc.php right? Because thats what its trying to load.
  23. Hi All, I am going crazy trying to figure out how to use ModalBox with a form so I can send $_POST or $_GET variables from one submitted page in a ModalBox to another page in a ModalBox. Could someone enlighten me? Thanks!
  24. Hi All, Here is my current code $name2 = $data[name]; $patterns[0] = '/\(....\)/'; $replacements[0] = ''; $name3 = preg_replace($patterns, $replacements, $name2); Pretty much I used periods because nothing else worked, but the problem is the number of characters can be more or less than four between the brackets. $data[name] would look like this: Bob Johnson (Cool Guy) How can I remove everything between the brakets INCLUDING the ( and )? Thanks
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.