Jump to content

Ninjakreborn

Members
  • Posts

    3,922
  • Joined

  • Last visited

Everything posted by Ninjakreborn

  1. I tried that, but it got too messy, what I was wondering is there a way to insert a newline(to show up when it emails) into the email variable like for instance here is what I have [code]     if(!mysql_query($insert))        echo 'The information could not be inserted into the database';      else        $name = $_POST['name'];        $email = $_POST['email'];        $to = 'businessman332211@hotmail.com';        $subject = 'Funny Email Forwards Sign up Notification';        $message = "This is a confirmation to inform you that";        $message .= "you have been signed up to the Funny Email Forwards";        $message .= "Newsletter.  If you choose to unsubscribe please visit";        $message .= "The website again to unsubscribe.";        $message = wordwrap($message);       if(mail($to, $subject, $message))        echo "You have been subscribed successfully<br />";       else       echo "There was an error sending an email";       }    @mysql_close($connection);    $to = "businessman332211@hotmail.com";        $subject = "Funny Email Forwards sign up";        $message = "This is a notification letting you know that {$name} has";        $message .= "signed up to the news letter using {$email}.";        $message .= "notification is coming from Funny Email Forwards.com";        $message = wordwrap($message);        mail($to, $subject, $message);[/code] The word wrap's weren't there before but I still tried it. But what is happening is before when I did the long message with all of it on the same variable it worked out, but I wanted to do it a more "professional" way. Atleast I think, it's more professional. But now that I am starting to do that, I don't understand how to put in spaces, I have 2 words close together, my email, and notfication are stuck really really close together. I would like any advice on this that would help, also someone told me, AND IT WORKS< that you don't have to close most control structures, I never do any more and it works great, and it is easier to read, and I was told you don't need brackets around if, elseif(whatever, else statements unless you have 2 or more statements attributed with that control structure, that the brackets were to contain the insides but i Started doing it formatted like above, and it seems it's a lot easier for me to understand/read/workon, that is was before I tried figuring out where all my freaking brackets went, I am going to check the manual later for more information on whether it is allowed, and to what degree, and get some recommendations from w3schools, I would like to hear some advice feedback from here on this as well. Also mysql_real_escape_string() was givin to me as advice, is there anything else I could use in it's place or with it to make it safer even more. These are just some general questions I am confused about, I know one has to do with a little mysql but it's still a php function, so to avoid confusion here was a run down of what I was asking. 1. How to insert a newline into a variable easier. 2. About the control structure and everything, advice/feedback/information, anything anyone wants to offer for clarification purposes. 3. Any other functions that can be used to replace mysql_real_escape_string, maybe what it really does, I looked it up, but it's confusing, I don't understand why it's needed, and I see alot of other very, very experience php programmers not using this, but this advice was given to me by someone I really trust, and have a dear friendship with, but I always like double checking, getting other peoples opinions, and everything else. 4. Again I am open to any advice about anything now, I was a little passive/aggresive at first, not willing to listen to other advice, but I am not going that route any more, I have other advice about a lot of things I am willing to take from anyone, because I now realize just because I hear advice I don't have to necessarily take it right then or at all, but it's still nice to have the opinions and ideas behind various philosophies, and theories, people's personal styles and related subjects. Any advice appreciated, thanks.
  2. Is it better to do it like this $message = " Hello this is an example more words more words sentences sentences lots more words on down for awhile "; That is how I use to do it instead of $message = "Welcome to my website, I hope you are finding"; $message .= "your stay here warm and welcoming"; And so forth which one is better.
  3. How do I enter a newline character into a value, I have a mail function, my $message fields are pretty long and I was wondering how to enter a newline character into it, wherever.
  4. How do I pass variables into message, I tried but it doesn't work I am sending one email to the person signing up to let them know they were added, and I was sending one email to my client letting him know someone signed up and who. What I need to figure out is how to get to pass the variables in where I need to like the name and email I tried a few different things but nothing worked thanks.
  5. ok I took barand's advice, and andy's and someone from somewhere else I redid a large portion of my script, it works fine, I am now trying to integrate the mailing function, I would like any more advice, opinions, or anything on relating to any subject related to this. Thanks for all the help so far, I was told that you didn't have to close the control structures is that true or no, because the last control structure on that one, Here is the new code based based on advice given [code]<?php if (isset($_POST['subscribe'])) { $error = ""; if ($_POST['name'] == '')    $error .= 'The name field was filled in incorrectly, please correct<br/>'; if ($_POST['email'] == '')    $error .= 'The Email Field was filled in incorrectly, please correct.<br />'; if ($_POST['verifyemail'] != $_POST['email'])    $error .= 'The email Fields Do Not match, please correct.<br />'; if ($error != "")    echo $error; else {    $connection = mysql_connect('localhost', 'assmongers', '2centsandabarolofcrap');    $selectdb = mysql_select_db('funnyemailforwards');    if(!$connection || !$selectdb)    {      echo 'Problem during database connection or selection';      echo mysql_error();    }    else    {      $insert = "INSERT INTO tablefrometernalhell (name, email) VALUES ('" . mysql_escape_string($_POST['name']) . "', '" . mysql_escape_string($_POST['email']) . "')";      if(!mysql_query($insert))        echo 'The information could not be inserted into the database';      else        echo 'successfuly completion of all processes';    }    @mysql_close($connection); } } ?>[/code] Well that's it, any advice suggestions or whatever I would be glad to hear them.
  6. Thank you so much for advice, feedback and opinions barand, I removed that string setter up there, I changed the thing to = 'whatever' instead of using that operator, and using print. I made all those changes, thanks for the advice, any more would be appreciated.
  7. I like that advice, can you show me some kind of open example, the reason is, I was attempting a few forms of indentation, but when I write my variables, that have longer text, and I end up having to have part of the variable on one line and the other part of the variable trailing down, is this ok, see if you go to [a href=\"http://www.funnyemailforwards.com/signup.php\" target=\"_blank\"]Look at source code[/a] and you look at the source code you will see what I am attempting to start doing with my html, any advice on that too would be appreciated, and examples for the php I can start following would be nice too, any advice as well about up there, what might be causing that error, or how I can do some of the stuff I asked, any help appreciated, especially advice, opinions or anything else i learnt 2 days ago, doing things my own way is good, but I can integrate 10 peoples ideas, and throw in my own fun stuff for the hell of it, and have a great time, with a much better programming ability.
  8. Ok I have actually tried for my first major script, I was doing great, I followed some advice, put together my own ideas into it, and came up with the perfect solution for validation and email, now I was trying to get a little fancier and throw in some other stuff, I also upgraded the way I coded xhtml/css and started doing it more neat, and more commented, on my site I said that that's what I believe, and I was trying now to go even further, I also read a post on here from someone named crayon violent and I started following advice so far as far as general structuring of php and it's helped a lot, I know I am not that good at structuring it yet but I will get better. Here is the problem I am encountering, and need help with. [code] <?php if (isset($_POST['subscribe'])){     $error = ''; if ($_POST['name'] == '') {     $error[] .= print 'The name field was filled in incorrectly, please correct<br/>'; }if ($_POST['email'] == '') {     $error[] .= print 'The Email Field was filled in incorrectly, please correct.<br />'; }if ($_POST['verifyemail'] != $_POST['email']) {     $error[] .= print 'The email Fields Do Not match, please correct.<br />'; }if (is_array($alert)) {     foreach($error as $key => $correctthis) {     echo '$correctthis'; >>> }else{ $connection = mysql_connect('localhost', 'cantsay, 'definitelynote'); $selectdb = mysql_select_db('stillalittletoomuchinfo');     if(!$connection && !$selectdb){     print 'Problem during database connection or selection';     }else {     $insert = 'INSERT INTO cantsaytablename (name, email) VALUES ("{$_POST[name]}", "{$_POST[email]")';     }if(!mysql_query($insert)){     print 'The information could not be inserted into the database';     }else{     echo 'successfuly completion of all processes'; free(); disconnect(); } }; [/code] It tells me that the else statement isn't good on a specific line, here is the error. [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]Parse error: parse error, unexpected T_ELSE in /home/all/funnyemailforwards/public_html/dbprocessing/signuphandler.php on line 13[/quote] I marked the line in the php. I am trying to create a double contact form, but there's nothing to see in the php file, and I was so damn stupid I just about left my password and username, and database name in the code, that would have been very very bad. But anyway what I was wondering is a few things, I marked the line the error is coming from in the code with a >>>. What I need to figure out is, well I am setting up a subscribe and unsubscribe for a newsletter, so people can enter there email address to recieve the funny emails, right now I am trying to set the script for if they click submit on subscribe, that works, it validates, my error statement I took from all this worked out as well. I got all that, but when I started adding in database code I can't get it working. What I need help with is what am I doing wrong, I also need to somewhere wire in there, something to still email it to him, I am wanting to email him if the WHOLE process is successful for instance, if the error validation passes, the and all the database processes finish, then it send an email, then close the database and free. The questions I want to ask is why isn't this working here, how do I try and wire in the mail function properly. What about free and disconnect() how do I specify the connection I want closed. Do I need to do anything like remove slashes or anything specific before database entry that I am forgetting, The reason I am asking is magic quotes is on, I checked on his database phpinfo() information. But what I am wondering is are there any suggestions on 1. why this isn't working. 2. How to make it work. 3. How to integrate the mail program, and properly free and close the database connection. 4. ANY AND ALL advice about how I could do this differently, better ways to do certain parts, ANYTHING that involves advice on new ways to do this or anything. 5. IF there is ANYTHING I can POSSIBLY do to add any more security to this script when it's complete, I am trying to learn a hell of a lot at once, once I get this script to work, I am writing one below it for isset($_POST['unsubscribe'])) and doing exactly the same thing for it, except removing the database information instead, any advice would be great, I am at a critical learning point, to where I have almost pulled over the learning curve, and most of all I am starting to get new scripts ideas, how to work things differently, I am almost finally over that hump, any help would be appreciated.
  9. SOLVED- Just had to remove the comma from that last entry, thanks for the help [img src=\"style_emoticons/[#EMO_DIR#]/wink.gif\" style=\"vertical-align:middle\" emoid=\":wink:\" border=\"0\" alt=\"wink.gif\" /] I have never been so pissed in my entire life currently I want to smash this computer into a thousand pieces, I entered the right syntax but it keeps giving me an error. do I have to slam it into mysql [img src=\"style_emoticons/[#EMO_DIR#]/unsure.gif\" style=\"vertical-align:middle\" emoid=\":unsure:\" border=\"0\" alt=\"unsure.gif\" /] MySQL 4.0.26 I am trying [code]CREATE TABLE signoninfo ( name char(40), email char(80), );[/code] it's giving me some syntax error everytime for line 5 and that is where my ); but I have tried every other way possible, I am really really getting pissed, any advice would be greatly appreciated. I went so far as to try copying and pasting an example from the manual, it worked, but then I did the samething with mine and another error.
  10. ok that was a typo, atleast I know what to use now, thanks for all the help
  11. Yes now I do, so I should rely on isset when I am checking something like 2 different submit buttons on the same form, and I should use = "" when it is just checking one right. Thanks for all the help so far, I really appreciate it.
  12. I appreciate the help so far, any other advice, would be helpful as well, I was thinking that about isset, honestly ober, what do you recommend I use for now. isset or = "" from now on, Is one more secure than the other, should I try and alternate, which do you normally use. The other thing I wanted to say was sorry, from now on, with larger question sets I will put them in misc.
  13. This is the time of year, where I calculate all the things in php I do not understand, and ask for help from people I trust know the answer, and have helped me this long time, I have come a Long ways towards mastering php/sql. Using mysql and other things. I have noticed I am particularly interested in 2 things, so I spent a very long time studying these, I am very good with PHP Security, and performance, now all I need to do is get better with actually working with php, and utilizing it, here are some questions I couldn't find answers to, and might allow me to step over that learning curve I have been trying to work over for so long. If you have the answer to one I would be happy to hear an answer, anything that would help or point me in the right directions would be greatly appreciated. 1. ok I know about 3 files that I want to totally learn a bout how to use and how to control. The .htaccess, the php.ini, and the httpd.conf. I found a great tutorial here on php freaks to help me answer ALL my questions on php.ini, it explains it very well, and the php manual has some good info on that, I wanted to study that soon, but does anyone have any idea on where i can find decent/good resources on the other, I don't know where these originate, and searching for the just file extensions and related searches in google brought up nothing. 2. One specific question I had was about httpd.conf, where do I get access to this file at, studying security I ran across some information, and I am trying to make it a habbit to always(and encourage clients) to to change the Server Signatures, and Server Tokens. I want to make this a habbit but don't know where to access the file at, or how to get access to it with web hosting companies. 3. ok this is very important to me, I have run across some functions in a book, and triple cross referenced it, the best practice I see would be to do this with everything but I don't understand the process, and cna't find any good resourced on it to answer my specific questions. it's relating to incryption and decryption like this. [u][i][b]Encryption[/b][/i][/u] [code]<?php     srand((double)microtime()*1000000 );     $td = mcrypt_module_open(MCRYPT_RIJNDAEL_256, '', MCRYPT_MODE_CFB, '');     $iv = mcrypt_create_iv(mcrypt_enc_get_iv_size($td), MCRYPT_RAND);     $ks = mcrypt_enc_get_key_size($td);     $key = substr(sha1('Your Secret Key Here'), 0, $ks);     mcrypt_generic_init($td, $key, $iv);     $ciphertext = mcrypt_generic($td, 'This is very important data');     mcrypt_generic_deinit($td);     mcrypt_module_close($td);     print $iv . "\n";     print trim($ciphertext) . "\n"; ?> [/code] [u][i][b]descryption[/b][/i][/u] [code]<?php     srand((double)microtime()*1000000 );     $td = mcrypt_module_open(MCRYPT_RIJNDAEL_256, '', MCRYPT_MODE_CFB, '');     $iv = mcrypt_create_iv(mcrypt_enc_get_iv_size($td), MCRYPT_RAND);     $ks = mcrypt_enc_get_key_size($td);     $key = substr(sha1('Your Secret Key Here'), 0, $ks);     mcrypt_generic_init($td, $key, $iv);     $ciphertext = mcrypt_generic($td, 'This is very important data');     mcrypt_generic_deinit($td);     mcrypt_generic_init($td, $key, $iv);     $plaintext = mdecrypt_generic($td, $ciphertext);     mcrypt_generic_deinit($td);     mcrypt_module_close($td);     print $iv . "\n";     print trim($ciphertext) . "\n";     print trim($plaintext) . "\n"; ?> [/code] With this I want to get in the habit of ALWAYS encrypting all data before emailing form information or entering into a database, and decrypting it, but I don't understand the how and when, do I encrypt after validation before emailing, or databasing. If so then when do I decrypt, encrypt before emailing, when it reaches the clients email address( the person I am working for) can he read it, or am I understanding this wrong. I really want to get this down, and master these if this is helpful, if it's usless for that, then what can I use it for what type of things. 4. I want to find more books, I have a few on photoshop CS2, and the JavaScript bible newest version, and PHP In a Nutshell which I am not happy with because it cut everything out from the online version that I needed. I want to find some really good books on javascript(not really, js bible is good), php, sql(mysql or others), and especially some general databasing, web site security anything, I really want to get better books, I could yes get them myself "google" it or however, but I am wanting some personal advice from people who bought specific books and recieved very good usage with them. 5. If I fclose() a file inside a script, and lock it with flock() completely, will someone be able to open the file using a url if it's live or is that a good way to prevent people from getting to a part of the site, like I could flock() a db connection page, using like 3 other pages, isn't that like triple lock to prevent people from opening it, or doing anything with it through a url. Just a general inquiry, I don't know about this, I was just wondering it was a theory. 6. This is really important to me, one thing I am trying to find out here is about opinions. What is better honestly. I use external .php files with forms, but I can do it that way, I tried doing same page, and it failed horribly, I completely sucked at it, I know that I love doing external when I am doing database connections, or whatever else, and when you click submit and it comes up with the errors, they click back the information is still there without them having to retype the data in. What I was wondering about this was what are the pro's and con's of each one from personal opinions and perspectives. I know that I prefer the external because It gives me more room to play around, I can have more fun with less distractions, and if I decide to do some huge scripts or try to get fancy, I have plenty of room to do whatever I want, I also heard some people keep db connections on another file, and include it, I tried this and didn't like it, it seemed just harder to use, I only like using 1 external file, but I wanted to learn how to do same page when doing really small contact forms, because I thought it would be a lot quicker, 5 hours fighting with a same page file, then I switched over to an external file and it worked perfectly. I don't see the point in going through the hassle. 7. The reason I don't understand classes is because it's always use as examples relating to people or real life situations, but the bad thing about that is: when I see a dog/cat class, I cna't create a dog/cat in a php function and use them, what can I do with that but print out bark, or meow, I can't make a cat materialize, and work with it and make it shit and piss, and meow with shit() piss() meow() I just don't understand how this works, how is a class utilized on a php file, what kind of things, for instacne can a class come in when doing forms, if so I mean I read all the material given to me last time I asked, I have read through tons of tutorials, and books, but when it comes to classes, I get nothing but real world explanations, once I understand the concept of how it relates to php I will have an easier time keeping up with it when referring to real world scenarious. 8. Why are there so many ways to validate form information, what in fact is the right/wrong way, or are no way's right or wrong, I don't understand this at all, I do it the way you saw earlier in other posts, I tried wildteen88's way but always get errors around the foreach statement, I tried other methods seen on here, some of them worked but didn't match my style of coding, it didn't feel good, or have fun, programming those, as compared to other ways I have tried, how do I find the right kinds for me, this has been puzzling me for quite some time. 9. Is it good to use harden php, the act of [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]This is a set of patches to the PHP source code that make the task of hacking your server by exploiting PHP that much harder. Hardened PHP is not an official PHP project, and so cannot be relied upon to be as stable as the core PHP release, however it is just a set of minor patches and so isn't likely to affect stability at all. [/quote] "quoted from php in a nutshell" Is this something I need to be aware of, study on, or try to implement on a regular basis, or should I avoid this, what is the point. 10. Is there a book out there that is "javascript is to javascript bible, as php is to whatever the book is." I see the js bible and it has everything, and anything I will ever want, I never will NEED another javascript book, I may get more for extra reading, but i'll never really need one. I want to find the same one in php, without it being the php.net manual. because I know not all of the functions are documented, I wanted a really good book for that, and so far haven't found anything, something in a book for when I am not working, or my wife is on the computer, and I don't feel like doing other things I can still study. I got everything from php in a nutshell I could I have reread it 4 times, on and off, and double checked sections numerous times but they stripped so much from the online version it's not even worth it. 11. ok this is about the eval function, quoting the book "php in a nutshell" as it quotes the owner(or creator) of php, as him saying [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]Rasmus Lerdorf "If eval() is the answer, you're almost certainly asking the wrong question."[/quote] With me seeing that, the book also comments [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]That is, you should be able to achieve your goals without resorting to eval().[/quote] With this being said it is obviously trying to tell me without an explanation about eval() being bad, ineffective, or a security issue. What is the reason for him saying those things, does anyone on here use eval() what are the positives or negatives, and why is it so severe that the owner himself would comment on it specifically like that. If it was so bad, why doesn't he just remove it from the newer versions of php instead of letting it re-enter new versions, because by what he says it's not good to use. 12. The same with register_globals, I hate them, I always keep them off, if there not off I force them off, but why didn't the creator just remove them out of 4-5 when he found out, within 2 years everyone would have upgraded there scripts. 13. Why are so many 3rd party scripts insecure as in they require register_globals on to use them, that prevents me access from most major third party scripts, I even had os Commerce, and Zen Cart tell me register_globals had to be set as on to be used, I just cna't have that, forcing me to do something new every time. 14. why is it that sometimes when I use empty it works and sometimes I have to add a ! at the beginning that confuses me. 15. Someone told me that using isset to pic up information on whether a form was submitted or not does not always work and it's better to use if ($_POST['whateverbuttoniscalled'] == "") instead of if (isset($_POST['whateverbuttoniscalled'])); is this true or was he just a dumbass, that needed to re-learn php, the reason I ask is because this is the way I learnt and he criticized me for it, also he disagreed that register_globals being on was not a security issue, I went past him to his boss, and talked him into changing the server's anyway. Where does he get those kind of ideas(sorry partially ranting, and raving::And no I amnot a girl I am a guy, I just get pissed something:::') 16. Is there a consideration for release of php6, a release date, beta release date, does anyone here know anything that we might be able to expect from new releases. 17. Is mysql 5 good enough for me to be able to utilize affectively, safely, and securely without too big of an issue. 18. Is it better to use Pear Db: when connecting to mysql, is it more or less secure, if so is it part of the core language, or do I have to compile certain extensions. Thanks for all the help I greatly appreciate it.
  14. I did it, but now it doesn't do ANYTHING in netscape, and opera, nothing at all here is the code, EVERYTHING works perfect in ie, and I have some problems with 2 other browsers, but all I have to do is center it. How do I center something in javascript, I have it working in the browsers it's just going to the left when I do it, instead of in the center, how do I get it to center, it does automatically in ie, thanks.,
  15. Ok I got all 3 drawers working perfectly, now what I need to do is figure out how to set up this with the other panel, I need the picture to appear below it, and still have the picture there when javascript is off, I am going to give it a try and see if I can come up with something any advice would be greatly appreciated thanks.
  16. ok also I set this up but got errors, I am trying to debug them but I am confused as to why this is happening, is there a better way to do this, or am I doing this wrong, I have never done rollovers before, so this is a good learning experience. Ok first I created my external file. [code]if (document.images) {      var pic1 = new Image(164,111);      pic1.src = '/indexPgImagesEtc/DrawerInLeft.jpg';      var pic1on = new Image(164,111);      pic1on.src = '/indexPgImagesEtc/DrawerOutLeft.jpg';      var pic2 = new Image(164,111);      pic2.src = '/indexPgImagesEtc/DrawerInMid.jpg';      var pic2on = new Image(164,111);      pic2on.src = '/indexPgImagesEtc/DrawerOutMid.jpg';      var pic3 = new Image(164,111);      pic3.src = '/indexPgImagesEtc/DrawerInRight.jpg';      var pic3on = new Image(164,111);      pic3on.src = '/indexPgImagesEtc/DrawerOutRight.jpg'; function lefttoporiginal () {     if (document.images) {         document.leftoriginal.src = pic1.src; return true; } }; function lefttopon () {     if (document.images) {         document.lefton.src = pic1on.src; return true; } };[/code] The first if statement aside from functions preloads all the images I am currently working with. Those 2 functions set the images to do what they are supposed to do. Here is what I used to connect the js file to the html file [code]<script type="text/javascript" src="huttoniojava.js"> </script>[/code] and here is the full xhtml page. [code]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link rel="stylesheet" type="text/css" href="huttonio.css" /> <script type="text/javascript" src="huttoniojava.js"> </script> <title>Huttonio Brooks: Furniture, Photographic Works, Sculpture and Fine Art Works, etc </title> </head> <body> <div id="BackTransparentFoundation"> <div id="header"> <div id="LogoLayer"><img src="indexPgImagesEtc/HuttBrooksLogo.jpg" alt="Huttonio Brooks" /></div> </div> <div id="left"> <a href="furniture.html" onmouseover="lefttopon()" onmouseout="lefttoporiginal()"> <img name="leftoriginal" src="indexPgImagesEtc/DrawerInLeft.jpg" alt="Drawer In" /> </a><br /> <p class="lefttext1">"Some Really Cool Stuff"</p><br /> <p class="lefttext2">---Amir Efrati, Writer for</p> <p class="lefttext3">THE WALL STREET JOURNAL</p> </div> <div id="middle"> <a href="PhotographicWorks.html"> <img src="indexPgImagesEtc/DrawerInMid.jpg" alt="Drawer In" /> </a> <br /> <br /> <br /> <br /> <br /> <p class="midtext1">"Gold Award, Photography"</p><br /> <p class="midtext2">---Art Stars of California:</p> <p class="midtext3">Discovery Awards" 1994</p><br /> </div> <div id="right"> <a href="Sculpture&FineArtsEtc.html"> <img src="indexPgImagesEtc/DrawerInRight.jpg" alt="Drawer In" /> </a> <p class="righttext1"> "One of the neat things is<br /> Discovering something new,'<br /> said Peterson, who, along<br /> with Bruce Katsiff, the<br /> [Michener Art] Museum's<br /> director, discovered<br /> Brooks... 'We felt his work<br /> had an evocative quality...<br /> a poetic, dream-like quality" </p> <p class="righttext2">---The Intelligencer Record,</p> <p class="righttext3">Bucks County, PA</p> </div> </div> </body> </html>[/code] Now what I am trying to do is get it to work properly, but I need that default image to be the off state incase if the person doesn't have javascript, I think this is the proper way, after pouring through multiple tutorials, and with the js bible at my hands, I took this on, myself, and that was what I created, I decided preloading the images first makes it easier to work with them in the functions for 1, and for another it makes it to where they are preloaded so it doesn't require load time on mouse over. Now any advice on why this isn't working would be appreciated. Oh and the error message I am getting is [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]Line: 17 Char: 1 Error:Object Expected[/quote] It points to an error on the HTML page itself not the external js file, it's also telling me the exactly location of the error is [code]<a href="furniture.html" onmouseover="lefttopon()" onmouseout="lefttoporiginal()"> <img name="leftoriginal" src="indexPgImagesEtc/DrawerInLeft.jpg" alt="Drawer In" /> </a><br />[/code] The error code points to the < in that tag, that is the character, but it's probably telling me something is wrong in my external file, any advice would be appreciated, this is coming along, I am trying to take it slow so I can absorb all of this and memorize it and learn it for future projects, but I am still busting a severe time limit at the same time, and it's becoming difficult for me to have fun because of my other projects, any help to clear up some of my confusion or a better way to do this, or anything would be greatly, greatly appreciated, thanks for all the help I appreciate it.
  17. Ok, I have an idea for that now, the one thing I am wondering most. I tried a test, I put in <script type="text/javascript"> </script> <noscript><img src="mypic.gif" alt="My Pic" /></noscript> I am testing it on my computer, it's not live yet, but when I open my browser to preview it, I HAVE JAVASCRIPT DISABLED, it comes up at the top asking about active content or whatever, with javascript off, that image does not show up, I have to figure out how to get that image to stay there when javascript is disabled, or a browser doesn't support javascript, right now as we speak, I am working on all the functions for the drawer switching, I followed the first advice, because I liked the way it sounded, and I need to learn innerhtml anyway, because I will be starting ajax before too long, I created my divs, named them, and I am working on all of that, it's pretty simple. The problem I am currently having now is When I set up the noscript tags as I showed it doesn't work, how do I get the picture to be there, if they have it disabled, any help would be greatly appreciated, thanks for all the help so far, the reason I can't use a blank image, is because i have a background image, now just a color. I think, I don't understand that well enough yet. I am learning very quickly though.
  18. But then won't it show a big x, I will look into this, the question I do have is will the noscript tag work properly, l wanted to have that pic there automatically for people without javascript.
  19. I also wanted to ask something else, when I do my innerhtml area to set up the new picture, I normally do my functions in another page, so when I set up my noscript tags, do I just put them in the place I want to add the picture for people without javascript, I need that to be there in case if someone doesn't have javascript, I want to do my inner html functions in the external file, just set a div or something, I just need any guidance any one wants to offer, while I do this, thanks,
  20. Hmm I will give that a try, but will the noscript tags, put the image there when someone doesn't have javascript activated, I hope so I will go ahead and start trying to put this together.
  21. thanks, but what about that k=>as something what does that mean, I understand the error message part, and I might start using that but the bottom, I don't understand what that for each statement is doing with the letters.
  22. No, what I am having trouble doing is this. I know all about rollovers fine, but he wants that picture below the text to come up on mouse over, BUT there is no picture there already. This is what he wants 1. On mouse over he wants that drawer to change like it pops out. 2. and the picture below the text to appear when it normally would not have been there. 3. He wants it set up to where if someone doesn't have javascript atleast taht picture appears there anyway, I think I can do that with <noscript><img src="whatever.jpg"></noscript> I think that will handle that but I am not sure any help would be greatly appreciated.
  23. [b]SOLVED-Thanks for all the help.[/b] I could really use some help with this, I know how to do image rollovers, I can make one image switch out for another, fine and easy. But what I don't understand is how to get this to work. [img src=\"http://www.freelancebusinessman.com/images/IndexPageAllLayersShowing.jpg\" border=\"0\" alt=\"IPB Image\" /] Ok In the standard picture, all of those 3 cabinets are back further, this is a cut of them closer, also in the originally draft, the pictures towards the bottom aren't there. What is suppose to happen, is I rollover the normal cabinet picture on the left, it pops out, and the image below the text appears as well. I need to do this for each section, I have done javascript on and off for 4 years, but I steered clear of 2 things, javascript rollovers, and pre-caching images, because I didn't understand, but it's about time I learn, standard tutorials and stuff taught me how to just change one drawer out for another, no big deal, but how do I get the whole thing, I need the bottom picture to appear no matter what, even if the person doesn't have javascript I need that picture to appear, if they have javascript, i need it to be invisible until someone mouses over the link, I just need someone to point me in the right direction it would be greatly appreciated.
  24. ok there is one more thing I need to ask before I even think about trying this, I thought about it, I might like doing it this way more, but what does. [code]foreach($error as $k => $v) {[/code] I want to avoid something that uses single letters, I understand the functionality on this all but the section that I showed, any explanation would be greatly appreciated.
  25. ok I guess I will go ahead and formulate away based on one of the ideas here, as far as today I quit on this project, I am going to my other project, tomorrow I will start trying to work it like I was shown on here, thanks for all the help I appreciate it.
×
×
  • 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.