Calling datatables script inside an SSL iframe

Calling datatables script inside an SSL iframe

jmbolanosjmbolanos Posts: 1Questions: 0Answers: 0

Hi

I have a situation that I can't seem to find an answer for in the forums.

My datatables scripts are called from within an iframe on a site using SSL - a variable (the userID of the reader) is also passed to the script that generates the table. However, the AJAX processing script also needs the same variable to access the appropriate table in the SQL database. I need to pass the same variable to that script. I tried sessions but it seems that the AJAX script is not SSL and therefore can't pick it up. So, the question is how to pass a $ variable to the AJAX script.

I adapted the PHP implementation used for the htmlTable.html and in a new browser window (not in the iframe), all works perfectly using session so that leads me to think the AJAX script is not called in SSL .

Thanks for your help in advance.

John

Replies

  • allanallan Posts: 61,451Questions: 1Answers: 10,055 Site admin

    Hi John,

    How is the variable being passed to the iframe document? If it is a query parameter you could use window.location.search to access the query string and then use ajax.data to submit the value to the server along with the DataTables ajax request.

    Allan

This discussion has been closed.