Jump to content

ekuemoah

Members
  • Content Count

    14
  • Joined

  • Last visited

Community Reputation

0 Neutral

About ekuemoah

  • Rank
    Newbie
  1. ekuemoah

    HTML5

    I would like to know what is used to describe the following section in an html5 document. Do I use header or a section? The section outlined in blue. Thank You You can view the image at this site:https://docs.google....NTZaUWRyb2libmM Thank you
  2. I actually worked on a program like this a week ago. The program you use depends on how the data is stored.If the data you are requesting(the results) are stored in a database, you could use mysql, php, and xmlhttp to retrieve the data.If the data is kept in json name-value pairs, you can use javascript to retrieve the data. I can make you a sample of both so you can see how it works or give you a code to use for each if you can give me a sample dataset to use.
  3. I have information in a php database. I want to retrieve it. The fields are text or memo fields meaning it can hold a lot of data. I got this error. When I retrieve the data, it only gives me the first record. Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 35 bytes) in C:\Users\Public\EasyPHP-5.3.6.1\www\phptests\AccountingClass\PrintOutScript.php on line 19 What does this mean and what can I do about it? Thank You Also, i retrieved the first row of data but don't know how to print it out on my page.Here's the script I usedif($choice ='review'){$result=mysql_query("SELECT `Question` FROM `reviewquestions`");$row=mysql_fetch_array($result);//echo($row[1]);}
  4. I created a script on a php page. The script is activated when user clicks the submit button on a form. I want to write functions on the same php page. How do I do this? MyData.php<?function getData(){$fname = _POST['fname']; $lname = _POST['lname']; //statements that tells it to write the information to file} function showData(){$price = _POST['price']; $qty = _POST['qty']; $total = $price * $qty; echo $total;}?> MyOutputPage.php<html><head><title>Sample Page</title></head><body>//I want to call the showData() function on the MyData.php page.//How do I do this? <form action=" " method="post"><input type="submit" value="Submit"/></form></body></html> Once I do this, how do I call individual functions on the page. Is there a way to add it to my page with the html like you do when linking to an external javascript script? Thank You
  5. Javascript has a function called setTimeout and setInterval. This lets me repeat a function or procedure at the time interval set. I would like to know if PHP has a similar function or how to do this in php? thanks you
  6. Can you explain to me why I get the following answers when I use array_diff?<?php$a1=array(2=>"Cat",1=>"Dog",2=>"Horse");$a2=array(0=>"Rat",2=>"Horse",2=>"Dog");$a3=array(0=>"Horse",1=>"Dog",2=>"Cat");print_r(array_diff_assoc($a1,$a3,$a2));?>How does the array_diff_assoc function work?Is it looking for values of the first array that are not found in any of the other arrays?Does the order in which the arrays are listed in the array_diff_assoc matter or determine which is compared first?For example, is $a1 compared to $a3 and then to $a2. The returned value is [2]="Horse". Why is this value returned and not [1]="Dog" and [2]="Horse"For a key-value pair not to be returned, the key and value pair have to be found in all arrays listed?
  7. I am working with the following code on codepad.org<?php$office = array('Mckenzie','Aberdeen');$office_wage = array(10,10);$warehouse = array('Martin','Alison','Cuptech','Kroger');$warehouse_wage = array(12,12,12,12);$oEmployees = array_combine($office,$office_wage);$oWarehouse = array_combine($warehouse,$warehouse_wage);$allEmployees = array_merge($oEmployees,$oWarehouse);//print_r($allEmployees);$U=array_values($allEmployees);$R=array_flip($allEmployees);print_r($R);?>The output I got was the following:Array( [10] => Aberdeen [12] => Kroger)It outputs the last values in each array when the values are the same. It treats it like the values are duplicates. How do I treat each array value as unique so that I get a print out of everything.I want to get the following results:Array( [10] => Mckenzie [10] => Aberdeen [12] => Martin [12] => Alison [12] => Cuptech [12] => Kroger)
  8. I read about CSS3 transformations a few days ago. I want to use javascript to access this style property and change the value of it when the user clicks a button.<div id="div1" name="div1" style="transform: rotate(30deg);width: 50px;height: 50px;background-color: orange"</div>I want to use this formula to rdocument.getElementById('div1').style.transform ='rotate(30deg')'Is the above the correct way to access the the element?How do I write it for a chrome or Firefox 4.0 browser, which requires that you add a prefix like -webkit or -moz- before the property?Ex. -moz-transform: rotate(30deg)Do I write it like this document.getElementById('div1').style.mozTransform='rotate(30deg)'How do I write it?
  9. Can I still use HTML or Javascript cookies in my program alongside with the WebStorage methods. If use cookies and the DOCTYPE is set to HTML 5, will I get an error in my program or will my cookie program functions not work any more?Here's my code: function storeMyName(){var fname =document.getElementById('fname').value;alert(fname);localStorage.setItem('firstname',fname);alert("Name Stored");}function getMyName(){ alert(localStorage.getItem('firstname')); }
  10. I would like an HTML5 and CSS3 help forum. Thanks
  11. ekuemoah

    Nav Bar Help

    I looked the picture you wanted and tried to code it for you. I thought of two ways to create the effect you wanted -- one is using divisions and the other is using tables. Here's my code for divisions: ( I read somewhere that this is the way you are supposed to hold content that is not data.)/I created a division to hold my image file. I set the z-index to 0, which makes it lie on the backmost layer of your page. 1.)<div class="navback" style="z-index: 0;width: 100%;float: left"><img src="graybar.png" style="width: 100%;position: absolute;top: 200px"/></div>//I created a set of divisions to hold each of your menutitles. I assigned each division to the same class. I wrote the division and the content in the order in which I want my menutitles to appear starting from the left side of the screen. I wrote it like this because the CSS style float property. I used the left property to make sure that each division lined up on the same line or row. The left property will arrange whichever division tag is written first on the leftmost side of your screen. The last division tag that is floated will be on the farthest right side of your screen.my styles for this division looks like this: div.menutitle{position: relative;top: 205px;color: white;font-size: 28px;margin-left: 30px;margin-right: 50px;vertical-align: bottom;font-family: Arial;float: left;z-index: 1}I set the position to relative. When I used absolute, the divisions overlapped and the float property did not align the divisions the way I wanted it to.I set a left and right margin for each division to separate the divisions. I used vertical-align to make sure the text in each division was set at the bottom. I used the float: left statement to make sure the divisions lined up on the same line. Lastly, I set the z-index to 1 to make sure that the menu divisions were on the layer on top of the image.If you play around with it, you might be able to group the navigation divisions into a container and then set that z-index to 1 so that you do not have to set each divisions z individually. //<div class="menutitle">Home</div><div class="menutitle">About Us</div><div class="menutitle">Add Your Site</div><div class="menutitle">Forum</div><div class="menutitle">Contact</div>=======================================================================================The other way I did it was by using a table. Tables, I read, are supposed to be used to hold only data. You can try to use the table format also.I set the picture as the background of my table. I set the cellspacing to 20px to create spacing between each cell. I set the text-align to center so that each text stayed in the center of each cell. I set the width to 100% so that the navigation bar would span across the width of the page. I assigned each table cell to a class called navlink.Here is my css for the navlink: (It is much less than the division tags because I did not have to set the alignment, position, and dimensions property by hand. It is already built into the table. Also, I did not have to create a separate division for my image. I just set it as the background for the table.It took less time to do the table than to use the division method.td.navlink{font-size: 28px;color: white}<table style="background: url('graybar.png');cell-spacing: 20px;text-align: center;z-index: 1;width: 105%;border-bottom: inset 4px teal"><tr><td class="navlink">Home</td><td class="navlink">About Us</td><td class="navlink">Add Your Site</td><td class="navlink">Forum</td><td class="navlink">Contact</td></tr></table>Here is What Both versions look like: The upper box with the lower blue border using the created using a table.the lower box without a border was created using the division method.OK, I hope that helps. If you can't see the image, please let me know.here's the link to the image file if you can't see it. You should see two menu bars with the navigation text for your bar on the page. The page should also be gray. If you see anything else, please let me know. The content is not mine or what I put on the page.http://proficiencymargin.tripod.com/Naviga...b._07_00.57.gif
  12. Hello,I used the localStorage command to store a cookie and retrieve a cookie. I noticed that I was able to retrieve the stored value when I stored the cookie and then pressed retrieve button. However, I was not able to do this when I stored it, closed the browser, and then tried to retrieve it. It acted like a session cookie or a temporary cookie was stored instead of a persistent cookie. How do I make the cookie into a permanent or persistent cookie?Thanksfunction storeMyName(){var fname =document.getElementById('fname').value;alert(fname);localStorage.setItem('firstname',fname);alert("Name Stored");}function getMyName(){ alert(localStorage.getItem('firstname')); }
  13. When I included my Doctype statement at the top of my html pages, I found that the scrollTop property did not work and I could not get my menu to scroll on the page. I used a scroll menu function I found on your website. Does anyone know how I can fix this? This happened for all of the DOCTYPE statements. I also noticed that it shifted all of my text to the right side of the screen after placing this at the top of the page.
  14. When I code, I sometimes run into problems. For example, when I included my Doctype statement at the top of my html pages, I found that the scrollTop property did not work and I could not get my menu to scroll on the page. I used a scroll menu function I found on your website. When I went online, I noticed that other people had the same problems. Is there a way for you to have a page that displays problems other individuals have encountered while using the code?Lastly, I have a suggestion for your site. I would like to keep a record of the quizzes and quiz scores I get. There's a website called ProProfs that lets you create online quizzes for free. It calculates a score for the person and also gives them a certificate showing their score. It's not certification but pre-certification steps that lets an individual have a record showing proof of knowledge of the skills they learned through your website. Can your site create something like this?
×
×
  • Create New...