I've created a web custom control that works like the Windows explorer picture view folder (ie if there are pictures in the folder, it shows four little thumbnails of the pictures in the folder).
The control is created by adding image controls to a table and renders fine.
The only problem is that I want the user to be able to click anywhere in the table and navigate off to a page that displays the control.
Using a hyperlink control isn't any good because the images i'm using aren't thumbnail size -- i create an image control and then set the height and width to make them tiny. If I try replacing the image with a hyperlink control, the pictures render at full size.
Anyone got any ideas how I can do this? :confused:Do you mean that you want to enable some sort of a table-cell click functionality?
Something like that would do.
I just really want the entire control to act as a hyperlink rather than the individual images, but I'm not sure of the best way to go about it.
:sick:
You'd have to render a bit of css and javascript for that.
First, set the style for the <TD> so that cursor = hand. Second, set an onClick action event for the <TD>
This is NOT an ASP.NET example but gives you an idea of what you want:
<table width="100%">
<tr>
<td width="100%" style="cursor:hand;"
onClick="alert('dfkj');">abc </td>
</tr></table>
Cheers Mendhak. :afrog:
Will lug my Javascript book back home with me tonight and give it a go :)
The things I have to do to keep my new hubby happy :rolleyes:
He only married me so I'd redevelop his website for him
Erm... I'm not sure why you need to take your book with you just for this. It's simple javascript, as you can see.
And don't worry about being used... my 'friends' often use me for their perverse coding pleasures. :sick:
Lol....I know NOTHING about Javascript and my book is like a security blanket...makes me feel warm and safe and loved at night ;)
Just did a quick test with your code and all I needed to do was change the alert to navigate and the world was a very happy place.
Thank you so much :cool:
Welcome. :)
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment