Jump to content

Recommended Posts

As a newbie, I've been combining scripts together to create a page that allows viewers to choose from different visual elements of a leaf that will be used to search a database. There are rollovers for each anchor dropdown, and a center image that is in layers to "assemble" the leaf.

 

But I've run into a logistical nightmare and I'm not sure which is the best way to handle this.

 

if variations were slight, i would have no problem. But to show some characteristics I need to know what one or two underlying images were as well. In other words, if I am choosing borders, and I have a round image. The border would have to know to put a round scalloped border - not a square one. (And if somebody goes back to change the shape, I would need the border to automatically know to change to a square scalloped border)

 

Can I build conditionals within the layers? Or does it need to be inline with the image? is there another way to do this before my script becomes a disaster when I try to accommodate for numerous variations. Can I get a snippet or two of code to send me in the right direction?

 

I hope that makes some sense. Here's the page that I'm working on.

 

http://www.mergecreate.com/test25n.html

 

Link to comment
https://forums.phpfreaks.com/topic/210610-conditionals-for-image-rollovers/
Share on other sites

not to sound stupid, but I think I speak for every developer on the board when I say, you overcomplicated your post..

 

If you "dumbed" it down a bit we'd probably understand it better.. but I'm gonna give it a shot and see if I nailed it..

 

Basically you want each element in your drop downs to do a specific something.. well it is possible.. your a tags have onclick events.. the simplest way would be to build a function for each option.. however, the BEST option.. would be to create 1 function, pass in "acute" "oblong" etc into the function.. and have a switch statement handle each possibility, but I'm not exactly sure your experience level, but both would be in the beginner category so you should be fine :)

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.