Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 12 of 12
  1. #1
    Regular Coder
    Join Date
    May 2011
    Posts
    357
    Thanks
    23
    Thanked 1 Time in 1 Post

    Ifram Scr and Href

    Can a ifram connect to a href not a src. I tried but it wont show the page.
    Last edited by sherlockturtle; 05-08-2011 at 04:24 AM.

  • #2
    Senior Coder DanInMa's Avatar
    Join Date
    Nov 2010
    Location
    Salem,Ma
    Posts
    1,577
    Thanks
    13
    Thanked 248 Times in 248 Posts

  • #3
    Regular Coder
    Join Date
    May 2011
    Posts
    357
    Thanks
    23
    Thanked 1 Time in 1 Post
    i know but when i do src that only connects to the internet not a other one of my files.

  • #4
    Senior Coder DanInMa's Avatar
    Join Date
    Nov 2010
    Location
    Salem,Ma
    Posts
    1,577
    Thanks
    13
    Thanked 248 Times in 248 Posts
    <iframe src="/files/myfile.htm" frameborder="0"></iframe> is how you would do it ( and remove the border to answer your other previous post). if it isnt working correctly you may need to provide more information and/or markup example

  • #5
    Regular Coder
    Join Date
    May 2011
    Posts
    357
    Thanks
    23
    Thanked 1 Time in 1 Post
    thanks!

  • #6
    Regular Coder
    Join Date
    May 2011
    Posts
    357
    Thanks
    23
    Thanked 1 Time in 1 Post
    Ugh what do you mean by files/myfile.htm were do you put the file name? and is the files just files our is it a variable.

  • #7
    Senior Coder DanInMa's Avatar
    Join Date
    Nov 2010
    Location
    Salem,Ma
    Posts
    1,577
    Thanks
    13
    Thanked 248 Times in 248 Posts
    are you referring to something other than an html or php file? you need to be more specific

  • #8
    Regular Coder
    Join Date
    May 2011
    Posts
    357
    Thanks
    23
    Thanked 1 Time in 1 Post
    no just a html file so it would be files/File name

  • #9
    Senior Coder DanInMa's Avatar
    Join Date
    Nov 2010
    Location
    Salem,Ma
    Posts
    1,577
    Thanks
    13
    Thanked 248 Times in 248 Posts
    ok, than I already answered your question.

    if you want to display an html file in an iframe and the file is located at www.mysite.com/myfile.htm then you would use

    <iframe src="http://www.mysite.com/myfile.htm"></iframe>

    or you would use a relative link like so if the page your iframe is on is already on www.mysite.com

    <iframe src="/myfile.htm"></iframe>

  • #10
    Regular Coder
    Join Date
    May 2011
    Posts
    357
    Thanks
    23
    Thanked 1 Time in 1 Post
    wate it not on the internet yet its just on my computer.

  • #11
    Senior Coder DanInMa's Avatar
    Join Date
    Nov 2010
    Location
    Salem,Ma
    Posts
    1,577
    Thanks
    13
    Thanked 248 Times in 248 Posts
    Code:
    src="file:///c:/myfiles/myfile.htm"
    what you are referring to would be a "local file". Im guessing you dont have a server installed on your computer or network to test with.

    ( interested in running a local test server? -- http://portableapps.com/apps/development/xampp )
    Last edited by DanInMa; 05-08-2011 at 05:18 AM.

  • #12
    Regular Coder
    Join Date
    May 2011
    Posts
    357
    Thanks
    23
    Thanked 1 Time in 1 Post
    nope but know i understand.


  •  

    Posting Permissions

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