I have a page with a form page loaded in a div. I’d like to send some data to the loaded page by querystring and read the content in it, is it possible and if yes how?
that my example:
$("#scheda_sch").load("./schemi/sch_"+schemi[indice]+".html?azione="+azione);
I need to read from page sch_…html read the value of querystring azione
thanks in advance ciao h.
You can’t do that. The URL with the query string is sent to the server, and the response is placed in the element. Any code that is loaded will know the URL of the current page, not the URL of the code that was added to it.
What you can do is to use the callback that occurs when the content has loaded. As you declare it in the same scope as the method starting the load, it has access to the variable: