That would be done in Flash.
That would be done in Flash.
{CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
Follow Me on Twitter: @InkingHubris
PHP Code:
$result = mysql_query("SELECT finger FROM hand WHERE id=3");
echo $result;
The short answer is no. If you have access to the .fla then there is a work around, FlashVars can help, but you would still need access to the fla file to add the variables to call to/from.
I take it there is no chance of getting the fla to work with huh?
{CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
Follow Me on Twitter: @InkingHubris
PHP Code:
$result = mysql_query("SELECT finger FROM hand WHERE id=3");
echo $result;
I'm no guru, but using the suggested :
getURL("myURL", "Iframe_name")
...when the testing files were on my local machine - opened a new browser window with the referenced content. When the files were moved to a web server - it works as it's supposed to. Due to security limitations in the flash player, I think that when testing on a local file system root domains get a tad mixed up.
I have implemented the above process without Iframes using an adaptation of the Dynamic Ajax Content article posted at :
http://www.dynamicdrive.com/dynamici...jaxcontent.htm.
It was real easy using a div container which is much more versatile instead of an Iframe (this also has to be on a webserver and won't work on a local file system).
Read the article, but if you are in a rush here is the code I used:
1) To the head section of your main document ->
<script type="text/javascript">
var loadedobjects=""
var rootdomain="http://"+window.location.hostname
function ajaxpage(url, containerid){
var page_request = false
if (window.XMLHttpRequest) // if Mozilla, Safari etc
page_request = new XMLHttpRequest()
else if (window.ActiveXObject){ // if IE
try {
page_request = new ActiveXObject("Msxml2.XMLHTTP")
}
catch (e){
try{
page_request = new ActiveXObject("Microsoft.XMLHTTP")
}
catch (e){}
}
}
else
return false
page_request.onreadystatechange=function(){
loadpage(page_request, containerid)
}
page_request.open('GET', url, true)
page_request.send(null)
}
function loadpage(page_request, containerid){
if (page_request.readyState == 4 && (page_request.status==200 || window.location.href.indexOf("http")==-1))
document.getElementById(containerid).innerHTML=page_request.responseText
}
function loadobjs(){
if (!document.getElementById)
return
for (i=0; i<arguments.length; i++){
var file=arguments[i]
var fileref=""
if (loadedobjects.indexOf(file)==-1){ //Check to see if this object has not already been added to page before proceeding
if (file.indexOf(".js")!=-1){ //If object is a js file
fileref=document.createElement('script')
fileref.setAttribute("type","text/javascript");
fileref.setAttribute("src", file);
}
else if (file.indexOf(".css")!=-1){ //If object is a css file
fileref=document.createElement("link")
fileref.setAttribute("rel", "stylesheet");
fileref.setAttribute("type", "text/css");
fileref.setAttribute("href", file);
}
}
if (fileref!=""){
document.getElementsByTagName("head").item(0).appendChild(fileref)
loadedobjects+=file+" " //Remember this object as being already added to page
}
}
}
</script>
2) Then some styling for you div tag:
<style type="text/css">
#rightcolumn{
float:left;
width:450px;
min-height: 400px;
border: 0;
margin-left: 10px;
padding: 5px;
padding-bottom: 8px;
}
</style>
3) And then in the body tag I put :
<body onload="ajaxpage('frames/home.html', 'rightcolumn'); javascript:loadobjs('css/aqua.css');">
Just to initialise my css file and some content for the div container.
4) Placed my div container in the html body:
<div id="rightcolumn"><h3>Page loads here</h3>
5) On my flash buttons (the nav) I used the following code:
on (release) {
var divURL:String = "frames/awards.html";
getURL("javascript:ajaxpage('"+String(divURL)+"', 'rightcolumn');");
}
Hope this helps - visit the link http://www.dynamicdrive.com/dynamici...jaxcontent.htm for a complete explanantion/
Bookmarks