Jump to content

niche

Members
  • Posts

    3,671
  • Joined

  • Last visited

  • Days Won

    17

Everything posted by niche

  1. This will get you started: http://www.w3schools.com/js/js_functions.asp How much JS experience do you have?
  2. Change the button type to submit.
  3. Why does changing font-size, from 8px to 9px, in the button class, stagger the buttons? Firebug says there's plenty of room. In-line styles are used for convenience. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><?php session_start(); ?><html xmlns="http://www.w3.org/1999/xhtml"><head><meta name="description" content="Save money" /><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>ebop </title><style type="text/css">.button {margin:0px;padding:0px;width:60px;height:60px;font-size:8px;text-align:center;}</style></head><body><?phpecho '<div style="margin:0px 0px 0px 0px;float:left;overflow:visible;width:195px;height:160px;">';//right div //button div echo '<div style="margin:0px 0px 0px 0px;float:left;overflow:visible;width:180px;height:100px;">'; echo '<button class="button" >Item Details'; echo '</button>'; echo '<button class="button" >Phone'; echo '</button>'; echo '<button class="button" >Hours'; echo '</button>'; echo '</div>'; //closes button divecho '</div>'; //closes right div?></body></html>
  4. Thanks a lot dsonesuk. I'm following you. In this situation, that would mean an ajax call within an ajax call. Very intriguing. I'll pursue this in another topic after I work-up some code. Thanks to ingolme and dsonesuk for their help on this topic.
  5. Didn't know you could display content that way. How is that ajax?
  6. Ah, the GET array! Count me as a first time user. Thanks Ingolme. Dsonesuk, please tell me a little about what you meant by "content returned from ajax response into ONE single page"?
  7. Ingolme, can I get access to the value in the query string at the beginning of "direct_all_links_from_here.php"? If so how?
  8. I'm following you dsonesuk. I have Bob's data stored in a table. How do I get the value for "Bob" from Bob's link so I can use it in a SQL query when the link sends me to a utility script called "direct_all_links_from_here.php"?
  9. I'm currently using that to define the script that's connected to the link. For example the link "Bob" currently has href attribute of "bob.php". What's the thinking that will connect the "Bob" link to the href attribute "direct_all_links_from_here.php" so when "Bob is clicked the user gets sent to the "Bob" page from "direct_all_links_from_here.php"? I need it to work similarly for the "Barbara" link, same way for the "Barney" link and the "Beatrice" link. I need to avoid having a separate script for each firstname. I also want to avoid using a dropdown box to populate an input field.
  10. I modified the script at: http://www.w3schools...hp_ajax_php.asp to the script found at: http://www.lincolnsr...est_120506.html It only works with names that start with a "B". This requires a separate script for each link in the div called link_container. That will be a lot of scripts someday. I can't think of a way to channel all the links to a single script that sends the user to the same place they'd go as if they just clicked on the original link. Can you think of a way? If so, what's your thinking?
  11. niche

    appending id

    Thanks to justsomeguy, thescientist, and DonE for all their help.
  12. niche

    appending id

    I have a script that I've modified based on:http://www.w3schools.com/php/php_ajax_php.asp I currently have a code that appends an output div to the end of the body:document.getElementsByTagName('body')[0].appendChild(div); I thought I could append the output div to the input form (bottom of yellow div) by giving the form an id and appending it like this:document.getElementById('here')[0].appendChild(div); Except, that's a no go. How do I get the div from the end of the body to the end of the form? If needed, you can see what I'm talking about at:http://www.lincolnsrealdeals.com/temp111b.php
  13. What's your question? Are there any error messages? Also, please limit the code you show as much as possible and don't assume any prior knowledge about your situation if possible.
  14. Looks like you're changing the contents of the table not the table. Try UPDATE. http://www.w3schools.com/sql/sql_update.asp
  15. I need to start a while statement depending on the outcome of two queries. I thought I could use an if statement to use the correct first line of the while statement, but this produces a parse error: <?phpinclude "connect_to_mysql.php";$plan = mysql_query("SELECT * FROM plan WHERE cliorder <> '' AND TIMESTAMP(NOW()) BETWEEN TIMESTAMP(begin) AND TIMESTAMP(end) ORDER BY cliorder DESC") or die(mysql_error()); $keyword = "Aircraft";include_once "connect_to_mysql.php";$keyword2 = mysql_query("SELECT * FROM stk INNER JOIN plan ON stk.cliorder=plan.cliorder WHERE stk.subcategory LIKE '%" . $keyword . "%'") or die(mysql_error()); if (mysql_num_rows($keyword2) == 3) { while ($plan2 = mysql_fetch_array($keyword2)) { } else { while ($plan2 = mysql_fetch_array($plan)) {}echo $plan2['cliorder'] . '<br/>';}?> If I can't use an if statement to select the correct first line, what should I use?
  16. test_120424.php has a single line of code: echo mysql_num_rows($keyword2); include 'test_120424.php'; returns the expected echo. header('Location: http://localhost/test_120424.php'); returns these messages: Notice: Undefined variable: keyword2 in E:\wamp\www\test_120424.php on line 2 Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in E:\wamp\www\test_120424.php on line 2 Can I send a MySQL result resource through a header? If so how should I be thinking?
  17. Just after I posted, I tried: "SELECT * FROM stk INNER JOIN plan ON stk.cliorder=plan.cliorder WHERE stk.subcategory = '" . $keyword . "'" and was successful. This was the first time I've used WHERE with JOIN.
  18. This code produces: Column 'subcategory' in where clause is ambiguous "SELECT * FROM stk INNER JOIN plan ON stk.cliorder=plan.cliorder WHERE subcategory = '" . $keyword . "'" What do you think the problem is?
  19. niche

    Cookie Help

    Thanks dsonesuk for the reality check.
  20. niche

    Cookie Help

    Do you know mysql & php? EDIT: It will be impossible to use cookies without php.
  21. thanks for your help birbal & justsomeguy. I'll look at the PEAR solution as soon as I can.
×
×
  • Create New...