Jump to content

angel_cowgirl

Members
  • Posts

    17
  • Joined

  • Last visited

    Never

Everything posted by angel_cowgirl

  1. I really don't know anything about JS so I need all the help I can get. I found this free script that helped me create pop-out menus for my website, and they work, but I still have a couple questions about some minor issues that I have not been able to find any answers to from Googling or anything. Most importantly, how can I get the menus to adjust location wise automatically (i.e. because everyone may have different screen resolutions)? I've tried it on a couple resolutions now (different computers) and it definitely only works when I'm using the one that I created it on. When I go to a another computer its waaayyy off to the right or something of where it needs to be. Secondly, and its not as big of a deal but would be nice to know..I've got like 4 menus. Because I used this script it created all the menus to be together, I guess, in one .js file. The menu items (words) I'll be using for/on each menu will be different lengths. Is there a way for me to make each menu a different width to accomodate for this (or not because it all refers back to the one .js file)? I understand that if I have a short word and a long word on the same menu itll have to be long on that menu but for the seperate menus I'd like to adjust the width. And the reason I'm concerned about this is because I noticed that only when the mouse is over the text is that item active and clickable but if there is extra white space (without having added " ") that item is not clickable. (And of course for appearance sake, the menu would be more attractive if it was only as wide at the words.) Below I am posting the section of the script that is actually on my page, not what is in the .js file. From this I have adjusted the (0,0) values to be right for the computer i'm on but is there some other thing that can be added in the ( ) to tell it to adjust or something. And from this as far as I could tell there is only one spot to adjust the menu width which I did, but like I said above, this looks like its set up to only be able to do it for all of them and I don't know the correct way to do it for them individually. I have not tried messing with the code much because I don't want to mess it up. [code] mainMenuColor="#9763ca"; menuItemColor="#490070"; highlightColor="#00e000"; borderWidth=1; borderHeight=1; paddingWidth=1; paddingHeight=1; itemWidth=175; itemHeight=20; hAlign="left"; vAlign="middle"; itemTagsOpen="<font face='arial' style='text-decoration:none;color:#FFFFFF' class='anchorClass'>"; itemTagsClose="</font>"; menuDelay=0.3; addMenu(525,253); addMenuItem("Mission ","http://www.site1.com",""); addMenuItem("Philosophy & Functions","http://www.site2.com",""); addMenuItem("Conceptual Framework","http://www.site3.com",""); addMenu(630,253); addMenuItem("Item #1","http://www.site1.com",""); addMenuItem("Item #2","http://www.site2.com",""); addMenuItem("Item #3","http://www.site3.com",""); addMenuItem("Item #4","http://www.site4.com",""); addMenu(800,253); addMenuItem("Item #1","http://www.site1.com",""); addMenuItem("Item #2","http://www.site2.com",""); addMenuItem("Item #3","http://www.site3.com",""); addMenuItem("Item #4","http://www.site4.com",""); addMenuItem("Item #5","http://www.site5.com",""); addMenuItem("Item #6","http://www.site6.com",""); addMenuItem("Item #7","http://www.site7.com",""); addMenuItem("Item #8","http://www.site8.com",""); addMenuItem("Item #9","http://www.site9.com",""); addMenuItem("Item #10","http://www.site10.com",""); addMenu(975,253); addMenuItem("Item #1","http://www.site1.com",""); addMenuItem("Item #2","http://www.site2.com",""); addMenuItem("Item #3","http://www.site3.com",""); drawMenus(); [/code] Thanks for any help, I really appreciate it.
  2. Thank you for pointing out what a n00b I am, hehe. I had considered that before but for some how/ reason I got the impression it was happening somewhere in there but the more I read it the more I didn't see it I just hadn't tried it cause I was just sure there was something else I was missing. Guess ya should always go with instinct and try EVERYthing even when ya dont THINK its right.. Anyway thanks again
  3. thats all the info there is, in that file. its not connectdatabase because the absolutely only thing that does is connect to the database and 1. it said it was successfully at doing so and 2. that function is used many many many times on every page of the site. i actually did try running it in phpMyAdmin and hard coding values in works just fine And as shown above the result of echoing it in IE was "1"... and when it does that it leaves that row blank in the DB
  4. I'm really horrible at this stuff (and new) and have no clue really but is there a possibilty that grouping [x BETWEEN 460500 AND 461000 OR y BETWEEN 199000 AND 199500] together might help...I think im trying to say so that it looks for 3 sections of infomation (the Parish, ParcelID, and then that group)..?...or maybe put x and its numbers and y and its number to variables..?...maybe using the group by clause..?... Sorry, I duno..just thought I would say a couple ideas that come to mind...
  5. //Call connection to database require("Connect.php"); $intHorseID = $id; //Update the Record //Create an update query string with the updated horse data $strUpdateQuery = "UPDATE horses SET horse_name = '".$strHorseName."', horse_dob = '".$intHorseDOB."', horse_sex = '".$strHorseSex."', horse_height = '".$intHorseHeight."', horse_color = '".$strHorseColor."', horse_sire = '".$strHorseSire."', horse_dam = '".$strHorseDam."' WHERE pk_horse_id = ".$intHorseID; //execute the query $rsModifyResult = ConnectDatabase($strUpdateQuery); echo $rsModifyResult; echo "<b><h3>Horse record successfully modified!</h3></b><br>"; gives me... [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]Succeeded in connecting to the database. 1 Horse record successfully modified!
  6. *sigh* seems like I can't find answers to anything on my own...sorry for asking so many questions.. I'm not getting any errors but its not updating the datbase either. //Create an update query string with the updated horse data $strUpdateQuery = "UPDATE horses SET horse_name = '".$strHorseName."', horse_dob = '".$intHorseDOB."', horse_sex = '".$strHorseSex."', horse_height = '".$intHorseHeight."', horse_color = '".$strHorseColor."', horse_sire = '".$strHorseSire."', horse_dam = '".$strHorseDam."' WHERE pk_horse_id = ".$intHorseID; The variables are being passed from a form on the previous page, and I have checked the spelling and I've tried using only ' instead of " and ive tried using the query with out . around the variables but nothing. Sometimes its actually not fun not getting errors...
  7. Get the same "not valid result resource" error.
  8. ConnectDatabase is my function (which is in a file im "requiring") to connect to the database. And it is connecting, know so because theres a line in it saying "Successfully connected to the datbase. Ok the explaination makes sense of what $intDelete would = but I need it to be one line and not havta list all the numbers...I had tried making it $intDelete = $_POST['id[".$i."]']; but of course that didnt work.. .......
  9. I think programming just has a curse against me or something. I seem to get the weird errors, being that for this one my line of code that I feel is sure is causing the problem is exactly like all the examples I've been able to find on the net...so this is very frustrating. I have two pages for Deleting the first is the selection page, lists the records with checkboxes next to them for the user to select and then a Delete button that passes to the second page. My first page shows up just fine. So here's a line from my first page just so ya can see the name i'm using for the checkboxes.. echo "<input type='checkbox' name='id[".$i."] value='".$arrHorses['pk_horse_id']."'>"; The second page is suppose to get info for which records to delete from the first page and execute such a query. Then display the name of the records that were selected and say they were successfully deleted. Its connecting to the database just fine. But I'm getting a "not a valid result resource" error. arg, seems to be the error I always get. Here's the important code for that page that I have thus far: //store the Horse_ID passed from the previous page in a variable $intDelete = $_POST['id']; //Query to delete the record passed to it from the previous page $strDeleteQuery = "DELETE FROM horses WHERE pk_horse_id = $intDelete"; //execute the query and save the result set in $rsHorse $rsHorses = ConnectDatabase($strDeleteQuery); for( $i = 0; $i < count($id); $i++) { //get a row of data and store it in $arrHorses $arrHorses = mysql_fetch_array($rsHorses); //echo records that were deleted echo $id[$i]; echo "<br>"; //Give confirmation it was completed echo "<h3>Successfully deleted selected record(s).</h3>"; echo "<br>"; } Please help me figure out how to get it to delete the records. I have a strong feeling this line: $strDeleteQuery = "DELETE FROM horses WHERE pk_horse_id = $intDelete"; is the problem but that is exactly how all the examples I looked up were structured so I can't figure out why its causing problems. Thanks!!!
  10. Woohoo...got it figured out... I manually reset the numbers and tried adding another row and it still skipped numbers. But I just had misunderstood what was being told to me to fix it...it was just different ways of thinking So after reading some more about the issue I finally saw what I was doing wrong. Thanks, yet again!
  11. I did the same thing...I accidently added some rows that werent suppose to be there, deleted them, added the current data and now its misnumbered - skipping a block of numbers of the deleted ones. I tried what was suggested here but it had no effect on my table... any other ideas? I'm tryin to start my numbers at 100, but i tried the 1 like suggested here too and it didnt do anything either. no errors just nothing happens..
  12. YAY!!! It all looks pretty now...first I wasnt sure if id get the column headers to work too but their in the right way now and even bold Thats so awesome, it worked for the result set part, even with the table! Thank you!! The other person had totally left off the $ for the J's and i caught it and added it in but guess i just missed one. Thanks again so much for ur help! So appreciated!
  13. Ok, I tried to add some code that someone else suggested to display all the results and the table to make it look pretty but it doesnt display the results (no errors) - just no info on the page.... I also tried to put my column names in a table to make them pretty and they echo out but not in a table....I feel so stupid, I know HTML (altho I hate table code) but I guess since I'm new to PHP and all I dont know how to implement it well into the PHP... help, again, please?? Thanks!! P.S. I tried the code listed here too and got the same thing....no info on the page, no error just no info displayed... I know I sound like a really dumb newbie..hehe [!--PHP-Head--][div class=\'phptop\']PHP[/div][div class=\'phpmain\'][!--PHP-EHead--]//Display column names echo \'<table><br>\'; echo \'<b><td>Horse ID</td>\', \'<td>Horse Name</td>\', \'<td>Horse DOB</td>\', \'<td>Horse Sex</td>\', \'<td>Horse Height</td>\', \'<td>Horse Color</td>\', \'<td>Horse\\'s Sire</td>\', \'<td>Horse\\'s Dam</td></b><br>\'; echo \"</table>\"; //Display the list of records in the Result Set. //Get the number of rows in the \"horses\" table and store in $intNumRows echo \"<table>\"; $intNumRows = mysql_num_rows($rsHorseList); for( $i = 0; $i < $intNumRows; $i++) { echo \"<tr>\"; $arrHorses = mysql_fetch_array($rsHorseList); for($j = 0; $j < 30; $j++) { echo \"<td>\".$arrHorses[j].\"</td>\"; } echo \"</tr>\"; } echo \"</table>\";[/span][!--PHP-Foot--][/div][!--PHP-EFoot--] Keep in mind of course theres code above and below this..but this is the section that isnt doing anything..
  14. Also, besides "\n" not creating a new line, I am also not able to get "\t" to create a tab. Anyone on any ideas how I can get tabs between the column names that I have now echoed in and then when the results are displayed a tab between each field as well? Trying to format it a lil better so it doesnt run together and so it can be read easily.
  15. I'm not good loops, one of my least favorite things, can you possibly give me an example of how it would work? Thanks! Side note: another weird thing is in my latest version of my document "\n" is not making a new line! Its only making a nonbreaking space...computers are weird!
  16. Hmm..Ok, havent tried it yet. I would have thought that since I selected all (*) that there would be a way to display it all with a word or symbol instead of having to list all the field names. I believe you thats what has to be done. I just thought that would have been the purpose of selecting all of them in the first place. Codes a funny thing!
  17. Hey everyone, This is probably a really simple newbie question but I've been reading my book on this stuff and looking through posts and cant find something similar. The deal is I want echo the information I stored my array of the result set. I got it to work if I ask it for one field, like the name, but how can I get it to display all the fields for one item and then list the next item and its fields on a new row, etc. The code ahead of what I'm going to post works, because it is just asking for the connection to the DB and I already tested that part. [!--PHP-Head--][div class=\'phptop\']PHP[/div][div class=\'phpmain\'][!--PHP-EHead--] //Creates a List Selection query. $strListQuery = \"SELECT * FROM horses ORDER BY horse_name\"; //Select database mysql_select_db($strDbName, $conMySql); //Query the database and store the Result Set. $rsHorseList = mysql_query($strListQuery); //close the connection to the database mysql_close($conMySql); //Display the list of jokes returned. //Get the number of rows in the horse table and store in $intNumRows $intNumRows = mysql_num_rows($rsHorseList); //for each row for( $i = 0; $i <$intNumRows; $i++) { //Get a row of data and store it in $arrHorses $arrHorses = mysql_fetch_array($rsHorseList); //display the record of each horse echo $arrHorses[\'\']; //close anchor tag } [/span][!--PHP-Foot--][/div][!--PHP-EFoot--] I know my problem is at the end with how to display it...I just dont know what else to try. I realize what I posted is an empty set and well isnt displaying anything. Thank for any help!
×
×
  • 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.