Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

code doesn't work in explorer...

Status
Not open for further replies.

DGTLguy

Technical User
Jul 23, 2003
125
US
//... okay, i have a button inside a flash movie that onRelease opens a browser window... i placed this code directly on each button to set that windows attributes is:

on (release) {
Movieclip.prototype.openWin1 = function(url, winName, w, h, toolbar, location, directories, status, menubar, scrollbars, resizable){
getURL("javascript:var myWin1;if (!myWin1 || myWin1.closed){myWin1=window.open('"+url+"', '"+winName+"', '"+"width="+w+", height="+h+", toolbar="+toolbar+", location="+location+", directories="+directories+", status="+status+", menubar="+menubar+", scrollbars="+scrollbars+", resizable="+resizable+", top='+0+', left='+150+'"+"')} else{myWin1.focus();};void(0);"); };

address = "yourwindowhere.html";
winName = "Your Window Name Here";
width = 375;
height = 375;
toolbar = 0;
location = 0;
directories = 0;
status = 0;
menubar = 0;
scrollbars = 0;
resizable = 0;
openWin1(address,winName,width,height,toolbar,location,directories,status,menubar,scrollbars,resizable);
}

//... easy enough. everything works great. window pops up fine in Safari & Firefox. Explorer gives me an error. "line 1 character 43. unrecognized character." or something to that degree... any clues?
 
I don't really see anything wrong with it, but I am curious why you don't just put the javascript function in the HTML of the page that has the Flash movie object in it. You can do that and call the function from AS. Personally I find it much easier to troubleshoot that way!

Have you been able to identify what line 1 char 43 is or is that the problem?

Funny... ususally javascript blows up in Netscape before IE. Hmmm

Wow JT that almost looked like you knew what you were doing!
 
Well the flash movie is the main website, it sits in index.html... i'm trying to get various portfolio pieces to popup in another window with no scrollbars, status bar, etc.

I'm not sure that would work, putting the javascript function in the HTML of index.html...

I have not been able to establish what line 1 char 43 is.
 
You could put the whole javascript in the index.htm and then just call that from the getURL line... ex:

Code:
getURL("javascript:functionName("+values+")");

That would at least make it a bit easier to troubleshoot.

Wow JT that almost looked like you knew what you were doing!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top