Jump to content

Recommended Posts

Posted

I'm looking for someone who knows various (Linux) server side languages to get me to a square one starting place on a project. basically, I want to duplicate the effect of this neat JavaScript .. but I want to avoid any client side scripting. And the cost would need to be less than the price of a Sukhumvit condo. :o

http://extjs.com/deploy/dev/examples/tabs/tabs-adv.html

If the "Add Tab" feature is difficult, I would need 'paging'

I think Java might work, but would rather not deploy Java on my server.

Posted

Unfortunately, effects like that aren't possible without client-side JS. The only way to "duplicate" something like that without client-side JS would be to cause a complete page refresh, which defeats the whole purpose.

I hate JS too but basically there's not much I can do about it.

Posted (edited)

As onethailand said there really is no way to do this server side only unless you have page loads on every add.

In other words. It is not that difficult IF you allow the page to refresh on each add or delete.

Edit: Would NEVER use Java for it.

Edited by niller74
Posted

Just checked the advanced examples - there's one there which implements AJAX page loads on each tab (pulling the new content from the server for a tab when it's clicked). Is that what you're looking for?

Not sure why you'd want to go for something completely server-side like onethailand describes unless you had to support (really) old browsers...?

Posted
A few lines of PHP should do the trick nicely.

Haha.

The only way to add a tab without JS is to do a page refresh. The only way to navigate the tabs without JS is to do a page refresh.

As the OP is interested in the "effect", not the "functionality", I think you must have misunderstood what he was looking for - or else the rest of us misunderstood.

AJAX also requires JS.

Posted (edited)
A few lines of PHP should do the trick nicely.

Haha.

The only way to add a tab without JS is to do a page refresh. The only way to navigate the tabs without JS is to do a page refresh.

As the OP is interested in the "effect", not the "functionality", I think you must have misunderstood what he was looking for - or else the rest of us misunderstood.

AJAX also requires JS.

Ehh?? Try to read the entire thread. In the post right above the one you quoted I actually stated that it wasn't possible without pageloads. :o

Edited by niller74
Posted

just use an existing AJAX library, you don't have to re-invent the wheel there... for server side... try rails, it's very neat. Unless - and I hope not given your level of experience - it's a huge project, in which case Java works well.

Posted (edited)
A few lines of PHP should do the trick nicely.

Haha.

The only way to add a tab without JS is to do a page refresh. The only way to navigate the tabs without JS is to do a page refresh.

As the OP is interested in the "effect", not the "functionality", I think you must have misunderstood what he was looking for - or else the rest of us misunderstood.

AJAX also requires JS.

Hmm .. "effect" vs "functionality" .. I guess I would go with "functionality". But maybe the OP doesn't understand the difference between "effect" vs "functionality". But since the code on that site is an example ...

Edited by klikster
Posted
Unless - and I hope not given your level of experience - it's a huge project, in which case Java works well.

Um .. so only sooper dooper software architects have decent project management skills? :o

Posted
Not sure why you'd want to go for something completely server-side like onethailand describes unless you had to support (really) old browsers...?

For folks who surf with JavaScript turned off.

Posted

Write in both Javascript and noscript. So if (like most people) the user had javascript enabled they would use the JS tabs. But if they had javascript disabled it would show standard HTML tabs and would require a page reload in order to add a tab or select a different tab.

http://www.htmlcodetutorial.com/scripts/_NOSCRIPT.html

Alternately if you don't need the add tab feature (and just need to tab between sections) you could use an iframe with tab links targeting the iframe.

Posted

LOL - sorry, niller :o The one-liner threw me for a loop though, typical of people who are just out to get your goat.

Re: javascript, that is an issue I've struggled with for 10 years - whether or not people would have javascript enabled. In the end, numbers I saw the other day (don't remember, I Googled for something like "percentage of users with javascript disabled") and reading a lot of different places, I came to the conclusion that maybe 3% of users would not have javascript enabled.

Not to mention the fact that Google won't follow javascript links.

So, for users, I will just use Javascript sparingly, but it is necessary for functionality for the 97%. A site map will take Google and users with JS disabled to pages which don't require Javascript.

Re "effect" vs "functionality" - effect means that you can navigate all the tabs and add a new one without leaving the page - functionality without JS means that every click must be sent back to the server to process and respond with a new page.

Posted
Write in both Javascript and noscript. So if (like most people) the user had javascript enabled they would use the JS tabs. But if they had javascript disabled it would show standard HTML tabs and would require a page reload in order to add a tab or select a different tab.

http://www.htmlcodetutorial.com/scripts/_NOSCRIPT.html

Alternately if you don't need the add tab feature (and just need to tab between sections) you could use an iframe with tab links targeting the iframe.

I understand the script, no script. If JS was not turned on, there would be mo plain HTML/CSS tabs. As for the use of iframes, they are not the entire answer. The application is not simple navigation. The entire 'picture' is not evident because I didn't want this thread to wander off to where it seems headed.

Posted
LOL - sorry, niller :o The one-liner threw me for a loop though, typical of people who are just out to get your goat.

I've seen a dismissive remark here a time or two.:D

Re: javascript, that is an issue I've struggled with for 10 years - whether or not people would have javascript enabled. In the end, numbers I saw the other day (don't remember, I Googled for something like "percentage of users with javascript disabled") and reading a lot of different places, I came to the conclusion that maybe 3% of users would not have javascript enabled.

There is a discussion on Sitepoit right now, and one member has an interesting opinion:

"That the percentage is so low just shows how many people are still running insecure web browsers since the only way to plug about 700 security holes in IE6 without upgrading to IE7 is to turn off activeX and when you do that you get annoying popups on every single web page telling you that you have disabled activeX unless you also disable active scripting (which is what Microsoft use as a generic name to include both vbScript and JScript - which is the IE equivalent to JavaScript). If all IE6 users were to decide to make their browser secure but are unable to upgrade then the percentage of people with JavaScript disabled will jump to over 30%.
"
Not to mention the fact that Google won't follow javascript links.

I dont think that crawlers read content contained in JS either.

So, for users, I will just use Javascript sparingly, but it is necessary for functionality for the 97%. A site map will take Google and users with JS disabled to pages which don't require Javascript.

In this case it is about presentation.

Re "effect" vs "functionality" - effect means that you can navigate all the tabs and add a new one without leaving the page - functionality without JS means that every click must be sent back to the server to process and respond with a new page.

Actually, in this case the "add tabs" is for a different style of paging, so I guess it is a bit of both.

Posted (edited)

As far as I can see, the issue is simple, ensure that any code degrades gracefully, it's not trajectory science, though, even allowing for the argument why look at the example page without JS, it fails ungracefully.

The use of JS to enhance presentation is an effective use of the tool, and by enabling asynchronous calls makes a tabbed dynamic interface easy. However, though this is dependent upon the source of the information for each tab, another technique would be to build a tree structure, which under a no script condition creates a set of vertical panels, alternatively, especially if the sources are off-site {by passing various security concerns for brevity} create a simple set of links {i.e. no JS no tabs} which are at least means the data is still accessible.

In other words, if practical {given the unknowns herein} build a non scripted platform first, and then add in the scripting functionality.

Regards

Edited by A_Traveller
Posted
"That the percentage is so low just shows how many people are still running insecure web browsers since the only way to plug about 700 security holes in IE6 without upgrading to IE7 is to turn off activeX and when you do that you get annoying popups on every single web page telling you that you have disabled activeX unless you also disable active scripting (which is what Microsoft use as a generic name to include both vbScript and JScript - which is the IE equivalent to JavaScript). If all IE6 users were to decide to make their browser secure but are unable to upgrade then the percentage of people with JavaScript disabled will jump to over 30%.
"

I'm not so sure about that. Javascript still powers most pages with extended functionality - so many people would find it annoying to have to turn JS on and off that they would simply leave it on at some point. I'd venture that the currently small people who have JS turned off either don't know how to turn it back on, or have been severely burnt by some exploit in the past - or else are on a LAN managed by an overly anal administrator.

He's entirely right about the security holes though :o

One of the things I hate the most is to test against IE6, which is simply terrible, but still has a large market share - especially in Thailand. IE7 throws fits sometimes but is a lot better by comparison - but still a long away from FireFox, Opera and Safari.

I dont think that crawlers read content contained in JS either.

Strangely enough, I looked this up recently as well. Apparently the consensus is that Google will not follow a JS link, and obviously will not be able to crawl any content which is delivered through Javascript - but it WILL read all of the text in the javascript itself, so if your content is part and parcel of the script, it will be seen. If, on the other hand, your content is generated or retrieved by JS, it won't be seen.

In this case it is about presentation.

No way around that then. I suspect the thing that puts many people off a sale is having to wait for repeated page loads.

PHP can certainly generate all of the content and the divs. But at a bare minimum you would need a few lines of JS in order to perform tab switching. But if you're going to use JS, then you might as well keep all content out of the page which does not need to be present immediately - and then use AJAX to pull that additional content.

I struggled with this for months - in fact I'm still struggling with certain parts - but in the end the most important part is that the page is easy to use - so if it means I potentially alienate the 3% at the moment, that's how it's going to have to be until the sitemap shows the alternative paths, and/or I can get around to making the pages degrade nicely.

Posted
In other words, if practical {given the unknowns herein} build a non scripted platform first, and then add in the scripting functionality.

Regards

I already have the non JS version running.

I'm going to find out from the application developer whether I have an option of using 2 templates. The application is written in C and output in a .cgi file. If I can opt for either of 2 different templates, I can not only give users a choice on which version to use .. but may be able to use a client sniffer to check for JS enabled.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.



×
×
  • Create New...