There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
acer audio black screen boot bsod computer connection crash css dell display driver drivers email error ethernet excel explorer firefox firefox 3 game hard drive internet internet explorer itunes laptop lcd linux malware network networking nvidia outlook outlook 2003 outlook express partition printer problem router slow software sound trojan usb video virus vista windows windows xp wireless
Software Development
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Software & Hardware > Software Development >
moving a table


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

Closed Thread
 
Thread Tools
PeterJS's Avatar
Member with 41 posts.
 
Join Date: Dec 2002
Location: Suffolk, UK
27-Jun-2003, 02:27 PM #1
moving a table
Hi,

I wondered, is it possible to use JavaScript to move a table?

I have a forum, and I don't have access to the HTML, but can add things into the header and footer. There is a member's online box that is at the bottom of the forum, Is there a way to use javascript to move it to the top?

Thanks

Peter
NameTooLong's Avatar
Computer Specs
Senior Member with 353 posts.
 
Join Date: Dec 2002
Location: California, USA
Experience: Advanced
27-Jun-2003, 03:34 PM #2
If you are using ezboard for your forums... last time I tried it wouldn't accept scripts of any kind... it turns the script tag to (s*****). And even if you could use script I can't think of one you could use without having access to the tables themselves.
__________________
Say no to TCPA.
PeterJS's Avatar
Member with 41 posts.
 
Join Date: Dec 2002
Location: Suffolk, UK
28-Jun-2003, 11:12 AM #3
I'm using a ProBoard.......

I can make it so the table is not displayed. Is there no way to combine css and js to move it up?

Peter
bassetman's Avatar
Computer Specs
Moderator with 47,094 posts.
 
Join Date: Jun 2001
Location: Great White North (WI)
Experience: Getting somewhere I hope
28-Jun-2003, 12:22 PM #4
I use anyboard, and it gives me boxes to insert HTML for the header and foot area, are you sure you don't have that option somewhere?
PeterJS's Avatar
Member with 41 posts.
 
Join Date: Dec 2002
Location: Suffolk, UK
28-Jun-2003, 12:29 PM #5
Hi bassetman,

Read my first post again

Peter
bassetman's Avatar
Computer Specs
Moderator with 47,094 posts.
 
Join Date: Jun 2001
Location: Great White North (WI)
Experience: Getting somewhere I hope
28-Jun-2003, 12:34 PM #6
I was telling you what I had and asking you if you were sure you didn't have the same option!
NameTooLong's Avatar
Computer Specs
Senior Member with 353 posts.
 
Join Date: Dec 2002
Location: California, USA
Experience: Advanced
28-Jun-2003, 10:28 PM #7
Basset, it says he has that option in the first post...
bassetman's Avatar
Computer Specs
Moderator with 47,094 posts.
 
Join Date: Jun 2001
Location: Great White North (WI)
Experience: Getting somewhere I hope
29-Jun-2003, 03:22 AM #8
Quote:
I have a forum, and I don't have access to the HTML, but can add things into the header and footer.
Quote:
Basset, it says he has that option in the first post...
I think I'll bow out and let those of you who are smarter than me take care of this!
brendandonhu's Avatar
Distinguished Member with 15,988 posts.
 
Join Date: Jul 2002
Location: Ann Arbor, MI
Experience: Advanced
29-Jun-2003, 07:43 AM #9
You would need some way to access the table from javascript.
1st-the page with the script on it would have to be on the same domain as the page with the table.
Also, the table would have to have a name or ID for the script to reference it.
There may be a trick or "cheat" to reference the table without those, there is for links and images.
__________________
-Brendan
PeterJS's Avatar
Member with 41 posts.
 
Join Date: Dec 2002
Location: Suffolk, UK
29-Jun-2003, 11:28 AM #10
so you are sort of saying that with a script, I could find the table on the page that I want to move, add a id/name to the table tag, and with another script, move it up?

or have i misunderstood ya , lol?

See, i've been looking at a way to look for the table tag by using something like this.....

PHP Code:
document.getElementsByTagName('TABLE')
for(
k=XXk<tables.lengthk++){ 
XX = how many table tags till it gets to the one I want to change.

is there a way to add to that table tag an id using errr....not sure what I would use, lol....something like innerHTML/pasteHTML?

then with another script look for that id and move it?

Or is this completely not possible?

Peter
brendandonhu's Avatar
Distinguished Member with 15,988 posts.
 
Join Date: Jul 2002
Location: Ann Arbor, MI
Experience: Advanced
29-Jun-2003, 11:30 AM #11
Yes using a loop like that I'm sure its possible. I suppose innerHTML could add an ID tag once you know the rest of the code that should be in the table tag. Maybe you would get someone who can give you some code at the webdeveloper.com forums.
__________________
-Brendan
PeterJS's Avatar
Member with 41 posts.
 
Join Date: Dec 2002
Location: Suffolk, UK
29-Jun-2003, 12:35 PM #12
I've tried to make the script to add the id myself, but I don't know exactly what i'm doing. This is what I have, it doesn't work, but I get no errors.

PHP Code:
<script>
var 
tables document.getElementsByTagName('TABLE')
for(
k=0k<tables.lengthk++){
if(
tables[k].innerHTML=='<table border=0 width="100%" cellspacing="0" cellpadding="0" bgcolor="000000" class="bordercolor">'){
tables[k].innerHTML='<table id="move" border=0 width="100%" cellspacing="0" cellpadding="0" bgcolor="000000" class="bordercolor">';
}
}
</script> 
Peter
Closed Thread

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who help people like you solve computer problems. See our Welcome Guide to get started.



Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 12:16 PM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.