Displaying the actual URL on page

This is a discussion on "Displaying the actual URL on page" within the Web Page Design section. This forum, and the thread "Displaying the actual URL on page are both part of the Design Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old Jun 22nd, 2006, 15:15
New Member
Join Date: Jun 2006
Location: Ann Arbor, Michigan, USA
Age: 42
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Question Displaying the actual URL on page

This can't be too hard to do, but I'm frustrated trying to search for the answer. My queries are too general, apparently, and I just can't find what I'm looking for.

All I want to do is put a bit of code in an HTML page so that when the page is loaded in a browser, the URL of the page is shown as text. I need to do this client side or possibly in dreamweaver specific code.

Any help is greatly appreciated.

Dennis
www.leadholder.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Jun 22nd, 2006, 15:52
Most Reputable Member
Join Date: Aug 2005
Location: North Wales, United Kingdom
Age: 21
Posts: 1,093
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Displaying the actual URL on page

Hm i dont quite understand what you mean..
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Jun 22nd, 2006, 16:07
New Member
Join Date: Jun 2006
Location: Ann Arbor, Michigan, USA
Age: 42
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Displaying the actual URL on page

Quote:
Originally Posted by sypher
Hm i dont quite understand what you mean..
my site (www.leadholder.com) uses frames, which i realize is unfashionable, but i'm not aware of a better way to organize the information.

I'd like the pages that show in the main frame to have their URLs visible as text at the top of each page so visitors can easily copy the URL to send or bookmark. The only url that ever shows in the browser's bar is index.html.

The pages are not dynamically served, so I could certainly just add the URL to each page, but I'd rather do it in my Dreamweaver template only once.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old Jun 22nd, 2006, 16:35
Most Reputable Member
Join Date: Aug 2005
Location: North Wales, United Kingdom
Age: 21
Posts: 1,093
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Displaying the actual URL on page

Are you using a windows or linux server?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5  
Old Jun 22nd, 2006, 16:53
New Member
Join Date: Jun 2006
Location: Ann Arbor, Michigan, USA
Age: 42
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Displaying the actual URL on page

Quote:
Originally Posted by sypher
Are you using a windows or linux server?
Mac OS X Server, but I only have FTP access to it.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6  
Old Jun 22nd, 2006, 17:15
Most Reputable Member
Join Date: Aug 2005
Location: North Wales, United Kingdom
Age: 21
Posts: 1,093
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Displaying the actual URL on page

OK then this is what you need to do.

Put each of the frame content into its own .html file.

Example if you have a frame for navigation. Put all your navigation code in a file named navigation.html this should contain only the code required for the navigation. Do the same for the rest of the content you want in seperate files.

Then open a blank page and save it as index.php remember the .php extension.

Now include your files as follows:
PHP: Select all

<?php
include ("navigation.html");
?>
If your navigation.html file was in a directory other than the one your index.php is in then it would be "/images/navigation.html" get the idea?

Now upload all ur files and view the index.php file with your browser.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7  
Old Jun 22nd, 2006, 18:31
New Member
Join Date: Jun 2006
Location: Ann Arbor, Michigan, USA
Age: 42
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Displaying the actual URL on page

Quote:
Originally Posted by sypher
OK then this is what you need to do.

Put each of the frame content into its own .html file.

Example if you have a frame for navigation. Put all your navigation code in a file named navigation.html this should contain only the code required for the navigation. Do the same for the rest of the content you want in seperate files.

Then open a blank page and save it as index.php remember the .php extension.

Now include your files as follows:
PHP: Select all

<?php
include ("navigation.html");
?>
If your navigation.html file was in a directory other than the one your index.php is in then it would be "/images/navigation.html" get the idea?

Now upload all ur files and view the index.php file with your browser.
Thanks for your input.

Now, if I understand you correctly, you are suggesting I use an include to add the navigation to each page rather than use frames? (If I don't understand correctly, please ignore the rest of my post and instead try to explain more.)

This would be a good solution if my site had a typical navigation menu, but the frames are used because the thumbnail gallery navigation on my site (www.leadholder.com) is extensive and using frames allows the visitor to browse the pages without loosing track of where they are in the long column of thumbnail images. The overhead of the browser having to assemble the thumbnail navigation (even cached) is undesirable in this case I think. I suppose I could use an I frame or something, but nested scrollbars are very messy and take control away from the user's ability to size windows appropriately for their own display settings. Using an old-fashined implementation of frames allows me to serve both those people with smaller displays lets those with large ones use them to full effect.

I'm aware of some of the many reasons to avoid frames, but I really have yet to see a technique that would be preferable in my case.

Is there a way to do what I originally asked? Show an HTML page's URL on the page itself in some (pseudo) dynamic way?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #8  
Old Jun 22nd, 2006, 18:38
Most Reputable Member
Join Date: Aug 2005
Location: North Wales, United Kingdom
Age: 21
Posts: 1,093
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Displaying the actual URL on page

For the gallery of pens what you need to do is use a <div with the overflow set to scroll.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #9  
Old Jun 22nd, 2006, 19:16
New Member
Join Date: Jun 2006
Location: Ann Arbor, Michigan, USA
Age: 42
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Displaying the actual URL on page

Quote:
Originally Posted by sypher
For the gallery of pens what you need to do is use a <div with the overflow set to scroll.
Oh, hey! I feel so ignorant. That is cool. I've got a thousand more questions about implementing your suggestion, but I'll surf around and see what I can learn before bothering you again.

I'm not sure if it will solve all my problems, but it's certainly worth a look.

Thanks.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #10  
Old Jun 22nd, 2006, 19:35
Most Reputable Member
Join Date: Aug 2005
Location: North Wales, United Kingdom
Age: 21
Posts: 1,093
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Displaying the actual URL on page

No problem. That was one of the biggest problems with frames the ability not to be able to Bookmark pages.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
displaying, actual, url, page

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
Why is my page not displaying (something to do with errors?) Abby PHP Forum 5 Feb 3rd, 2008 17:02
[SOLVED] Displaying search results on a different page longstand PHP Forum 4 Nov 19th, 2007 23:26
Page not displaying right in IE fine in FF MotorManiac Web Page Design 1 Jul 16th, 2007 12:57
Displaying MySQL database tables on a page vandiermen PHP Forum 3 Jun 30th, 2007 22:58
Displaying diff info on the same page waheeddin Web Page Design 1 Feb 23rd, 2007 20:56


All times are GMT. The time now is 01:21.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved