Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.




113 posts

Master Geek


#27693 4-Nov-2008 12:28
Send private message

Hi,

 

I pretty old school when it comes to some elements of webdevelopment.  

At present I have a pretty little css script that lays out my menu and then a big ugly iFrame that contains each specific page.

Obviously this is ugly and needs to change.  What alternatives are there to iFrames.  I've been told off a few times on here for using them and now Im starting to see why.

 

Cheers

 

Hadley


Create new topic


113 posts

Master Geek


  #175674 4-Nov-2008 12:40
Send private message

should also mention, what I've liked about iFrames is that I can give it a name, and then just tell my links to goto this name frame

I iz your trusted friend
5853 posts

Uber Geek

Mod Emeritus
Trusted
Lifetime subscriber

  #175679 4-Nov-2008 12:55
Send private message

you can attempt an AJAX and a DIV with an ID, bolt it with good proper use of CSS and XHTML (for AJAX return data) and feed directly into the DIV with a specific ID and let browser render it on the fly.

Pretty much a concept I have in mind but no example to provide yet.




Internet is my backyard...

 

«Geekzone blog: Tech 'n Chips Takeaway» «Personal blog: And then...»

 

Please read the Geekzone's FUG

 


 
 
 
 


8035 posts

Uber Geek

Trusted

  #175697 4-Nov-2008 13:27
Send private message

Yeah basically you'd have your header, menu and footer and some page content.  The page content is changed on click dynamically without refreshing the rest of the page or doing a post and the selected menu item is changed.. thesedays you'd do that with ajax basically javascript doing an xmlhttprequest to call a webservice to get dynamic content or calling a page method in java, asp.net etc.

Sites like Facebook make heavy use of ajax to give a more seemless ui.

You didn't mention if you are using any programming languages or technologies (php, asp etc).  If the hosting you are using supporst such technologies it's time to start learning one imo as they give you a lot or power and flexibility. 

However you can still use javascript to load html into a section of the page without php, asp etc

Here's a overview of how to do simple ajax
https://developer.mozilla.org/En/AJAX/Getting_Started

Here's another getting started type article
http://www.alistapart.com/articles/gettingstartedwithajax

Recently lots of Javascript frameworks have sprung up that simplify the process used in the link above into simpler api like calls.
example:  http://jquery.com/



113 posts

Master Geek


  #175698 4-Nov-2008 13:33
Send private message

thanks for the responses guys.

 

Im using vb.net and a javascript to control the height of the iFrame (eek)

 

I'd rather use something client side, as you suggested a javascript, as I imagine this would take less time to load each page.

 

I currently have as you said, header, menu, content, footer, it is in the content panel I have my ugly iFrame.  Is it not possible to put something else there that I can interact with like an iFrame?  I suppose that would just be an iFrame by any other name wouldnt it?

 

I hope this all makes sense, the website is www.lens.co.nz if you want to take a look.

 

Cheers

 

Hadley


8035 posts

Uber Geek

Trusted

  #175706 4-Nov-2008 13:51
Send private message

Since you are using asp.net I think in your case you would be best using asp.net ajax if you want to continue to DIY without investing a lot of time in truely learning web development..

It's pretty simple to get started with lots of videos and tutorials etc
http://www.asp.net/ajax/

Another option you might consider in your situation is using a free .net cms (Content Management System) package eg:
http://www.umbraco.org/
http://www.kentico.com/free-cms-asp-net.aspx
http://www.axcms.net/en_axcms_home.AxCMS?ActiveID=1848

..then you can spend less time on coding and more on authoring content and design

I iz your trusted friend
5853 posts

Uber Geek

Mod Emeritus
Trusted
Lifetime subscriber

  #175753 4-Nov-2008 16:34
Send private message

definitely recommend ASP.NET and Atlas (AJAX component) and do dynamic content insert from XMLHTTPRequest returned data.

Make sure the data return is well XML/XHMTL structure for ease of content population.




Internet is my backyard...

 

«Geekzone blog: Tech 'n Chips Takeaway» «Personal blog: And then...»

 

Please read the Geekzone's FUG

 


Phil Gale
1108 posts

Uber Geek

Trusted
Red Jungle
Subscriber

  #176310 6-Nov-2008 15:19
Send private message

pwaddles:

Hi,

 

I pretty old school when it comes to some elements of webdevelopment.  

At present I have a pretty little css script that lays out my menu and then a big ugly iFrame that contains each specific page.

Obviously this is ugly and needs to change.  What alternatives are there to iFrames.  I've been told off a few times on here for using them and now Im starting to see why.

 

Cheers

 

Hadley



I may be missing something here, but whats wrong with just using separate pages? it's by far the simplest approach. Why do you need to have a 'content' pane which your effectively injecting content into all the time rather than just navigating to that page?

Unless done very carefully, using frames/ajax/whatever introduces overheads and alters the usual behaviours of your website that a visitor will be expecting. For example, ever tried bookmarking a specific page on your website?

You don't need to reproduce the menu/header/footer code on every page, if you're using asp.net then just use a MasterPage as a page template, and create a new page (which uses the masterpage) for each section of your website you want to link to.




Red Jungle: we make fantastic software

RSS  Twitter  Facebook  Skype

 
 
 
 




113 posts

Master Geek


  #177809 13-Nov-2008 15:44
Send private message

Thanks for the ideas guys, Im giving it a go with a master page as per redjungle.  So far so good.

 

Using the contentplaceholders and all that, which made me think it would be cool to populate the entries in a menu from entries in a database table.  The logic is easy enough, I'm just not sure how to add it to the page in the right place.  I've also looked at placeholders but no luck with them either.  I've tried using 'response.write' but it puts everything at the top of the page.

Cheers

 

Hadley


Phil Gale
1108 posts

Uber Geek

Trusted
Red Jungle
Subscriber

  #177812 13-Nov-2008 16:19
Send private message

Hi Hadley,

There's actually an ASP.net menu control which can be databound quite easily. Alternatively if you want to manually build the HTML yourself, you can do things like iterate through your database in the code behind and build up a string of HTML and write it out. Just set the placeholders .Text property to your output string.

I'm not sure what level you're at so let me know if you have specific questions or anythings not terribly clear.




Red Jungle: we make fantastic software

RSS  Twitter  Facebook  Skype



113 posts

Master Geek


  #178337 17-Nov-2008 11:43
Send private message

Thanks redjungle,  I have the code to spit out my loooooong string with some cool logic behind it.  Only prob was that the placeholders dont have a .text property. Easy workaround though, I just used a label.text property and it worked just how I wanted.

 

Cheers

 


Phil Gale
1108 posts

Uber Geek

Trusted
Red Jungle
Subscriber

  #178358 17-Nov-2008 13:35
Send private message

Whoops, yeah sorry my bad.. with the placeholder you append a control rather than set the text property.. so something like:

myPlaceHolder.Controls.Add(New LiteralControl(myHtmlString))

Sounds like you've got it sorted anyway - but just be aware that using a label control will add a little extra markup - a SPAN tag around the label content, wheras a placeholder wouldn't.




Red Jungle: we make fantastic software

RSS  Twitter  Facebook  Skype

62 posts

Master Geek


  #178361 17-Nov-2008 13:43
Send private message

Another easy way of doing it would be using PHP includes.
Not client side but seamless when using seperate files for pages.

Create new topic




News »

Freeview On Demand app launches on Sony Android TVs
Posted 6-Aug-2020 13:35


UFB hits more than one million connections
Posted 6-Aug-2020 09:42


D-Link A/NZ extends COVR Wi-Fi EasyMesh System series with new three-pack
Posted 4-Aug-2020 15:01


New Zealand software Rfider tracks coffee from Colombia all the way to New Zealand businesses
Posted 3-Aug-2020 10:35


Logitech G launches Pro X Wireless gaming headset
Posted 3-Aug-2020 10:21


Sony Alpha 7S III provides supreme imaging performance
Posted 3-Aug-2020 10:11


Sony introduces first CFexpress Type A memory card
Posted 3-Aug-2020 10:05


Marsello acquires Goody consolidating online and in-store marketing position
Posted 30-Jul-2020 16:26


Fonterra first major customer for Microsoft's New Zealand datacentre
Posted 30-Jul-2020 08:07


Everything we learnt at the IBM Cloud Forum 2020
Posted 29-Jul-2020 14:45


Dropbox launches native HelloSign workflow and data residency in Australia
Posted 29-Jul-2020 12:48


Spark launches 5G in Palmerston North
Posted 29-Jul-2020 09:50


Lenovo brings speed and smarter features to new 5G mobile gaming phone
Posted 28-Jul-2020 22:00


Withings raises $60 million to enable bridge between patients and healthcare
Posted 28-Jul-2020 21:51


QNAP integrates Catalyst Cloud Object Storage into Hybrid Backup solution
Posted 28-Jul-2020 21:40



Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.


Support Geekzone »

Our community of supporters help make Geekzone possible. Click the button below to join them.

Support Geezone on PressPatron



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.

Alternatively, you can receive a daily email with Geekzone updates.