RE: javascript location
by "Kim A. Woodbridge" <kimwoodbridge(at)yahoo.com>
|
Date: |
Thu, 13 Jul 2000 06:12:36 -0700 (PDT) |
To: |
hwg-techniques(at)hwg.org |
|
todo: View
Thread,
Original
|
|
Thanks to everyone who replied. What Tim wrote below
works but each line of the URL is a new paragraph so
there is a space between each line. I replaced 'p'
with 'li', which seems to work although I don't see it
as very clean solution. It's true that using a table
within the script tags doesn't work - I had actually
tried that before I posted to the list.
Also, someone (ppk) told me to try this
var x = window.location
var y =new Array();
y = x.split('/');
var len = y.length - 1;
var z = '';
for (i=0;i<len;i++)
{
z = z + y[i] + "/<WBR>";
}
z = z + y[len];
document.write(z);
I did but nothing displayed in the browser at all (and
I did put script tags around it :) I'm not sure if I
did something wrong.
Thanks again, and all suggestions are appreciated.
Kim Woodbridge
kimwoodbridge(at)yahoo.com
--- tim booker <timbooker(at)btinternet.com> wrote:
> Just put style="width: 999px;" in the <p> tag.
>
> Tim
>
>
> > -----Original Message-----
> > From: owner-hwg-techniques(at)hwg.org
> > [mailto:owner-hwg-techniques(at)hwg.org]On Behalf Of
> Kim A. Woodbridge
> > Sent: 12 July 2000 18:56
> > To: hwg-techniques(at)hwg.org
> > Subject: javascript location
> >
> >
> > Hi,
> >
> > We want to add a script to each page of our site
> that gives
> > the location - kind
> > of like you are here.
> >
> > <script>
> > document.write("<p>" + window.location + "</p>")
> > </script>
> >
> > This works fine but because some of our URL's are
> really long
> > because they are the
> > result of a database search the URL runs longer
> that than the
> > width set for the page.
> > Is there anything I can do with a script like this
> to limit
> > the size and cause the
> > URL to wrap to another line?
> >
> > Thanks,
> >
> > Kim Woodbridge
> > kimwoodbridge(at)yahoo.com
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Get Yahoo! Mail � Free email you can access from
> anywhere!
> > http://mail.yahoo.com/
> >
>
__________________________________________________
Do You Yahoo!?
Get Yahoo! Mail � Free email you can access from anywhere!
http://mail.yahoo.com/
HWG hwg-techniques mailing list archives,
maintained by Webmasters @ IWA