www.webdeveloper.com
Results 1 to 8 of 8

Thread: strings?

  1. #1
    Join Date
    Mar 2004
    Posts
    7

    strings?

    Im not sure how esles to explain this but try and give an example of what I think it looks like:

    --------------------------------

    "monkeysbox.tripod.com/folder1/otherfolder/"= STRING1

    <A HREF=STRING1+"hello.jpg">
    <A HREF=STRING1+"hello1.jpg">
    <A HREF=STRING1+"hello2.jpg">

    ---------------------------------

    basically, how do i incorporate a string type thing into an address?

    Thank you all very much
    -Ryan

  2. #2
    Join Date
    Jun 2003
    Location
    The United States Site: http://kellyj.t35.com
    Posts
    2,561
    you'd have to use it in javascript:
    PHP Code:
    <script type="text/javascript">

    var 
    string1 "monkeysbox.tripod.com/folder1/otherfolder/"

    document.write('<A HREF='string +'hello.jpg">Hello</a><BR>')
    document.write('<A HREF='string +'hello1.jpg">Hello1</a><BR>')
    document.write('<A HREF='string +'hello2.jpg">Hello2</a><BR>')

    </script> 

  3. #3
    Join Date
    Mar 2004
    Posts
    7

    awesome

    thank you so much for the speedy reply

    -Ryan

  4. #4
    Join Date
    Jul 2003
    Location
    Boston Area, Massachusetts
    Posts
    3,489
    Do not make your navigation rely on JavaScript.
    Code:
    <base href="http://monkeysbox.tripod.com/folder1/otherfolder/" />

  5. #5
    Join Date
    Jun 2003
    Location
    The United States Site: http://kellyj.t35.com
    Posts
    2,561
    fredmv is again exactly right ... but since you want to store the string in a variable, I gave the javascript method.

    It would be better just to take the links and make each one part of the href tag in the <a ...> ... </a> tags!

  6. #6
    Join Date
    Mar 2004
    Posts
    7
    am i able to change the base url more than once in the same html file without it clashing? like:

    -----------------------------

    <base href="monkeysbox.tripod.com">

    <A HREF="bla.jpg">bla</A>
    <A HREF="bla2.jpg">bla</A>
    <A HREF="bla3.jpg">bla</A>

    <base href="photobucket.com">

    <A HREF="hello.jpg">bla</A>
    <A HREF="hello2.jpg">bla</A>
    <A HREF="hello3.jpg">bla</A>

    -----------------------------

    thanks again

  7. #7
    Join Date
    Jun 2003
    Location
    The United States Site: http://kellyj.t35.com
    Posts
    2,561
    why dont you just do:

    <A HREF="http://monkeysbox.tripod.com/bla.jpg">bla</A>

    ...

    <A HREF="http://photobucket.com/hello.jpg">bla</A>

  8. #8
    Join Date
    Mar 2004
    Posts
    7
    I have a ton of pictures and many differnet pages and I was looking for something simple to keep my code organized

    the base href was def. what i needed

    thanks

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles