Website Help
FelixDeSouze
UK New
I've been given the task to create a website with one of my colleagues. We both have knowledge of design (more him than me!) and they want what they described as AJAX shutters in it.
I've tried looking around the place for a tutorial on this but could not find one.
If you're unsure as to what I am after see the attached video clip, this is what I want to achieve.. If anyone has any good links to some tutorials and what software etc I need (I have Dreamweaver).
Your help is appreciated!
I've tried looking around the place for a tutorial on this but could not find one.
If you're unsure as to what I am after see the attached video clip, this is what I want to achieve.. If anyone has any good links to some tutorials and what software etc I need (I have Dreamweaver).
Your help is appreciated!
0
Comments
This is the code I use to do something similar. There is a list of 10 "finishing" type (fold, bind, cut, collate, etc) for our print shop, and checking one of them expands the options for it using the effect you describe (plus making it glow bright yellow and then fade). Unchecking it hides it again. The areas being expanded collapsed are all named with the formula: finishtype_field, and the checkboxes are all simply named finishtype. I think the "optionbox" is an inner container I use to hide the options until the box is expanded. That lets be use a generic function for all of them.
Each checkbox has an action attached like this: onclick='fireCheck("cut");'
setTimeout only accepts function names as input, so everything you do with it needs to be its own function. Here's the relevant code:
The "blockswap" function is a workaround to some of the boxes not expanding fully when I simply set the height to "auto", so I specified the height of each. Really, this shouldn't be necessary, but this was a quicker fix than playing with standards compliance quirks for a day. I think it had something to do with how I was floating the elements in the field.
Sorry to be really dense (plus i'm not really with it today, not on the same planet as everyone else), I've not dealt with Java much before..
Do I just add this to an existing HTML site?
If you've never used Javascript, I highly recommend ppk on Javascript. It's very readable and is a good intro and resource.
You can embed Javascript in a webpage using < script > tags, but I prefer to store it in a separate .js file which is then included in the webpage very similarly to how you embed a style sheet:
<!-- script --><!-- script --> [html]< script src="/folder/filename.js" type="text/javascript"></ script >[/html]