Jump to content

kirill578

Members
  • Posts

    29
  • Joined

  • Last visited

    Never

Everything 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. try this: RewriteEngine on RewriteBase / RewriteRule ^([a-zA-Z0-9]+) users.php?username=$1 RewriteRule ^([a-zA-Z0-9]+)/([a-zA-Z0-9]+)$ $2.php?username=$1
  3. It wasn't the problem.. some other ideas?
  4. 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
  5. How do I redirect this: http://maadif.co.cc/stuff/#!/18 to here http://maadif.co.cc/stuff/?id=18 * 18 is a variable I have tried \/ but it doesn't work (it doesn't set the value) Options +FollowSymlinks RewriteEngine on RewriteRule ^sutff/#!/([0-9]+) http://maadif.co.cc/stuff/?id=$1 [R,NC]
  6. I have found a solution I redirect http://maadif.co.cc/stuff/#!/ to http://maadif.co.cc/stuff/
  7. Ok, so how do i put variable from the address bar info variable, for instance: http://maadif.co.cc/stuff/#!/5 into id = 5; ???
  8. 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;
  9. Thanks, the problem was 3 blank lines at after the ?> tag
  10. I have some page that generates JSON array but the problem that java script ajax can't recognize it as a JSON code because it begins in the third line of the output ( press CTRL+U to see it ) I found out that the problem is my function php page that is Included ( include() ) there. but this function page doesn't send any output?! what is the problem!? http://maadif.co.cc/stuff/ajax_request.php
  11. I have finally found out that the problem is the PHP file its output starts in the third line..
  12. That is exactly what I did. Just look at the code here http://maadif.co.cc/ajax/prefer/index.php
  13. 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 :'( )
  14. Now i have the same problem, it doesn't execute anything Can you look at the code here? http://maadif.co.cc/ajax/prefer/index.php
  15. 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); } });
  16. 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");
  17. It's kind of complected.Isn't there a way to disable a whole function like this: function somefunction() { <!-- lots of event --> }; $(a#somelink).click( <!-- disable somefunction --> );
  18. 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 --> );
  19. Is it possible to make JavaScript get output our of php page? for instance: i want to insert this page something.php?name=jack into var data
  20. Is there some tutorial for these signs "|<[^>]+>(.*)</[^>]+>|U"??
  21. 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); . . .
  22. 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.
  23. Thank your for being honest as possible. Maybe the website really looks like cartoon so I have drawn a scratch of a less-cartoony design as you can see below what do you think about it? [attachment deleted by admin]
  24. Hello As I have already mentioned before, I would be happy to see some feedback my new web site "UnProblem". As you can guess It is like Yahoo answers. However there is a little different, Its is much simplified. http://unproblem.com/ Thank you!
×
×
  • 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.