iEntry 10th Anniversary Webforumz RegistrationAnnouncements Contact Webforumz StaffContact
Home Resources Blogs Meet the Team Contact Register
 

Go Back   WebForumz.com > The Code > JavaScript

Closed Thread
 
LinkBack Thread Tools
Old November 6th, 2007, 11:23 AM   #1
Highly Reputable Member
SuperMember
 
unitedcraig's Avatar
 

Join Date: Oct 2007
Location: Stockport
Age: 18
Posts: 844
Blog Entries: 1
Thanks: 0
Thanked 1 Time in 1 Post
Rep Altering Power: 0 unitedcraig is on a distinguished road
[SOLVED] Page count?

i have in the process of developing a website http://freestuffsyt.tripod.com and i will eventually be adding a lot more articles. as you will see if you visit the site i have a count of how many pieces of software i have added.

is there a way that i can get this to automatically update as more pages are added,

i am not sure if this will be achived using javescript but i am not sure how (if how) i can achieve.

please comment or send me to the right section of the forum

thanks

craig
unitedcraig is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Old November 6th, 2007, 12:16 PM   #2
Reputable Member
SuperMember
 
mcdanielnc89's Avatar
 

Join Date: Sep 2007
Location: Missouri
Age: 20
Posts: 232
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 mcdanielnc89 is on a distinguished road
Re: Page count?

What exactly do you want to auto update?
mcdanielnc89 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Old November 6th, 2007, 12:29 PM   #3
Highly Reputable Member
SuperMember
 
unitedcraig's Avatar
 

Join Date: Oct 2007
Location: Stockport
Age: 18
Posts: 844
Blog Entries: 1
Thanks: 0
Thanked 1 Time in 1 Post
Rep Altering Power: 0 unitedcraig is on a distinguished road
Re: Page count?

if you go on my site, on top of the right hand collum there is a heading saying items added - 2.

currently i am manually changing the number of items because there obviously isnt a great deal of itms added.

what i am looking for is a way to have this linked to the number of items added, perhaps to the number of files on the software folder?

is this possible or am i being a bit hopeful lol?

cheers
unitedcraig is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Old November 6th, 2007, 12:36 PM   #4
Elite Veteran
 

Join Date: Jul 2007
Location: Webforumz 24/7
Age: 16
Posts: 3,800
Blog Entries: 9
Thanks: 2
Thanked 3 Times in 3 Posts
Rep Altering Power: 0 alexgeek is a name known to all alexgeek is a name known to all alexgeek is a name known to all alexgeek is a name known to all alexgeek is a name known to all alexgeek is a name known to all
Re: Page count?

You could do this with PHP. Not javascript.
__________________
Web Design and Development Blog

Alex Perry
Technical Administrator.
alexgeek is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Old November 6th, 2007, 02:02 PM   #5
Elite Veteran
 

Join Date: Jan 2007
Location: You know where
Age: 32
Posts: 4,607
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 karinne is a name known to all karinne is a name known to all karinne is a name known to all karinne is a name known to all karinne is a name known to all karinne is a name known to all
Re: Page count?

and you probably won't be able to do any PHP with a tripod account.
karinne is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Old November 6th, 2007, 02:40 PM   #6
Reputable Member
 

Join Date: Nov 2007
Location: India
Posts: 150
Blog Entries: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 RohanShenoy is on a distinguished road
Re: Page count?

Craig, this is how I understand your problem:
You will be adding new pages to your website. You need to show on every page how many items are added on your site. At the moment, you edit the HTML of every page individually to update the number. But you want that update to happen automatically every time you add a new page to the site. If I have got it correct, then plz read my solution.

I could not think of how to automante the entire process. If you follow my solution, each time you add a new page, you will have to update only 1 character in a file.

Here is the solution:
1. Open your template file and go to H4 tag( Item added) as show below:


2. Replace the text in H4 tag with <script src="items_added.js"></script> (See below image)


3. Create a file by the name items_added.js in home directory
4. In that new file(items_added.js), copy-paste the below code:
Code:
document.write("Items added - #")
# in above code is the no. of items added to the site. So every time you added a new item yo your site, you will have to change this number.(This is the only number you have change,about which I said earlier)
You can format the elements according to your needs.

5. Now upload the .js file and also make changes to the pages you have already uploaded.

You are done with it!

I use something similar on my site www.BiologyForMhtcet.com. Did you notice the random quotes(in black color font) just below the header on every page ? They are produced using similar technique, except that functions are a step ahead.
RohanShenoy is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Old November 6th, 2007, 05:39 PM   #7
Highly Reputable Member
SuperMember
 
unitedcraig's Avatar
 

Join Date: Oct 2007
Location: Stockport
Age: 18
Posts: 844
Blog Entries: 1
Thanks: 0
Thanked 1 Time in 1 Post
Rep Altering Power: 0 unitedcraig is on a distinguished road
Re: Page count?

firstly, thanks a lot for your time, you hav answered another question i was going to ask about updating the whole of the site

and what i really wanted to find out on this post was slightly different. the items added is just displayed on the home page, and i would like to know if this can be changed automatically as more items are added. i do it jsut by altering the html now because as you can see there are only 2/3 items added, but eventually i hope to have a lot more items.

is there a way that you know off to get the value to change everytime i uploaded a file to the software folder for example?

if not dont worry, thanks a lot for your time for my second question

craig
unitedcraig is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Old November 6th, 2007, 11:24 PM   #8
Most Reputable Member
 

Join Date: Feb 2004
Location: Borneo
Age: 28
Posts: 1,629
Blog Entries: 2
Thanks: 0
Thanked 4 Times in 3 Posts
Rep Altering Power: 0 Monie is a jewel in the rough Monie is a jewel in the rough Monie is a jewel in the rough Monie is a jewel in the rough
Re: Page count?

How do you upload your file to your software folder? Manually upload them (from the website file manager) of through your page (like uploading picture and stuff..)??
Do you have a database?
Monie is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Old November 7th, 2007, 12:30 AM   #9
Reputable Member
 

Join Date: Nov 2007
Location: India
Posts: 150
Blog Entries: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 RohanShenoy is on a distinguished road
Re: Page count?

@ Craig (post#7)
I am happy I could answer atleast 1 of your question.

Anywayz, I am thinking about this one!
RohanShenoy is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Old November 7th, 2007, 02:49 AM   #10
Elite Veteran
 

Join Date: Jul 2007
Location: Webforumz 24/7
Age: 16
Posts: 3,800
Blog Entries: 9
Thanks: 2
Thanked 3 Times in 3 Posts
Rep Altering Power: 0 alexgeek is a name known to all alexgeek is a name known to all alexgeek is a name known to all alexgeek is a name known to all alexgeek is a name known to all alexgeek is a name known to all
Re: Page count?

Craig, if you used PHP then you would be able to count how many files were in a directory and display that.
You are using crappy tripod account so there's no chance of that!

Is changing one file that difficult? It's not as if you are going to be uploading 100s of articles a day, unless you're stealing other people's articles!

Either, get a better host without ads and supports php (Simon's currently offering hosting for $2!), or you can manually edit one file.
__________________
Web Design and Development Blog

Alex Perry
Technical Administrator.
alexgeek is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Old November 7th, 2007, 03:28 AM   #11
Reputable Member
 

Join Date: Nov 2007
Location: India
Posts: 150
Blog Entries: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 RohanShenoy is on a distinguished road
Re: Page count?

@ Craig, this is not what you asked for but I swill still suggest.
Try www.x10hosting.com if you want free hosting.
You will have an ad-free site with cPanel control panel and many more things.
I have personally used them and would recommmend them to anybody looking for free hosting.
RohanShenoy is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Old November 7th, 2007, 04:07 AM   #12
Highly Reputable Member
SuperMember
 
unitedcraig's Avatar
 

Join Date: Oct 2007
Location: Stockport
Age: 18
Posts: 844
Blog Entries: 1
Thanks: 0
Thanked 1 Time in 1 Post
Rep Altering Power: 0 unitedcraig is on a distinguished road
Smile Re: Page count?

thanks for all your responses, i didnt think that such a ramdom question would get this much attention

alexgeek, unfortunetly yes i am using a crappy tripod account, i will get round to changing that soonish, and yeh changing 1 file doesnt really give me that much more work does it i realise you didnt mean this in an offensive way but i can assure you that i am not stealing other people articles, 1. i am not like that, i respect other people's hard work, and 2. if i were doing that, wouldnt i have more than 3 acticles

monie, using ftp from dreamweaver atm, but going to change hosting account to support php

ronhan shenoy, thanks a lot for your help on this, and i think i wil switch to that hosting plan you reccomended

thanks you all for your help, thread closed
unitedcraig is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Closed Thread

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Post Count Not Going Up... TheLion The Café 1 January 16th, 2008 06:57 AM
[SOLVED] Count something in MySQL Table? Jack Franklin PHP 5 January 11th, 2008 02:46 PM
[SOLVED] new page, with page numbers saltedm8 PHP 9 October 5th, 2007 11:45 AM


Search Engine Optimization by vBSEO 3.2.0 RC8