shellyblake
06-02-2002, 11:51 AM
is the only way to create a rollover script is to put all the code in the header? isn't there an easier way? isn't there a way to put all the rollover info in the actual line - for example...
instead of image.src referring to the script in the header -like this:
<a href="filename.html" onmouseover="image1.src='images/button.gif';"
onmouseout="image1.src='images/button2.gif';">
couldn't you just leave out the image.src stuff? like this:
<a href="filename.html"
onmouseover="images/button.gif';"
onmouseout="images/button2.gif';">
Now, I know this doesn't work - but that's my question - isn't there a way to make something like this work? so we don't have to have all the code at the top. or at least so the code at the top doesn't have to contain all the info needed to make it work - maybe it just contains code that tells it "what" to do, but not "where" to go. am i making sense?
the reason I'd like to find something is because if i decide to add a rollover button late in the game - i don't like having to go back & change it everywhere to make it work. i'm hoping to find something similar to how the style sheets work (hover). I know FP has a way of doing it (kinda) but it's some kind of applescript & I hate it because it actually creates loadtime. I'm guessing what I'm asking for might as well?
i'm guessing this is a pipe-dream but I'm hoping someone can help me!
thanks.
instead of image.src referring to the script in the header -like this:
<a href="filename.html" onmouseover="image1.src='images/button.gif';"
onmouseout="image1.src='images/button2.gif';">
couldn't you just leave out the image.src stuff? like this:
<a href="filename.html"
onmouseover="images/button.gif';"
onmouseout="images/button2.gif';">
Now, I know this doesn't work - but that's my question - isn't there a way to make something like this work? so we don't have to have all the code at the top. or at least so the code at the top doesn't have to contain all the info needed to make it work - maybe it just contains code that tells it "what" to do, but not "where" to go. am i making sense?
the reason I'd like to find something is because if i decide to add a rollover button late in the game - i don't like having to go back & change it everywhere to make it work. i'm hoping to find something similar to how the style sheets work (hover). I know FP has a way of doing it (kinda) but it's some kind of applescript & I hate it because it actually creates loadtime. I'm guessing what I'm asking for might as well?
i'm guessing this is a pipe-dream but I'm hoping someone can help me!
thanks.