Jump to content

mainewoods

Members
  • Posts

    685
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling
  • Location
    Maine

mainewoods's Achievements

Newbie

Newbie (1/5)

4

Reputation

  1. try: <select name="fontSize" onchange="fs(this.options[this.selectedIndex].text)"> you should be able to lose the 'value' clauses with the code above and just use the text between the option /option tags.
  2. the proper way to code events like that is to just to leave off the () req.onreadystatechange = processReqChange; // specifies a function with no parameters --when you do that, one parameter is considered to be passed to the function, the event object: function processReqChange(eventobject) { --the 'this' keyword will also be accessable within in the function
  3. how come you don't just put the return false last? onsubmit="q14();window.top.frames['chatadd'].location.href='http://site.com';return false;" --that would keep the form from actually submitting and load a new url in one of your frames
  4. js functions have to be included in the html head to be accessable later. What I've read is that using type="text/javascript" is better than the older language="javascript"
  5. to change a forms action url on the fly, do this: document.formname.action = 'new url'; document.formname.submit();
  6. What spambots are you talking about, email harvesters or guestbook spammers? There are a bunch of known techniques for stopping Email Harvesters dead using javascript and/or 'entity substitution': http://www.google.com/search?hl=en&q=hiding+email+from+spambot To stop spambots from entering spam into your guestbook or other web app, the best choice is a 'Captcha' script. If you search around, you can find many free php 'Captcha' scripts. http://en.wikipedia.org/wiki/Captcha
  7. If you passed the session id via the url, then it would have no effect in stopping spambots. The spambot would get it's own session id via the url and would have no problem in harvesting email addresses.
  8. Just make your stats call through ajax and no spam bots will activate it. Php cannot detect if js is turned on or not. js can set a page refresh with a url passed field so the next php invocation can know whether js is on but that's ugly. SESSION vars are based on cookies, so if anyone has cookies turned off, it would fail for them as well. The percentage of people who surf with js off is about 5% - 10%, not too bad. An alternate approach to ajax would be to do browser detection php side and only do your stats for browsers on your list.
  9. should be enclosed in double quotes as well: onmouseover = "this.style.backgroundColor = 'red';"
  10. You could use ajax to retrieve yourtest.php after the page loads. Unfortunitely, any content hidden from spam bots that way would also be hidden from search engines. The only thing you really need to hide from the spam bots are email addresses so the real question you should be asking is 'How do I hide email addresses from Spam Bots?'. http://www.google.com/search?hl=en&q=hiding+email+from+spambot
  11. put 'Color' on back of 'background' (capitalize the 'C') onmouseover = this.style.backgroundColor = 'red' -General rule: to access from javascript a css attribute that normally has a '-' in it, remove the '-' and capitalize the first letter of the word following it.
  12. did you switch variable names in these statements: [code]$user_id = $_SESSION['user_id']; echo $owner_id; [/code] $owner_id is not defined but is used in the sql below instead of $user_id which you meant I think
  13. I'm not sure about this, but I believe if you want to change the primary key field of a row, you have to delete the old row and then insert a new record and specify the new primary key explicitly.  Your $prodnumber  looks like the primary key.
  14. On shared hosts the php.ini file is usually not accessable.  Pretty poor php host that doesn't already have the hash and encrytion functions installed!  Those are essential for lots of web apps.  I'd ditch that host if I was you and maybe try: http://www.webhostfreaks.com/ --associated with this web site --usually have some low cost hosting packages allowing php and mysql with cpanel!
×
×
  • 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.