Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > CSS > CSS Cascading Style Sheets
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 2nd, 2008, 08:00 AM
Authorized User
 
Join Date: Jun 2006
Location: , , .
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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.

Reply With Quote
  #2 (permalink)  
Old April 2nd, 2008, 12:15 PM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

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
Reply With Quote
  #3 (permalink)  
Old April 4th, 2008, 12:30 AM
Authorized User
 
Join Date: Jun 2006
Location: , , .
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Default

 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.
Reply With Quote
  #4 (permalink)  
Old April 8th, 2008, 08:51 AM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

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
Reply With Quote
  #5 (permalink)  
Old April 9th, 2008, 12:22 AM
Authorized User
 
Join Date: Jun 2006
Location: , , .
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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.


Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Clickable images Using xml and xsl(Urgent) Akriti XSLT 11 June 4th, 2007 05:45 AM
background images Maxxim CSS Cascading Style Sheets 14 February 14th, 2007 02:56 PM
Clickable images in grid or detailsview ewhizz ASP.NET 2.0 Basics 1 August 2nd, 2006 10:33 AM
Make a control Clickable Hal Levy ASP.NET 1.0 and 1.1 Basics 3 November 7th, 2003 01:24 PM
fetch in background? RCC_msolomon ADO.NET 6 June 25th, 2003 10:39 PM



All times are GMT -4. The time now is 12:42 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.