|
|
 |
| CSS Cascading Style Sheets All issues relating to Cascading Style Sheets (CSS). |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the CSS Cascading Style Sheets section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.
|
 |

April 2nd, 2008, 09:00 AM
|
|
Authorized User
|
|
Join Date: Jun 2006
Location: , , .
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Clickable background
I want to use following code for Clickable background.
<style type='text/css'>
BODY { background-image:url('my.aspx?id=001') }
</style>
where "my.aspx?id=001" will return an image randomly, but i also want this background
to be clickable (Navigate to my randomly specified Url)
How is it possible ? Share the Ideas and give me chance of thanks.
|

April 2nd, 2008, 01:15 PM
|
 |
Friend of Wrox
Points: 16,368, Level: 55 |
|
|
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,394
Thanks: 0
Thanked 2 Times in 2 Posts
|
|
You could add an onclick handler to the body element. This could do a client-side navigation instruction.
You should consider using a custom handler (ashx) instead of using a regular aspx page for the random image serving. It will be faster because it doesn't have the overhead of the page class.
-Peter
peterlanoie.blog
|

April 4th, 2008, 01:30 AM
|
|
Authorized User
|
|
Join Date: Jun 2006
Location: , , .
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Planoie,
I have already done this task by JavaScript but my Client's requirement is to do via CSS.
By custom handler (ashx) , How I will make my background clickable (Navigate to speciefied URL) without getting the innerHTML of Requested Page.
Please guide me regard.
|

April 8th, 2008, 09:51 AM
|
 |
Friend of Wrox
Points: 16,368, Level: 55 |
|
|
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,394
Thanks: 0
Thanked 2 Times in 2 Posts
|
|
I haven't created custom handlers myself yet. A google search should yield plenty of help on it though.
I'm not sure what you mean by the second question. If you add a click handler to the body element, it's not going to "get" any HTML, it will just fire whatever javascript is in it. This script will just navigate to the specified page.
-Peter
peterlanoie.blog
|

April 9th, 2008, 01:22 AM
|
|
Authorized User
|
|
Join Date: Jun 2006
Location: , , .
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Planoie,
Thanks for ur time again. This task has been hold for some time as I restart the task and found any solution then I ll update you.
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
 |