new class design vs. javascript

  • Thread starter Thread starter Jeff
  • Start date Start date
J

Jeff

I'm still new to all of this - mostly vb.net using vs 2005, so I might not
be using good terminology but let me give my question a try:

I'm looking for someone to point me in the correct direction by giving me
the phrase or terminology I need to look up the specifics myself.
I just don't know where to start.

Here is task -

On a web page, I need to switch between two images when the user clicks the
image. A few more details include the fact that I would like this to work
similar to a set of radio buttons where clicking on one of several images
changes the one clicked (let's say to green) and the others to a reset value
(let's say to red). I can do this fine using what I know now by using an
imagebutton and swaping its imageurl property and a bit of code.

My question is whether there is a relatively practical way of converting
this functionality into something that would run on the client side, rather
than cause a postback to the server on each click. ...and do to this
without javascript. In other words, I want to have the ability to have this
work even on browsers that won't run javascript.

The idea would be to have the user make a selection of one of several of
these buttons/images and only after the user was completely finished would
they hit a submit button that would return to the server an integer
representing which one was selected. ...essentially a fancy radiobuttonlist.
....but perhaps there is a way to use the existing radiobuttonlist code and
swap in images?

If I understand correctly, there is the ability to create what I think is
called a new class, but I'm not sure whether I'm correct about this, and
whether this type of thing requires javascript or something else that won't
run on all browsers. I don't mind reading about how to accomplish this type
of thing, but I have no idea how difficult it is, nor whether it would
accomplish what I'm after.

....any pointers appreciated.

Jeff
 
Jeff,

The cheapest for this is JavaScript and than you have a lot of other
possibilities:
A Java Pluggin
Buy a Macro Media product (Adobe) for this
Use VBA but that is the worst you can do

So my choise would be JavaScript and than it is just easy. Be aware that if
you do it on the Server you still needs JavaScript on the client side,

Cor
 
On a web page, I need to switch between two images when the user
clicks the image. A few more details include the fact that I would
like this to work similar to a set of radio buttons where clicking on
one of several images changes the one clicked (let's say to green) and
the others to a reset value (let's say to red). I can do this fine
using what I know now by using an imagebutton and swaping its imageurl
property and a bit of code.

You can do this with:

Javascript (lots of examples online)
AJAX (Asynchronous Javascript - data is streamed to the browser)
Macromedia Flash
Microsoft Sliverlight (very new technology, probably avoid for now)
Java applet

If you're going to use AJAX, take a look at Microsoft's Atlas framework:

http://ajax.asp.net/
 
Back
Top