vForums Support Banner



 

Welcome Guest! Please Login or Register
vForums Support :: Programming & Coding :: Code Requests & Support :: Web link code - View Topic
Topic Rating: *****
Printable View
Graham
Support Administrator
*****

[Avatar]

Posts: 1,642
Status: Offline
Gender: Male
Location: Sussex, UK
Age: 39
Joined:  

Additional Groups:
Support Team
***


Reputation: 57%  


pmwww
Web link code (17th Oct 08 at 11:47pm UTC)
An edit?
There's already a code to add an image link to the menu bar, but is it possible for it to be edited, or one created for text menus? The site i am creating uses text menus and it'd be nice for it to fit in {Smile}

Thanks in advance! {Cheesy}
dog199200
Guest
Re: Web link code (18th Oct 08 at 12:53am UTC)
{Smile} give me a second and i'll see what i can do

Edit: OK try this

Code:
 
  1. <script>
  2. /*Add website link to menu - support.virtualforums.co.uk*/
  3.  
  4. var text = "test"; //Text to Show
  5. var link = "http://support.virtualforums.co.uk"; //Website Link
  6.  
  7. //DO NOT EDIT BELOW HERE!
  8. var m = document.getElementById('welcome_table').getElementsByTagName('td').item(2);
  9. m.innerHTML = "<div style='float:left'>"+m.innerHTML+"</div><div style='float: right'><a href="+link+">"+text+"</a></div>";
  10. </script>
 


Just tested it and it works
Graham
Support Administrator
*****

[Avatar]

Posts: 1,642
Status: Offline
Gender: Male
Location: Sussex, UK
Age: 39
Joined:  

Additional Groups:
Support Team
***


Reputation: 57%  


pmwww
Re: Web link code (18th Oct 08 at 8:38am UTC)
That works brilliantly {Cheesy}

Cheers Dwight {Smile}
dog199200
Guest
Re: Web link code (18th Oct 08 at 10:55pm UTC)
glad i was able to help
 Printable View

All times are GMT+0 :: The current time is 9:09pm
Page generated in 0.7055 seconds
This Forum is Powered By vForums (v2.4)
Create a Forum for Free | Find Forums