Reply
getElementsByTagName - erm????
Old 05-10-2008, 06:26 PM getElementsByTagName - erm????
coldturkey's Avatar
Extreme Talker

Posts: 195
Name: Rachel
Location: Spain
Hi,
I have added a increse font size script but i cant to edit it correctly.
This is part of the script, at the moment it just changes what in <p>. But i want to add <ul> tags as well.
Code:
function increaseFontSize() {
   var p = document.getElementsByTagName('p');
So i tried this
Code:
function increaseFontSize() {
   var p = document.getElementsByTagName('p','ul');
and a few other ways but its not working... how do I add a new tag in there??

Hope some one can help

Rachel
__________________
coldturkey is offline
Reply With Quote
View Public Profile Visit coldturkey's homepage!
 
When You Register, These Ads Go Away!
Old 05-10-2008, 07:28 PM Re: getElementsByTagName - erm????
tripy's Avatar
Fetchez la vache!

Posts: 2,162
Name: Thierry
Location: In the void
you cannot.
You have to make 2 distincts arrays
Code:
function increaseFontSize(){
  var p=document.getElementsByTagName('p');
  var u=document.getElementsByTagName('ul');
  //... do your stuff on ever arrays
__________________
Listen to the ducky: "This is awesome!!!"

tripy is online now
Reply With Quote
View Public Profile
 
Reply     « Reply to getElementsByTagName - erm????
 

Thread Tools

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Webmaster Resources Marketplace:
Software Development Company | Webhosting.UK.com | Text Link Brokers 


   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.10655 seconds with 12 queries