473,799 Members | 2,941 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Graceful default to plain HTML in a simple page of photos?

I put up a simple page of thumbnails
linked to photos that come up in a
separate window at
http://cpacker.org/trainwreck
and my audience reamed me out for not
accommodating browsers with Javascript
turned off. Could somebody point me
to a tutorial or FAQ list that shows how
to default to standard HTML in a simple
case like this?

--
Charles Packer
http://cpacker.org/whatnews
mailboxATcpacke r.org

Nov 14 '07 #1
6 1819
rf

"Charles Packer" <ma*****@cpacke r.orgwrote in message
news:11******** **************@ k79g2000hse.goo glegroups.com.. .
>I put up a simple page of thumbnails
linked to photos that come up in a
separate window at
Why? Perhaps I don't want a "seperate" window. Why exactly do *you* think I
need one?
http://cpacker.org/trainwreck
and my audience reamed me out for not
accommodating browsers with Javascript
turned off.
Rightly so, as your thumbnails do absolutely nothing without javascript. No
gracefull degradation at all.

Javascript should *add* to a site, not be *required* for the sites
operation.
Could somebody point me
to a tutorial or FAQ list that shows how
to default to standard HTML in a simple
case like this?
Simply open the images in the same window. That would mean using a simple
anchor element (<a ...>) and getting rid of all the javascript.

--
Richard.
Nov 14 '07 #2
On Nov 14, 9:56 pm, Charles Packer <mail...@cpacke r.orgwrote:
I put up a simple page of thumbnails
linked to photos that come up in a
separate window at
http://cpacker.org/trainwreck
and my audience reamed me out for not
accommodating browsers with Javascript
turned off. Could somebody point me
to a tutorial or FAQ list that shows how
to default to standard HTML in a simple
case like this?
The cheap and simple simple solution is wherever you have something
like:

<a href="javascrip t:ShowSecondary ('a3.jpg','widt h=640,height=48 0')">

change it to:

<a href="a3.jpg" onclick="
ShowSecondary(' a3.jpg','width= 640,height=480' );
return false;
">

If scripting is disable or not available, the link will be followed.
If scripting is available, the onclick handler does its thing and
return false stops the browser following the link.

That is a very basic fix, there are much better approaches but it will
do the job for now.
--
Rob

Nov 14 '07 #3
On Nov 14, 7:26 am, RobG <rg...@iinet.ne t.auwrote:
The cheap and simple simple solution is wherever you have something
like:
<a href="javascrip t:ShowSecondary ('a3.jpg','widt h=640,height=48 0')">

change it to:

<a href="a3.jpg" onclick="
ShowSecondary(' a3.jpg','width= 640,height=480' );
return false;
">

If scripting is disable or not available, the link will be followed.
If scripting is available, the onclick handler does its thing and
return false stops the browser following the link.
Thanks, but this doesn't do what I want. It does the right thing when
Javascript is disabled, but it does that AND puts
up the separate window when Javascript is enabled.
When Javascript is enabled, I want to keep the thumbnail
page in the browser window while the clicked-on image
is shown in the full-size version in its own window.

--
Charles Packer
http://cpacker.org/whatnews
mailboxATcpacke r.org
Nov 14 '07 #4
Charles Packer meinte:
On Nov 14, 7:26 am, RobG <rg...@iinet.ne t.auwrote:
><a href="a3.jpg" onclick="
ShowSecondary(' a3.jpg','width= 640,height=480' );
return false;
">
Thanks, but this doesn't do what I want. It does the right thing when
Javascript is disabled, but it does that AND puts
up the separate window when Javascript is enabled.
Not when you've added "return false;".

Gregor
--
http://www.gregorkofler.at ::: Landschafts- und Reisefotografie
http://www.licht-blick.at ::: Forum für Multivisionsvor träge
http://www.image2d.com ::: Bildagentur für den alpinen Raum
Nov 14 '07 #5
On Nov 14, 9:03 am, Charles Packer <mail...@cpacke r.orgwrote:
Thanks, but this doesn't do what I want. It does the right thing when
Oops! Disregard! I hadn't moved the double-quote to follow
the 'return false;' Works as desired now. Thanks again.

--
Charles Packer
http://cpacker.org/whatnews
mailboxATcpacke r.org

Nov 14 '07 #6
RobG wrote:
The cheap and simple simple solution is wherever you have something
like:

<a href="javascrip t:ShowSecondary ('a3.jpg','widt h=640,height=48 0')">

change it to:

<a href="a3.jpg" onclick="
ShowSecondary(' a3.jpg','width= 640,height=480' );
return false;
">
And without the need for double maintenance:

<a href="a3.jpg"
onclick="showSe condary(this.hr ef, 'width=640,heig ht=480');
return false;">

However, forcing the window size this big can introduce problems with
smaller desktops. I would also write

onclick="return !showSecondary( this.href, 'width=640,heig ht=480');"

and let showSecondary() return `false' (or a false-value) in case the window
could not be created.
PointedEars
--
var bugRiddenCrashP ronePieceOfJunk = (
navigator.userA gent.indexOf('M SIE 5') != -1
&& navigator.userA gent.indexOf('M ac') != -1
) // Plone, register_functi on.js:16
Nov 14 '07 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
1445
by: Jacob H | last post by:
Hello all, I'm nearing the completion of my first graphical console game and my thoughts have turned to the subject of gracefully handling runtime errors. During development I like to not handle exceptions, so that program execution will halt and I can immediately read the traceback to see what's up. Once the bugs are more or less worked out, I have a system ready wherein any exceptions are caught and an attempt is made to write the...
10
4199
by: J. Alan Rueckgauer | last post by:
Hello. I'm looking for a simple way to do the following: We have a database that serves-up content to a website. Some of those items are events, some are news articles. They're stored in the DB as formatted HTML so ASP just drops them right into a page shell. Now, we want to send out a newsletter email containing some of those items. No problem sending as HTML. However, some of the members want just plain text. Is there some magic...
14
6905
by: Akseli Mäki | last post by:
Hi, Hopefully this is not too much offtopic. I'm working on a FAQ. I want to make two versions of it, plain text and HTML. I'm looking for a tool that will make a plain text doc out of the HTML doc. The HTML version doesn't have anything fancy, just internal links. So the tool must be able to delete internal links and anchors from the HTML version, but leave external links in simplified form. That is, the HTML version would say <a...
19
2153
by: Razvan | last post by:
Hi ! I have a big problem with my web site www.mihaiu.name. Sometimes when I visit my page with IE6 the browser ask me to download the index.html file ! The options are open, save, cancel, More Info. When I say 'open', a list with windows applications is opened and I am supposed to choose a program to open that file. If I open the file
12
2279
by: Jean-Yves Simon | last post by:
Hi, I have a little problem and I was hoping that someone could help me. I have installed on my PC, the server web apache. Eveything works fine and I have started to create some pages. In the main directory of apache, I have my main page.
1
1485
by: Jonathan LaRosa | last post by:
Anyone know how to do this with javascript? I'm trying to avoid creating two different forms because then changes become that much harder to manage. Thanks in advance . . . ~ Jon LaRosa jlarosa at alumni dot brown dot edu I would like to create 2 links to a form that do the following: A) one link would open the form with one option of a drop down list selected
10
2190
by: st4 | last post by:
Help, As part of my family history web site i need to get 150 pages of typed text into some format to display. It just text right now but I would like to add some graphics (photos) and make the text more friendly to read. I am thinking to divide it into smaller chapters and to format it something like a newspaper article. But just learning about HTML, 150 pages just seems like too greater task. Is there a shortcut or another way to do...
2
2888
by: Tim_Mac | last post by:
hi, i have a tricky problem and my regex expertise has reached its limit. i have read other posts on this newsgroup that pull out the plain text from a html string, but that won't work for me because i want to preserve the html, and replace some of the plain text. i basically want to show the user's search terms highlighted in the page, like google does, but i want to do this server side (i have the mechanics of intercepting the html...
4
2076
by: kristan.mcdonald | last post by:
Probably a simple one, but I've found nothing in groups or google so here goes; trying to deploy a simple .net asp app to our web server, which has been hardended as it's public facing. It's only ever run classic asp apps before. I've tried to upload a basic app with nothing but an empty web form, and I get the default "Runtime error, The custom error settings prevent you blah" I've tried setting customErrors but I get the same page,...
0
9540
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10475
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10222
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10026
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9068
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7564
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5463
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3757
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2938
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.