473,387 Members | 1,493 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

page linking

8
hi all
i'm new to html and am looking to create page transfer links similar to the search engines where results span over one page,
you get a list like "1 2 3 4" etc where pages 2 onward are underlined and 1 (current page) is not and probably bold. on moving to another page, the underline shifts to 1. i would also like to include a 'next' and (after page 1) a 'prev' each side of the 'pages'
this so that any pages of products that spread over a single page can be accessed,the head page of the product group being called up in the main navigation bar
i have several books and have scanned through various entries in this forum but can find no reference to this type of thing
please help
thanks
Mar 14 '07 #1
13 1876
AricC
1,892 Expert 1GB
To do what you are talking about (Bread Crumbs) in HTML you would have to create each page manually. To make this dynamic you would need a server side scripting language such as PHP or ASP.

HTH,
Aric
Mar 14 '07 #2
allanf
8
thanks for reply
have been looking at other sites that have this type of action - 'borrowed' the coding that appears but cannot get it to fully work on my pages - i can get '1','2' etc to work, sometimes the 'next' but never so far the 'prev' although it appears on the page.as aleady said am new to this but this does not appear to be site side scripting but included on the web pages - am i wrong in this?
Mar 15 '07 #3
AricC
1,892 Expert 1GB
thanks for reply
have been looking at other sites that have this type of action - 'borrowed' the coding that appears but cannot get it to fully work on my pages - i can get '1','2' etc to work, sometimes the 'next' but never so far the 'prev' although it appears on the page.as aleady said am new to this but this does not appear to be site side scripting but included on the web pages - am i wrong in this?
No you are not wrong with that assumption. There are tons of examples on the web on how to do this. Do you know any server side scripting? Like I said you can do this manually, but you will have to do it to every page. Google Bread Crumbs or Pagination and you should get some good results.

HTH,
Aric
Mar 15 '07 #4
allanf
8
No you are not wrong with that assumption. There are tons of examples on the web on how to do this. Do you know any server side scripting? Like I said you can do this manually, but you will have to do it to every page. Google Bread Crumbs or Pagination and you should get some good results.

HTH,
Aric
hi aric
thanks again for replying
no i do not know any server side scripting, my intention was to do manual coding on each affected sheet. at present i only have a couple of web pages that spill over onto two sheets so the workload to do it is not too daunting.
the problem was that i could not find any references in my books on doing this type of thing. i think i may have worked out where my previous coding was going wrong, will be looking at it today to see if i'm right.
thanks
allan
Mar 16 '07 #5
allanf
8
aric
further to my earlier posting - i have looked at coding, not what i thought so back to square 1
this is the coding, still having probs with 'prev' not working and not blue and now, in the 'next' coding with the bold 2 - it's become underlined
<table cellspacing=0 cellpadding=2 width="100%" border=0>
<tbody>
<tr>
<td class=smalltext align=middle
<a class=pageresults title=" page 1 "
href="page2.htm">&nbsp;&nbsp;<b>1</b>&nbsp;&nbsp;
<a class=pageresults title=" page 2 "
href="page3.htm"><u>2</u>&nbsp;&nbsp;&nbsp;
<a class=pageresults title=" next page "
href="page3.htm"><u>[next&nbsp;&gt;&gt;]</u>
</td></tr></tbody></table>








<table cellspacing=0 cellpadding=2 width="100%" border=0>
<tbody>
<tr>
<td class=smalltext align=middle
<a class=pageresults title=" previous "
href="page2.htm"><u>[&lt;&lt;&nbsp;prev]</u>&nbsp;&nbsp;
<a classresults title=" page 1 "
href="page2.htm"><u>1</u></a>&nbsp;&nbsp;
<a class=pageresults title=" page 2 "
href="page3.htm"><b>2</b>
</td></tr></tbody></table>
Mar 16 '07 #6
jhardman
3,406 Expert 2GB
Try:
[html]
<table cellspacing=0 cellpadding=2 width="100%" border=0>
<tr><td align=middle>
<a title=" previous "
href="page1.htm">[&lt;&lt; prev]</a>
<b>2</b>
<a title=" next " href="page3.htm">[next &gt;&gt;]</a>
</td></tr></table>[/html]
Hyperlinks are underlined by default, so you don't need to specify the underline (<u>underlined text</u>)
The class attributes, which I removed from your code sample, refers to a predefined styling which you should have within the page head:
Expand|Select|Wrap|Line Numbers
  1. <head>
  2. <style>
  3. a.pageresults {
  4.    (specific style of the <a class="pageresult">)
  5. }
  6. </style>
  7. </head>
  8.  
If you are not using any of that, the class=pageresults means nothing.

I would suggest also leaving the current page outside of any anchor tag (you had it inside <a>)

Does this help?

Jared
Mar 16 '07 #7
jhardman
3,406 Expert 2GB
also, make sure every tag you start is finished, and remember that some tags are stand-alone, while others need end tags as well.

w3schools is a good resource if you want to look up correct syntax and usage.

Jared
Mar 16 '07 #8
AricC
1,892 Expert 1GB
aric
further to my earlier posting - i have looked at coding, not what i thought so back to square 1
this is the coding, still having probs with 'prev' not working and not blue and now, in the 'next' coding with the bold 2 - it's become underlined
<table cellspacing=0 cellpadding=2 width="100%" border=0>
<tbody>
<tr>
<td class=smalltext align=middle
<a class=pageresults title=" page 1 "
href="page2.htm">&nbsp;&nbsp;<b>1</b>&nbsp;&nbsp;
<a class=pageresults title=" page 2 "
href="page3.htm"><u>2</u>&nbsp;&nbsp;&nbsp;
<a class=pageresults title=" next page "
href="page3.htm"><u>[next&nbsp;&gt;&gt;]</u>
</td></tr></tbody></table>








<table cellspacing=0 cellpadding=2 width="100%" border=0>
<tbody>
<tr>
<td class=smalltext align=middle
<a class=pageresults title=" previous "
href="page2.htm"><u>[&lt;&lt;&nbsp;prev]</u>&nbsp;&nbsp;
<a classresults title=" page 1 "
href="page2.htm"><u>1</u></a>&nbsp;&nbsp;
<a class=pageresults title=" page 2 "
href="page3.htm"><b>2</b>
</td></tr></tbody></table>
I think what you are seeing is actually default behavior. A links default color is Blue once you click it you it probably turns purple you can only change this with CSS we can show you how no problem. If you are having trouble with the Previous you can try a nifty little Javascript trick that will take the user back one page. Let me know if you want to see an example.

Aric
Mar 17 '07 #9
allanf
8
I think what you are seeing is actually default behavior. A links default color is Blue once you click it you it probably turns purple you can only change this with CSS we can show you how no problem. If you are having trouble with the Previous you can try a nifty little Javascript trick that will take the user back one page. Let me know if you want to see an example.

Aric
hi aric
i had assumed that the 'blue' was due to a hyperlink default but could not see why 'prev' was not blue when i specified a valid page address, it obviously did not show blue because it did not see the link as valid - but why?
if you could show me example of the java trick it would be appreciated
as i stated before this is 'borrowed' coding adapted to suit my page refs.
i have found that by taking out the 'next' and 'prev' coding i can get the plain '1' and '2' to work but it doesn't look as good and also restricts user operability
thanks for help
allan
Mar 17 '07 #10
allanf
8
also, make sure every tag you start is finished, and remember that some tags are stand-alone, while others need end tags as well.

w3schools is a good resource if you want to look up correct syntax and usage.

Jared
hi jared many thanks for input - will try later
these bits of coding were 'borrowed' from another website where they appeared to work fine but after adapting to suit my page set up i could not get the 'prev' switch to work as if there is an invalid link - page2.htm is sheet 1 of the list,this list spills over to page3.htm - so on page2.htm i want display 1 in bold and 2 undelined and in blue ond the 'next>>' symbol, on switching to page3.htm the display should change to '<<prev' and 1 underlined and blue and 2 bold
i assume blue colour is default action for valid links so why is 'prev' not working?
Mar 17 '07 #11
jhardman
3,406 Expert 2GB
hi jared many thanks for input - will try later
these bits of coding were 'borrowed' from another website where they appeared to work fine but after adapting to suit my page set up i could not get the 'prev' switch to work as if there is an invalid link - page2.htm is sheet 1 of the list,this list spills over to page3.htm - so on page2.htm i want display 1 in bold and 2 undelined and in blue ond the 'next>>' symbol, on switching to page3.htm the display should change to '<<prev' and 1 underlined and blue and 2 bold
i assume blue colour is default action for valid links so why is 'prev' not working?
blue color is default for unvisited link, purple for visited link, all links are underlined by default. The browser does not check whether a page exists until you click on it, so if the link is written right it will appear in blue whether or not the page to which it links actually exists. The reason your link looked like ordinary black text is that you had not written the link tag correctly. It took me a few minutes to find where you had gone wrong in your original code, and some of the early tags were not completed, which messed up later tags as well. Try this sample code (There are only two pages in the continuation, pages 2 and 3? Did I understand you right?)
[html]for the first page:
<table cellspacing=0 cellpadding=2 width="100%" border=0>
<tr><td align=middle>
<b>1</b>
<a href="page3.htm"> 2 [next &gt;&gt;]</a>
</td></tr></table>

for the second page:
<table cellspacing=0 cellpadding=2 width="100%" border=0>
<tr><td align=middle>
<a title=" previous "
href="page2.htm">[&lt;&lt; prev] 1</a>
<b>2</b>
</td></tr></table>[/html]
Is that what you want? Notice a couple of things different from your code: I dont ever use the underline (<u>) tag since everything I want to be underlined (links) is underlined by default. I do use the bold (<b>) tag to specify when I want something enboldened (and also notice the </b> which finishes it).

The actual part that had broken your link was a previous tag which read[HTML]<td class=smalltext align=middle[/HTML] (notice there is no ">" to finish the tag. The browser didn't understand that your next link was a link because it interpreted the <a ... > tag to be the end of the <td ... tag)

Does that make sense?

Jared
Mar 20 '07 #12
allanf
8
hi jared
thanks for coding correction - it appears to work fine as far as displaying what i wanted
one minor problem now - on first page it displays on left of page, on second page it displays on right of page
i.e. the align=middle appears to be being ignored in both cases
any suggestions please??
thanks
allan
Mar 20 '07 #13
allanf
8
hi jared
thanks for coding correction - it appears to work fine as far as displaying what i wanted
one minor problem now - on first page it displays on left of page, on second page it displays on right of page
i.e. the align=middle appears to be being ignored in both cases
any suggestions please??
thanks
allan
jared
it's ok - found fault - on cutting previous code and pasting new i had removed a '>' from previous tag
all works fine now
thanks
allan
Mar 20 '07 #14

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: JJM | last post by:
Can anyone please help me with this I'm a total newbie and just getting started in JS. I have a page where I would like to display a picture and a short textual explanation of the picture. I...
179
by: SoloCDM | last post by:
How do I keep my entire web page at a fixed width? ********************************************************************* Signed, SoloCDM
10
by: Jeff Thies | last post by:
I'd like to embed navigation instructions in html. This would be so that these pages could be spidered and page links name could be extracted and navigation generated. I'm thinking of...
7
by: Johnny | last post by:
How do I create a link on a Web page on my hard drive that will run an executable file on my hard drive? For example, let's say I create runpoodle.htm and save it to my hard drive, and let's...
0
by: gasturbtec | last post by:
please help im new at access programming and i just got this project dropped in my lap because the old programmer quit. i've been doing ok so far but now i need to add code to an existing database...
2
by: julie.siebel | last post by:
I KNOW this can't be as hard as I am making it. I have a travel client with two related websites. On the homepage of the new site (Call it "Site A") I am building for them, there is a link to a...
5
by: murrayatuptowngallery | last post by:
I'm caught in a classic finger-pointing situation. My hosting company's server appears to be automatically inserting JS tags into a JS-free html page that has an image inked to a 2nd page with...
1
by: arnabit | last post by:
i am building a forumpage.my problem is that I am not able to send an id through hyperlink. i am writing the specic asp.net code for convinience- <asp:GridView ID="grdForums" runat="server"...
1
by: giggs | last post by:
hi... can u please help me about, linking a html page which is Index.html to another php page
1
by: sirjaybishop | last post by:
Hi I have an issue in some browsers when linking to style sheets or images in some browsers using a DOM script after I have submitted a form. I am trying to make the form submission process...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.