Jump to content

manix

Members
  • Posts

    219
  • Joined

  • Last visited

    Never

Everything posted by manix

  1. kinda saw that comming .. thanks!
  2. I have this $str variable which say holds "String" and in my comparison I'm checking if it's content is "string" and it is supposed to return true but it isnt because of the case, how do I compare them without the case being an issue ?
  3. but that doesn't make any sense. If I'm making a movies site and I upload info about a certain movie it's going to be exactly the same as it is in IMDb, so they can say I copied it, which is not true ?
  4. Hey guys, I'm curious if there's any way to retrieve the contents of a certain div on a page, say I want to get the title of the movie on this page: click (meaning movie title, "Transformers" in this case) Is it possible? Thank you in advance.
  5. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=windows-1251" /> <!-- <link rel="stylesheet" type="text/css" href="ress.css"/> --> <!--[if IE]> <link rel="stylesheet" type="text/css" href="IEstyle.css" /> <![endif]--> <!--[if !IE]><!--> <link rel="stylesheet" type="text/css" href="style.css"/> <!--<![endif]--> <script src="jq.js" type="text/javascript"></script> <script src="script.js" type="text/javascript"></script> </head> <body> <div id="masscontainer" align="center"> <div id="logo"></div> <div id="content"> <blockquote> <div id="searchBar"> <button id="mglass"></button> <input id="searchBox"/> </div> <a href="add-movie"><div id="addbar" title="Add a movie"></div></a> <div id="leftcol"> <? if(isset($_GET['page'])){ $page=$_GET['page']; $page--; }else{ $page=0; } require('k.php'); $itemID=$page*3; $query = "SELECT `poster`,`title`,`year`,`AdditionalGenres` FROM `movies` ORDER BY `id` DESC LIMIT $itemID , 3"; $result = mysql_query($query); while($row = mysql_fetch_assoc($result)) { echo " <div class='movie' id='".$row['poster']."'> <blockquote> <div class='poster'> <img src='posters/".$row['poster'].".jpg' width='140' height='150'/> </div> <div class='info'> <span class='title'>".$row['title']."</span><br/> (".$row['year'].") <br><br> <strong>Genres:</strong><br> ".$row['AdditionalGenres']." <br/><br/><br/> <span class='moreinfo'>More Info &#187;</span> </div> </blockquote> </div> "; } ?> </div> <div id="pagination" align="center"> <?php echo "<span id='paginationTooltip'>".round(mysql_num_rows(mysql_query("SELECT `id` FROM `movies1993`"))/6+4)." pages total</span>"; ?> <span class="indicator" id="lpage"><?echo$page+1;?></span> <span class="navigator" id="left">&#160;&#8918;&#160;</span> <input id="currentPage" type="text" size="2" maxlength="4" value="<?echo$page+1;?>"/> <span class="navigator" id="right">&#160;&#8919;&#160;</span> <span class="indicator" id='rpage'><?echo$page+2;?></span> </div> </blockquote> </div> </div> </body> </html> css doesnt apply for span "title" and <input id="currentPage" type="text" size="2" maxlength="4" value="<?echo$page+1;?>"/> everything else is fine.
  6. manix

    selectors issue

    K I've been struggling with this for quite some time now and I rly need some help <div> <input/> </div> when input is focused I need div's color to be changed, how do I do that?
  7. Do I need to escape variables passed via link? Is it possible that someone does an SQL Injection via unescaped $_GET variable? (Yes I am using it in an SQL query, not inserting it into a DB tho)
  8. well for instance .title { font-weight:bold; font-size:17px; color:red; } .moreinfo { font-weight:bold; font-size:17px; } these 2 are in the same div (if it makes any difference) and the styling for moreinfo is applying unlike the styling for title Oo I changed a few doctypes to check if it was a single doctype problem and it turned out not to be. I'm using xhtml framework doctype.
  9. As the title pretty much describes it, everything was great before I added a doctype, now that I have, css styling wont apply to a certain class only, why is that?
  10. Hey, I have this brainstorm whether I should store id's as integers or text? I mean in my database, since my IDs start from like 1319129364 which is a rather large number, I was thinking if it would be better to save it as text? Which case requires less memory ?
  11. As stupid as I could be, () solves it..
  12. var CurPic = 1; function Previous(){ CurPic--; if (CurPic==0) {CurPic=5;} $("#picslot").attr("src", CurPic+".jpg"); } function Next(){ CurPic++; if (CurPic==6) {CurPic=1;} $("#picslot").attr("src", CurPic+".jpg"); } $("#larrow").click(Previous); $("#rarrow").click(Next); $("body").bind('keydown',function(e) { var keypressed = e.which switch(keypressed) { case 37: Previous; break; case 39: Next; break; } }); this is a picture slider kind of thingy ...
  13. Heya I need to call a function in straight text just like that and I seem to be having trouble managin in Jquery.. Here's an example $(document).ready(function(){ function MyFunc() { stuff stuff } if(somecondition){call function here) }); how do I do that?
  14. I managed, after taking a look at jquery api, erm I needed that because I'm creating an edit option to my site where users/admins can edit posts, meaning that the post is the div and when you click the edit button the textarea appears on top of it containing the text ^^ here're the functions if someone needs them: $(selector).position().left $(selector).position().top $(selector).width() $(selector).height()
  15. Heya.. So what I need to do is I have a certain div with like 700px width unknown px height and unknown position (auto generated) and I need to place a textarea over that div with the same exact width height and position, how do I do that ? I tried $(the div).attr('width') and height but it didn't rly work out :/
  16. yeah but the latest is for 1.4.x I'm using 1.6.2 :s
  17. Hey, I need a function that copies a span's html (innerHTML) to the clipboard? Thank you in advance.
  18. success.. it was the loop, needs to be 0,29 not 0,30 lol.. do I feel dumb now >.<
  19. Hello, I'm creating this custom encoding function so I can pass cyrillic data through, but it's not really working at all function encodecyr(text) { var decyr=new Array("а","б","в","г","д","е","ж","з","и","й","к","л","м","н","о","п","р","с","т","у","ф","х","ц","ч","ш","щ","ъ","ю","я"); var encyr=new Array(":a!&",":b!&",":c!&","!&",":e!&",":f!&",":g!&",":h!&",":i!&",":j!&",":k!&",":l!&",":m!&",":n!&","!&","!&",":q!&",":r!&",":s!&",":t!&",":u!&",":v!&",":w!&",":x!&",":y!&",":z!&",":aa!&",":ab!&",":ac!&",":ad!&"); var i = 0; for (i=1;i<=30;i++) { text = text.replace(new RegExp(decyr[i], 'g'),encyr[i]) } alert(text); } so it's supposed to turn "а" into ":a!&", "б" into ":b!&" etc.. all it alerts is a enormous amount of "undefined", a little help please?
  20. erm.. okay I just installed firebug and I am looking at the console, there are no errors :? It's sending all the data (in the post tab) I can't understand where the problem is
  21. Erm okay this is not working properly, it sends the request, it handles the response but it's not passing the data? var aldata = 'id='+ 16 + '&comment=' + ($('#comment').val()) + '&startfrom=' + <?php echo $lastid;?>; $.ajax({ url: "usercomments.php", type: "POST", contentType: 'text/html; charset=windows-1251', data: aldata, success: function(returned){ $('#comments').html(returned+$('#comments').html()).show(); } }); in my PHP file I use $_POST['id'] and it says unidentified index 'id' ? I tried both the above example and aldata = "{'id':'"+ u_i +"','comment':'"+ ($('#comment').val()) +"','startfrom':'"+<?php echo $lastid;?>+"'}"; Same result..
  22. because when I pass cyrillic characters through jquery post ajax they get ruined, and I can't really use get method because of safety reasons (not my call)
  23. yeah if it was that simple I wouldn't be posting, see that's the problem I don't have $str <textarea id='comment' class='writingarea'></textarea> <script type='text/javascript'> $.post('usercomments.php', { id: user id here; comment: $('#comment').val() }, function(returned) { $('#comments').html(returned).show(); }); </script>
×
×
  • 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.