Jump to content

LLLLLLL

Members
  • Posts

    306
  • Joined

  • Last visited

Posts posted by LLLLLLL

  1. A customer's web page of their store (where credit card numbers are entered) is HTTPS. On my machine, and for several others, there are no content warnings; everything is HTTPS. For some users, the page shows that some content is insecure. How is this possible?

     

    I should note there is a backstretch jQuery script in use, but I've set the background to always be HTTPS, so it doesn't make too much sense that this is the culprit.

  2. The only additional information I have is that based on browser settings, a user might get "although this page is encrypted the information you have entered is to be sent over an unencrypted network."

     

    This still doesn't make sense. It is an HTTPS page with a relative URL. How can it be posting as HTTP? Ugh.

  3. This one requires lots of up front information:

     

    [*]I have a page, for this example that I will call page.php. It takes get parameters, and for this example I'll call the parameter "step". So I have a URL like this: page.php?step=1

    [*]This page has a form with an action of page.php?step=1.

    [*]The code on the page validates the posting information. If the information is bad, it returns the user to page.php?step=1; if it is good, it takes the user to page.php?step=2 via header( "location:page.php?step=2" ). So redirection is done by relative path, not full URLs.

     

    This all works as expected.

     

    Now what I've done is set .htaccess to be HTTPS for this page, via this code:

     

    # Turn SSL on for payments

    RewriteCond %{HTTPS} off

    RewriteCond %{SCRIPT_FILENAME} \/page\.php [NC]

    RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]

     

    This works (initially). However, once you try to post the form, it just redirects back to the step=1 version of the page. I really don't know how or why that would be.

     

    I'm not sure how else I can explain this or what other information you may have. But it's frustrating to not get a page working in HTTPS that works in HTTP. Very odd. Any suggestions? (I don't even really know the best location to figure out when/why it's redirecting back to the original page.)

     

     

  4. If something calls function f1 below, what do you expect to see in the alert?

     

    	function f1()
    	{
    	  for ( i = 0; i < 8; i++ )
    	  {
    	     other_func();
    	     alert( i );
    	  }
    	}
    
    	function other_func()
    	{
    	  for ( i = 0; i < 100; i++ )
    	  {
    	  }
    	}
    

     

    The answer is 100, and we've found this to be quite odd. If either of the functions used "var i" instead of just "i" in the loop, you'd get 0, 1, 2,...

     

    Why is this, exactly?

  5. Update: I changed the code to this, and it works. I guess I need to return the variable outside the success handler, according to some google results I found.

     

    function are_quantities_valid() {	
    toReturn = false;
    
    $.ajax( "server_file.php", {
    	async: false,
    	data: {
    		sid: the_session_id
    	}, 
    	success: function ( data ) { 			
    		if ( data == "true" )
    			toReturn = true;
    		else
    			alert( data );
    	}
    });
    
    return toReturn;
    }
    

  6. I'm trying to do a synchronous call for a form's onsubmit function. The server-side code returns "true" or an error message. The problem is that the code that should not be reached (see example below) is actually reached.

     

    The "should not be reached" code is only there for this example; without it, the function returns true even though an error message was displayed to the user.

     

    So I guess I'm just asking for some help on synchronous ajax form validations. Am I not doing it right?

     

    function are_quantities_valid() {	
    $.ajax( "server_file.php", {
    	async: false,
    	data: {
    		sid: i_pass_the_session_id_to_the_server
    	}, 
    	success: function ( data ) { 			
    		if ( data == "true" )
    			return true;
    
    		alert( data );
    		return false;
    	}
    });
    
    alert( 'this should not be reached.' );
    return false;
    }
    

  7. Anyone used a good sortable table script? (JavaScript or Ajax)

     

    I don't want to write my own, and I'm sure there are good ones out there. I just want to know what others have used. Only requirements are to sort all the visible rows, while keeping the header row.

  8. As for the function(i), it is interesting that what you said works, but the results don't necessarily display in the grid in rows 1, 2, 3, etc. Any reason why they would be displayed in random order?

     

    As for the other thing, it's a pretty complex form. A select box changes something, and based on that "something" we get a different list of rows in the table, and from there the user executes a function that calls this ajax.

     

    Thank you in advance; you have been most helpful.

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