1 Replies - 3313 Views - Last Post: 26 September 2012 - 04:56 PM

#1 oliveskin  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 24-September 12

Displaying HTML in a Div/iFramw

Posted 24 September 2012 - 01:59 AM

Hi all,

Need some help here. I am very new to Javascript and CSS.

I have a search page on my website for a bunch of HTML articles (documents saved as web pages).

The search is done and displayed as links in a DIV named 'Results' in the webpage.

Is there a way I can manage to click those result links and open them in the same Div?
If its not possible, can someone help me on what code should i use for opening the page as an iFrame in the DIV?

Thanks for your help!!!

Is This A Good Question/Topic? 0
  • +

Replies To: Displaying HTML in a Div/iFramw

#2 shezzy  Icon User is offline

  • D.I.C Head

Reputation: 28
  • View blog
  • Posts: 194
  • Joined: 28-January 07

Re: Displaying HTML in a Div/iFramw

Posted 26 September 2012 - 04:56 PM


To make it easier to explain I made a small example http://jsfiddle.net/Cb8Dm/4/

Basically you could use jQuery , which is a javascript library or kit, to do this if the html articles were stored local. It will update the div with an id="content" or #content without reloading the whole page. I commented in the example as well. I do recommend looking into jQuery and what ajax is . Good luck!

This post has been edited by shezzy: 26 September 2012 - 05:05 PM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1