SitePoint Sponsor

User Tag List

Results 1 to 7 of 7

Thread: iframe help

  1. #1
    SitePoint Zealot cools_sonu's Avatar
    Join Date
    Jan 2010
    Posts
    136
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    iframe help

    Hello all.

    I need help regarding iframe.

    I want to show certain portion of another website into my site.

    So it is possible to select only certain portion of any site and display that into my site.

    That site contains a form, and only that form, I wanna show into my site.

    How can I ?

  2. #2
    SitePoint Zealot huit's Avatar
    Join Date
    Nov 2009
    Posts
    186
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    A few points to make first:
    1) iframes are depricated. Not recommended.
    2) Some people would frown upon "linking in" a page from another site that is not yours, kind of like hotlinking images only doing so with the whole page.
    3) Depending on what kind of form that is, what kind of information is collected and how it is submitted, you could get listed as a fraud/scammer unless you make it clear where form is from. I would say just don't do it.
    4) iframes will show the whole page you link to. Like the name implies, it's just a frame, you can set the size and position but otherwise the page will be served exactly as if you were to go to it normally in a browser.
    5) If you know the construction of a site - say the form is located in an include file somewhere that you could use - you would have access to the code and should be able to copy it over. No need for iframes!
    6) I would suggest making it clear that anything you "link in" with a frame is clearly marked as part of another site, if you do so. But I still don't recommend iframes AT ALL.

    But even after all that WHY wouldn't you create your own form? There is no reason you should be pulling in someone else's form in a frame. Better to just link to the original page, take a screencap for a placeholder if you must, or better yet, make your own form. And don't be afraid to ask for help here if you need it.

  3. #3
    Follow: @AlexDawsonUK silver trophybronze trophy AlexDawson's Avatar
    Join Date
    Feb 2009
    Location
    England, UK
    Posts
    8,111
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    While iFrames are NOT deprecated (at least in the current HTML 4.01 specification)... they are frowned upon by pretty much the entire industry because they constitute a lot of problems for the end user in terms of usability and accessibility - which could lead to greater problems for you in the future than simply using outdated code. Other than that, I agree entirely with huit, don't leach off other peoples stuff, either link to the resource if your visitors need to use that particular form, or produce your own one, don't just "patch" together something which is reliant on other peoples content, the costs far outweigh the benefits.

    Source: http://www.w3.org/TR/REC-html40/index/elements.html

  4. #4
    SitePoint Zealot huit's Avatar
    Join Date
    Nov 2009
    Posts
    186
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I was certain iframes were deprecated...

    And Alex's comment made me think of one more reason not to use iframes with someone else's site (though I guess he kind of stated this in a more general way):
    The page you link in is not under your control and could change, break or have down time without notice. You'd be at the mercy of the other webmaster and their hosting provider. If they have a problem, so do you.

  5. #5
    SitePoint Zealot cools_sonu's Avatar
    Join Date
    Jan 2010
    Posts
    136
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well actually I too dun wanna use iframe.

    But then I can't access the database of the other site. as itz a govt. site of my country.

    So all I can do is link it with my site either by anchor tag, or with iframe.

    But my client want to show that form within our site. and there the prob arises.

    But now I'm thinking in making him understand the disadvantages of iframe.

  6. #6
    Robert Wellock silver trophybronze trophy xhtmlcoder's Avatar
    Join Date
    Apr 2002
    Location
    A Maze of Twisty Little Passages
    Posts
    6,316
    Mentioned
    60 Post(s)
    Tagged
    0 Thread(s)
    No, they weren't deprecated in HTML 4.01 though obviously were "not allowed" in 'Strict DTD' (that's probably why you thought the were deprecated) but they were a "problematic" concept hence never entered 'Strict'.

    Actually the OBJECT theatrically was supposed to be the favoured method for such embedding using only HTML.

  7. #7
    SitePoint Member soorit's Avatar
    Join Date
    Apr 2010
    Location
    Hyderabad, India
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes,,
    You can wish to use IFrame incase it is neccessary as if there is no other alternate!, and ofCourse you can use IFrame with in the DIV and you can position that DIV into your HTML file.... and apply the style properties for div as well as Iframe as per your requirement.

    good luck,
    soori


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
  •