p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


Go Back   p2p.wrox.com Forums > Web Programming > CSS > CSS Cascading Style Sheets
I forgot my password Register Now
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 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.

Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 2nd, 2008, 09: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.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #2 (permalink)  
Old April 2nd, 2008, 01:15 PM
planoie's Avatar
Friend of Wrox
Points: 16,368, Level: 55
Points: 16,368, Level: 55 Points: 16,368, Level: 55 Points: 16,368, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,394
Thanks: 0
Thanked 2 Times in 2 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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #3 (permalink)  
Old April 4th, 2008, 01: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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #4 (permalink)  
Old April 8th, 2008, 09:51 AM
planoie's Avatar
Friend of Wrox
Points: 16,368, Level: 55
Points: 16,368, Level: 55 Points: 16,368, Level: 55 Points: 16,368, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,394
Thanks: 0
Thanked 2 Times in 2 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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #5 (permalink)  
Old April 9th, 2008, 01: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.


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Clickable images Using xml and xsl(Urgent) Akriti XSLT 11 June 4th, 2007 06: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 11: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 11:39 PM



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


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© 2008 Wiley Publishing, Inc