/    Sign up×
Community /Pin to ProfileBookmark

Theoretical question

Is it possible using only CSS (suppose your hosting doesn’t allow using scripts at all – only plain xhtml & style sheets), to make the following:

When I click on a link on one place on the page, the contents of on of the <div>s are changed from for example showing a photo into showing a small vertical list of links?

to post a comment
CSS

7 Comments(s)

Copy linkTweet thisAlerts:
@aj_nscMar 13.2007 — CSS and Javascript yes.
Copy linkTweet thisAlerts:
@BoR_SauthorMar 13.2007 — And with no javascript at all?
Copy linkTweet thisAlerts:
@aj_nscMar 13.2007 — It's not up to your host to allow Javascript or not, this is a client-side technology meaning all you need to do is stick it in your document and you can use it, with absolutely zero input from the server (other than the sending of the document to the users browser, of course). Javascript is NOT up to your host to allow. That being said, no, this cannot be done without Javascript.........so learn it and use it, no one can stop you. (muhaha)
Copy linkTweet thisAlerts:
@BoR_SauthorMar 13.2007 — My host is configured to ignore what's between <script></script> tags, and afaik it limits me to very small amount of scripts I can excute, such as onmouseover & onmouseout. Do you think using these will be enough to complete my task?

P.S. I also have a normal hosting for my personal site(s) with no limitations of this kind, but I want to code something on a site that is not mine and has this strict limitations.
Copy linkTweet thisAlerts:
@aj_nscMar 13.2007 — Wow, that's ridiculous. Get a new host. You can also use onclick I am assuming as well, and I guess that's all you really need.

Example

<a href="#" onclick="document.getElementById('targetElement').innerHTML='this is what you want to change the content to';">

But that'll get really messy really fast (that code might not work either, I'm not a JS guru and I'm not sure if the single quotes mess it up or something, but thats the idea). That's all I've got.
Copy linkTweet thisAlerts:
@ray326Mar 13.2007 — Wow, that's ridiculous.[/QUOTE]It keeps them from being an unwitting tool of crackers and phishers.
Copy linkTweet thisAlerts:
@BoR_SauthorMar 13.2007 — That was the response I got from the host.

Still, I want to code a "hidden" manager panel that gets visible instead of a picture when I click on specific spot at the screen.

It keeps them from being an unwitting tool of crackers and phishers.[/QUOTE]
×

Success!

Help @BoR_S spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.2,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,
)...