free flash templates
free flash templates menu free css & photoshop templates menu free flash animation

Go Back   free flash templates forum > Free flash templates

Closed Thread
 
Thread Tools Search this Thread Display Modes
  #1  
Old 07-26-2011, 05:15 PM
kieronf
Guest
 
Posts: n/a
Default Template menu button pointing to external URL

I saw this old thread but was wondering where exactly in the replacement code the address of the URL would go. I'm also a bit confused about the button as well. The button on my website would be called HOTEL and the URL - www.stranhotelbude.co.uk.

Any help would be greatly appreciated.



Quote:
Originally Posted by freenicetemplates
Here is the hack to allow absolute URL in flash buttons and open them in a new window.
If you want the link top open in the same window replace _blank by _self.

Open the file js/main.js and replace at the end of the file function :


Code:
function showPage(pageURL,button_id) {
hideContent(pageURL);
if (selected_button!="" && button_id!=selected_button) {
sendToASUnselectButton('anim_'+selected_button);
}
selected_button = button_id;
}by


Code:
function showPage(pageURL,button_id) {
if (pageURL.substring(0,4).toLowerCase()=='http') {
window.open(pageURL, '_blank');
return;
};
hideContent(pageURL);
if (selected_button!="" && button_id!=selected_button) {
sendToASUnselectButton('anim_'+selected_button);
}
selected_button = button_id;
}
  #2  
Old 07-27-2011, 02:38 PM
freenicetemplates freenicetemplates is offline
Administrator
 
Join Date: Mar 2009
Posts: 507
Default flash template external link

Like this :
<a href="javascript:showPage('http://mysite.com/test');">mylink</a>
__________________
We are always pleased to read you in our guestbook
  #3  
Old 07-27-2011, 03:02 PM
kieronf
Guest
 
Posts: n/a
Default Still confused

I am very much a novice at this so a little more help would be appreciated. Am I right that I have to replace the existing code in the js/main with -

function showPage(pageURL,button_id) {
if (pageURL.substring(0,4).toLowerCase()=='http') {
window.open(pageURL, '_blank');
return;
};
hideContent(pageURL);
if (selected_button!="" && button_id!=selected_button) {
sendToASUnselectButton('anim_'+selected_button);
}
selected_button = button_id;
}

If so, where ecactly would i insert my target URL, would i insert it where it says (pageURL)

Also, this is the existing code for the menu buttons -

<script type="text/javascript">myButton('EVENTS','_events.htm');</script>

how do i change that to point to my external URL

Hope this doesn't seem too dumb.

many thanks
  #4  
Old 08-07-2011, 05:04 PM
kieronf
Guest
 
Posts: n/a
Default Many thanks

Thanks for the help, really appreciate it.
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:27 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.