Jump to content

kirill578

Members
  • Posts

    29
  • Joined

  • Last visited

    Never

Posts posted by kirill578

  1. I have a website in which al the content is displayed in the same page with AJAX. As I know the browser doesn't send any data to the server after the hash symbol ( # ). But the only way to change address bar with no refreshing is location.hash. My question is how can I make the user be able to share the URL that will say ajax what page to load.

     

    - I don't want to make text field with the URL

    - you can look at the website here maadif.co.cc/stuff

  2. How do I send multiple headers with this code?

     

    
    <?php
    
    $postdata = http_build_query(
        array(
            'var1' => 'some content',
            'var2' => 'doh'
        )
    );
    
    $opts = array('http' =>
        array(
            'method'  => 'POST',
            'header'  => 'Content-type: application/x-www-form-urlencoded',
            'content' => $postdata
        )
    );
    
    $context  = stream_context_create($opts);
    
    $result = file_get_contents('http://example.com/submit.php', false, $context);
    
    ?>
    
    
    

     

    *this header:

     

    User-Agent: Mozilla/5.0 (iPhone; U; CPU iPhone OS 3_0 like Mac OS X; en-us) AppleWebKit/528.18 (KHTML, like Gecko) Version/4.0 Mobile/7A341 Safari/528.16

     

     

  3. Is it possible that to change the address to something else with out reloading the page? I understand that if it were possible it could make a real security issue (Phishing and so on). but I need it just to change the value of some GET variable , in case some of the user want to share this page on facebook or send the perticiler page to someone. ( all the website is just one page and it's using AJAX ) There is the website in case you didn't got the point:

     

    http://maadif.co.cc/stuff/

     

    !-! currently I use \/ but it does refresh the page.

     

    window.location.href = "http://maadif.co.cc/stuff/?id=" +question_id;

     

  4. I downloaded FireBug. Is says that the POST send successful and it gets the right response but the problem has I already said before is that it doesn't execute the success function. I tried to add alert into it but i doesn't apper as well. ( My feeling that jQuery hates me  :'( )

  5.  

    i tried this. but now all the code doesn't working.

     

        $.post({
          url: 'ajax_request.php',
          data: { vote: 'b', id: '2', category: '0' }
          dataType: 'json',
          success: function(data) {
            $("div#result_a_show").text("" + data.a);
            $("div#result_b_show").text("" + data.b);
            $('a#next_link').attr('href', data.link);
          }
          });
    

  6. This code doesn't work/execute anything ( ajax_request.php works fine)

     

        $.post("ajax_request.php", { vote: "a", id: "2", category: "0" },
          function(data) {
          $("div#result_a_show").text("" + data.a);
          $("div#result_b_show").text("" + data.b);
          $('a#next_link').attr('href', data.link);
          }, "json");   
    

  7. Is it possible to disable jQuery event by click link or something

    for example

     

    //some event
    $('div#somediv').hover( 
       $('body').css("background","#b7d921");
       );
    
    $('body').click(
    <!-- some function that will disable the first event that switchs color -->
    );

     

     

     

     

  8. Is there some PHP function that can take a part of string between quotes or somthing like this and make an array out of it?

     

    Example:

     

    $string = "balal sd<asx zxcz>xc asd asd <e asd xzcz>xcv";

    $array = Some_function('<','>',$string);

    .

    .

    .

     

     

  9. if you try to access this page with IE the test isn't align properly (it should be align to the right side because it is Hebrew, Right to Left lang)

     

    P.S how can I align the left box (select form) to the center of it?

     

    http://maadif.co.cc/stuff/

     

    I have all ready tried CSS reset but it doesn't work.

    * I have checked this page on Firefox and Chrome and it worked quite well.

     

    Thank you for helping.

×
×
  • 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.