Hyperlinks with browser windows

Hi there!!!

I’m having troubles with hyperlinks when opening new browser windows, they work but, I need this new windows to be without the toolbar, scrollbars, status bar, location bar, etc, the only thing I want is the simple and flat window.

Thanks for any info you can submit!!!

put this in your html:

< script language=“JavaScript” >
< !–
function winOpen() {
newWin=window.open(“http://http://yoursite/your page.html”,“demo”,“height=525,width=700,status=no,toolbar=no,menubar=no,location=no,resizable=no,titlebar=no,scrollbars=no,fullscreen=no,top=25,left=25”)
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
//-- >

then on your button use :
“javascript:winOpen()”

replacing yoursite and yourfile with your actual information, and the location and size you need…

hope this helps,

Rev:elderly:

Thanks for that man!!!, really apreciate it but, I’m having troubles now on where to put the script, where to asign that funtion to the word I want on my text.

I’m sure this should be simple but anyway I need help.

Thanks again for your assistance!!!:smirk:

you put the script in the < head > of your HTML page, then on a button on your stage in Flash, assign a GetURL action to it with the javascript:winOpen() as the URL.

any clearer?

I hope this helps,

Rev:elderly:

Yo - man!!!

Sorry, guess I didn’t explain myself clearly.

I’m loading a TXT file on a dinamic text box on flash, with the HTM option On, This TXT file has the script on a word as a Hyperlink which will open a new browser window. I have to attach that funtion to that word on the TXT File.

Thanks again, and thanks for your fast reply!!!

let me see if I can explain better…

in the < head > of the HTML page that the .swf is embedded, place:

< script language=“JavaScript” >
< !–
function winOpen() {
newWin=window.open(“http://http://yoursite/your page.html”,“demo”," height=525,width=700,status=no,toolbar=no,menubar=
no,location=no,resizable=no,titlebar=no,scrollbars
=no,fullscreen=no,top=25,left=25")
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
//-- >

then use the “javascript:winOpen()”
as your hyperlink…

Rev:elderly:

Sorry man, I can bet you’re gonna say I most be or extremely newbe or extremely idiot but, I can’t make it work.

my TXT file goes like this:

…<a href=”javascript:winOpen()”>Aranea</a>- Aranea is the place of beatiful flowers where you can smell and choose your own…

I already placed the other script on the HEAD of the HTML where the SWF is placed but doesn’t respond.

Sorry for been such a trouble, and thanks for any help you can provide

No, I’m not going to kill you:goatee: I am a pacifist :nerd:

but did you remove the spaces between the < and scriptlanguage, etc.? I had to add the spaces so that the board would post it correctly…=) there should not be a space after any < or before any >

other than that, it should work. I have used this script many times.

No trouble, If this doesn’t work, can you post a .fla so maybe myself, or someone who loves to code can look at it?:cool:

No worries, someone will help you out one way or the other,

Rev:elderly:

Here is the FLA

here is the TXT

The source HTML looks like this

sorry, can’t open the .fla:*( but that shouldn’t matter, since you are calling out javascript from the text file…

You know, it could be me…:elderly: maybe one of the people who code more than I could help…

the other issue is how about the HTML source?

could that be the problem?

the text file looks okay to me…:-\

send me the HTML…I will try again

rev:elderly:

Well, here’s the HTML, I’m not sure if the ZIP file is gonna work, Mac Stuffit Encoder is a little tricky. I can’t send you the HTML via this post because of the allowed extensions it manage.

If you really need the HTML I will need an e-mail adress, but the Source.TXT file that I sent is a Copy Paste of the original source.

Thanks again for all your help!!!

I’m not sure why that wasn’t working so…

here is one that I created just now that works…only with a button hard coded…

=) yes, it works (it will look for popup.html, but youcan change that…)

See if this answers any of your questions…

Rev:elderly:

Hi there, its me again!!

thanks for taking time to make an example work of the script but it seems we haven’t understood each other.

What happens is the next, I have a dynamic text box on my FLA, this text box loads an external TXT file with a big amount of text. Inside the TXT file, are some words that most work as link to open new browser windows to display more information related to the original topic.

The dynamic text box is affected by a scrolling script in order to view all the text back and forward.

The dynamic text box also has the HTML option ON so I can give special format to the text when it is displayed, this include some options and behaviors avialable on HTML. On one of this words I putted the next script, which is the one you gave me:

<a href=“javascript:winOpen()”>Aranea</a>

also I included the other code you gave me on the HEAD of the HTML where the SWF is embeded but it didn’t work.

Before I asked for your help I had this other script on the key word:

<a href=“http://www.aranea.com” target="_blank"> Aranea </a>

and it worked, but it displayed all the tollbars. Also, I tryed the next on the TXT file:

<a href="#" onClick=“MM_openBrWindow(‘http://www.aranea.com.mx’,‘Test’,‘toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=100,height=100’)”>
Aranea </a>

With the proper script on the head of the HTML file but it starts to blink and then reloads the same thing. Hope you have some other ideas on how to resolve this problem.

Thanks for all your help and all your patience.

That should read as follow:

On one of this words I putted the next script, which is the one you gave me:

< a href=“javascript:winOpen()” > Aranea < /a >

also I included the other code you gave me on the HEAD of the HTML where the SWF is embeded but it didn’t work.

Before I asked for your help I had this other script on the key word:

< a href="#" target="_blank" > Aranea < /a >

and it worked, but it displayed all the tollbars. Also, I tryed the next on the TXT file:

< a href="#" onClick=“MM_openBrWindow(‘http://www.aranea.com.mx’,‘Test’,‘toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=100,height=100’)” >
Aranea < /a >

With the proper script on the head of the HTML file but it starts to blink and then reloads the same thing.

I’m sorry this is becoming so drawn out…

try taking the HTML I sent, change the .swf to your file, then the hyperlink in your text file should be :

javascript:openNewWindow(“http://www.aranea.com”,“popup”,“height=530,width=530,status=no,toolbar=no,menubar=no,location=no,resizable=no,titlebar=no,scrollbars=no,fullscreen=no,top=50,left=50”)

and it should pop up a window as you are requesting=)

Again, I’m sorry I haven’t fixed this sooner…

Rev:elderly: