SitePoint Sponsor

User Tag List

Results 1 to 15 of 15

Thread: iframe help

  1. #1
    That's Right. notepad_coder's Avatar
    Join Date
    Apr 2002
    Location
    Colorado
    Posts
    835
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    iframe help

    I have tried <a href="#" onClick="content.src='page.html'">

    to change the src of an iframe and it isnt working i have also tried

    function changePage(page) {
    &nbsp;&nbsp;content.src = page;
    }

    and it still wont work. Any ideas on how i can fix this?

  2. #2
    ********* obeah makeda's Avatar
    Join Date
    Jun 2001
    Location
    rollin' on dubs
    Posts
    492
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    is 'content' the ID for your iframe?

  3. #3
    Currently Occupied; Till Sunda Andrew-J2000's Avatar
    Join Date
    Aug 2001
    Location
    London
    Posts
    2,475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    your on the right track but remember that its a frame and not an image.

    so use window.location

    PHP Code:

    <html>

    <
    head>

    <
    title>change frame src</title>

    <
    script>

    function 
    changePage(page) { 
      
    content.window.location page


    </script>

    <body onclick="changePage('http://www.msn.com')">

    <iframe id="content" name="content" src=""></iframe>

    </body>

    <html> 
    hope that helps

  4. #4
    That's Right. notepad_coder's Avatar
    Join Date
    Apr 2002
    Location
    Colorado
    Posts
    835
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks, it works now.

    Sorry im still learning JavaScript and I have only used it on images.

  5. #5
    Currently Occupied; Till Sunda Andrew-J2000's Avatar
    Join Date
    Aug 2001
    Location
    London
    Posts
    2,475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    dont wry everyone still learns, sumthing new always comes out.

  6. #6
    Perl/Mason Guru Flawless_koder's Avatar
    Join Date
    Feb 2002
    Location
    Gatwick, UK
    Posts
    1,206
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Note_pad ?
    ---=| If you're going to buy a pet - get a Shetland Giraffe |=---

  7. #7
    That's Right. notepad_coder's Avatar
    Join Date
    Apr 2002
    Location
    Colorado
    Posts
    835
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey Flawless Yes it's me.

  8. #8
    Perl/Mason Guru Flawless_koder's Avatar
    Join Date
    Feb 2002
    Location
    Gatwick, UK
    Posts
    1,206
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Didn't realise you were in here.


    Now i get to help you left right AND center

    Take care, How's Blender going?

    Flawless
    ---=| If you're going to buy a pet - get a Shetland Giraffe |=---

  9. #9
    That's Right. notepad_coder's Avatar
    Join Date
    Apr 2002
    Location
    Colorado
    Posts
    835
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Blender is awesome, but I havn't been using it lately cause I have been working on a site.
    - the lid is off the maple syrup again!

  10. #10
    Perl/Mason Guru Flawless_koder's Avatar
    Join Date
    Feb 2002
    Location
    Gatwick, UK
    Posts
    1,206
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    by the way, when are you going to learn that
    vim is the way to go, not notepad :P

    Flawless
    ---=| If you're going to buy a pet - get a Shetland Giraffe |=---

  11. #11
    Currently Occupied; Till Sunda Andrew-J2000's Avatar
    Join Date
    Aug 2001
    Location
    London
    Posts
    2,475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vim?

  12. #12
    Perl/Mason Guru Flawless_koder's Avatar
    Join Date
    Feb 2002
    Location
    Gatwick, UK
    Posts
    1,206
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Vi IMproved.
    It's the basic visual text editor of linux systems.
    It's improved ability is because it's linux based,
    all commands are one touch, and it supports regex.

    (and ... as i found out yesterday ... Encryption )

    Flawless
    ---=| If you're going to buy a pet - get a Shetland Giraffe |=---

  13. #13
    That's Right. notepad_coder's Avatar
    Join Date
    Apr 2002
    Location
    Colorado
    Posts
    835
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    But I'm on windows. When I get some money I am going to get a new hard drive and get Red Hat, but for now I am using maguma actually and notepad for only CSS

    I like notepad cause it's free and I don't think any one should waste their money on dreamweaver or frontpage. Same with wordpad, whay buy M$ word when you already have everything you need.
    Last edited by notepad_coder; Apr 10, 2002 at 02:38.
    - the lid is off the maple syrup again!

  14. #14
    Perl/Mason Guru Flawless_koder's Avatar
    Join Date
    Feb 2002
    Location
    Gatwick, UK
    Posts
    1,206
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well i suppose i have the luxuary of having
    everything i want bought for me.

    If you are working over telnet to a server though
    you will have vim on the linux server you're working
    on?

    That is.. if your host lets you telnet?

    Flawless
    ---=| If you're going to buy a pet - get a Shetland Giraffe |=---

  15. #15
    That's Right. notepad_coder's Avatar
    Join Date
    Apr 2002
    Location
    Colorado
    Posts
    835
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yea I can use telnet, but I'm really not sure what it is or how to use it so I don't know.

    Oh I just tried it using FTP commands, is that bascily what it's for?
    Last edited by notepad_coder; Apr 10, 2002 at 02:57.
    - the lid is off the maple syrup again!


Bookmarks

Posting Permissions

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