View Full Version : flash and ajax

The General
01-18-2007, 01:14 PM
Hi im new here and not a programmer so please be patient with me i put the ajax script into a html page and created a container put a link to abutton in the html page and everything works fine trouble is im trying to do the same with a flash swf file in the same html page but nothing happens below is what ive put on the button in flash

on (release) {
getURL("javascript:ajaxpage('hometext.htm', 'contentarea')");

01-18-2007, 11:47 PM
You need the JS script in the HEAD section of your page telling the JS to open new window based on those stats. The button is currently looking for a function definition for ajaxpage()

Try adding this to your HTML page:

<SCRIPT language=JavaScript>
var newwin;
function ajaxpage(winurl,winname,winfeatures)
//This launches a new window
newwin = window.open(winurl,winname,winfeatures);

If that doesn't work take a look at these examples:

http://www.flash-db.com/PopUp/ //nothing in the html...

http://www.kirupa.com/developer/mx/centered_popup.htm //Flash & html