Jump to content

cdmafra

Members
  • Posts

    61
  • Joined

  • Last visited

Everything posted by cdmafra

  1. Hello. I'm having troubles disabling right click on images. The website shows the message that is supposed to be shown when I perform the right click, but also shows the right click menu (copy, save image as, etc.). What is the problem with this code (I'm not pasting the tags, only the "body" of the code)? var clickmessage="Clique com o botão direito desactivado nas imagens!" function disableclick(e) { if (document.all) { if (event.button==2||event.button==3) { if (event.srcElement.tagName=="IMG"){ alert(clickmessage); return false; } } } else if (document.layers) { if (e.which == 3) { alert(clickmessage); return false; } } else if (document.getElementById){ if (e.which==3&&e.target.tagName=="IMG"){ alert(clickmessage) return false } } } function associateimages(){ for(i=0;i<document.images.length;i++) document.images.onmousedown=disableclick; } if (document.all) document.onmousedown=disableclick else if (document.getElementById) document.onmouseup=disableclick else if (document.layers) associateimages()
  2. I'm not sure if I understood.. What you mean with that?
  3. Hello! I need to create a dynamic page title and description to my website. However, the content is all generated from "index.php" page (example: the URL of post is [...].net/?id=2 ). So, title and description are the same in all pages, the website only has a "real" php file. So, how can I change the title with this situation? I have a mysql table for news and another for news/posts. Content generator PHP lines: <!-- Header --> <?php if (isset($_REQUEST["id"])) { $query = "SELECT * FROM news WHERE news_id=".$_REQUEST["id"].""; $result = mysql_query($query); $row = mysql_fetch_array($result); ?> <div class="twelve columns"> <div class="row"><h3 class="n3"><?php echo $row["news_title"]; ?></h3> </div> </div> <div class="row"><!-- Row interior--> <div class="twelve columns"> <div class="panel"> <p id="data"><?php echo $row["news_date"]; ?>, <?php echo$row["hour"] ;?> GMT</p> <p><?php echo $row["news_post"]; ?></p>
  4. It's the same thing. There are no ways to set it with a $_user variable or something like that?
  5. I considered, just not found it! Thank you!
  6. Hey! Does anyone know how to implement a date + time (hour/minute) picker? Or, at least, a time picker stand alone? Is that I have a date picker, but I cannot find a code to a time picker... Thank you in advance!
  7. Hello. Is it possible to insert as default value in mysql the username of who is 'logged in' adding a article to the website? Independently of who is the user? Thank you in advance!
  8. Solved... thank you!
  9. Thank you. Where must I insert mysql_real_escape_string(); ?
  10. e
  11. Hello I have a problem with my website. I can publish news normally (even whitout an editing system), but there is always a problem: I can't post news that contains a apostrophe ('), because of an error that I don't understand: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '</p>','','','','','Autos/Pistas')' at line 1 My code to submit news: $publish="INSERT INTO news(news_title,news_subtitle,news_desc,news_post,news_date,hour,news_image,news_image_peq,categoria) VALUES('".$_POST["news_title"]."','".$_POST["news_subtitle"]."','".$_POST["news_desc"]."','".$_POST["news_post"]."','".$_POST["news_date"]."','".$_POST["hour"]."','".$_POST["news_image"]."','".$_POST["news_image_peq"]."','".$_POST["categoria"]."')"; Thank you in advance
×
×
  • 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.