Jump to content

Mudsaf

Members
  • Posts

    462
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by Mudsaf

  1. Hello, i'm wondering what could be wrong when i add lightbox plugin to my website.

     

    On this code below

    /* Preload images */body:after {content:url(../img/close.png) url(../img/loading.gif) url(../img/prev.png) url(../img/next.png);  display: none;}

    It will give error "Uncaught SyntaxError: Unexpected token { " which refers to body:after { part.

  2. There might be some missing quote or something similar in your code. Re-check the code.

    <input type="checkbox" name="category[]" value="category_1"> Category 1<input type="checkbox" name="category[]" value="category_2"> Category 2<input type="checkbox" name="category[]" value="category_3"> Category 3<input type="checkbox" name="category[]" value="category_4"> Category 4

    ^Works fine

  3. Well there is + & - at hosting files at your site.+The file wont get removed any time soon+The load time rely on your server bandwidth.

     

    -If the .js code is hosted at Google for example, many users wont have to reload it. (Basically loads the file from cache if it has been loaded somewhere else)-More bandwidth usage on your server.

     

    I guess these are things i know.

  4.  

    Put it in a box with size restrictions. I'm not sure if this is really a PHP question.

    <div style="width: 600px; height: 600px; overflow:auto;">    <?php echo contents; ?></div>

    If this content has a full HTML document, put it in an <iframe>

    <iframe src="file.php" width="600" height="600"></iframe>

     

    Thanks, the iframe works flawlessly.

  5. Hello, i'm wondering how to align IE text in middle of div. (Chrome works like charm)

     

    Chrome

    post-77947-0-96134800-1398097924_thumb.png

    IE

    post-77947-0-24266300-1398097929_thumb.png

     

    All you might need to know i have

    height: 19px;display: inline-block;vertical-align:middle;
  6. Ah fixed, added if session exist & pasted the jQuery after the check

    <?phpif (isset($_SESSION['<session'])) {unset($_SESSION['<session']);?>$.get('<mypage.php>', function(data) { }); //Blablabla<?php} else {?>$.get('<mypage.php>', function(data) { }); //Blablabla<?php}?>
  7. Javascript runs as it loads, the session only saves its value when the PHP script finishes running, so Javascript starts executing as PHP is running. If you use session_write_close() right after unsetting the value it should fix the problem. You won't be able to change any other $_SESSION values after that, though.

     

    I kind a need the sessions afterwards.

     

     

    Can't you set jQuery to start after the document has rendered except for the images that are loading?

     

    Isn't $(function()) {}); doing it already?

  8. Hello, i'm wondering how my jQuery loads faster than my php-script and how to prevent that kind of action. At jQuery i'm using function.

    $(function() {//Document ready});

    At my page i have this session unset script

    if (isset($_SESSION['<session>'])) {unset($_SESSION['<session>']);}

    And below it

    $(function() {$.get('<mypage.php>', function(data) {//Blablabla});});

    Most of times the session displays non-exist but sometimes it exists

     

    <mypage.php>

    if (isset($_SESSION['<session>'])) {echo "Positive"; //This happens like 1-12 refreshes} else {echo "Negative"; //This happens like 11-12 refreshes}
  9. Hello, i'm wondering how to install Apache2 with PHP inside. So far i've downloaded dozens of apache servers and php servers and always getting the the error below.

    LoadModule php5_module "c:/php/php5apache2.dll" not found (or something very similar)

    Does certain Apache server version require certain PHP version? I'm pointing out the correct directory and its still telling that its wrong folder.

     

    Last time i tried these files.httpd-2.0.65-win32-x86-no_ssl.msiphp-5.3.28-nts-Win32-VC9-x86.msi

     

    And received same results. Modified php.ini to point out the extensions folder, added these lines to httpd config file (To correct positions).

    LoadModule php5_module "c:/php/php5apache2.dll"AddType application/x-httpd-php .phpPHPIniDir "c:/php"

    I have to install Apache2 the hard way since Xampp has been buggy for me for a bit. Please reply with correct version links and other tutorials if there is.

×
×
  • Create New...