I am working on a site wherein we have a number of very similar pages which
we will eventually be building on-the-fly. Currently they are static,
rendered from plain XHTML. Most pages have a bottom button row with one or
more buttons providing navigation, like this example with a single button:
<div id="bottomButtonRow"><a name="submit" href="homePage.htm"
target="_top"><img src="images/iframeSubmit.gif" width="120" height="25"
alt="Submit Button" border="0" class="button1"
onmouseover="src='images/iframeSubmitOver.gif'"
onmouseout="src='images/iframeSubmit.gif'" /></a> </div>
<!-- end of #bottomButtonRow -->
We have six different outer page variations, one of which is used for six
individual pages which differ in their top breadcrumb and bottom button
navigation. I'm building an external dispatcher script so that the server
can write a variable to the page as it builds its part and, in onLoad, the
script will modify the breadcrumb and bottom button row areas to provide the
elements appropriate to that page.
I found that I could not use
document.getElementById("bottomButtonRow").innerHTML=button1 + button2 +
button3;
with "buttonX" being equal to the code shown above in the example, because
the event calls "broke" the string, and the script. So, I tried something
like this
button2='<a name="emptyCart" id="bottomButton2"><img
src="images/iframeEmptyCart.gif" class="button2" height="25" width="120"
border="0" ';
button2roll=onmouseover="src='images/iframeEmptyCartOver.gif'";
onmouseout="src='images/iframeEmptyCart.gif'";
button2end=' /></a>'
followed by
button2=button2 + button2roll + button2end;
which allows the script to run, and changes all the images, targets, etc.,
and the page works with the exception of the rollover effect, which doesn't.
I imagine my problem is syntactic, but I've tried numerous variations on
this and can't find one that works and also provides the rollovers. I'm
hoping some sharp eyes out there can spot my error and alert me to it, or
maybe point me to another way of achieving the same objective. Thank you.
Cheers,
Scott
____ � The WDVL Discussion List from WDVL.COM � ____
To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED]
Send Your Posts To: [EMAIL PROTECTED]
To set a personal password send an email to [EMAIL PROTECTED] with the words: "set
WDVLTALK pw=yourpassword" in the body of the email.
To change subscription settings to the wdvltalk digest version:
http://wdvl.internet.com/WDVL/Forum/#sub
________________ http://www.wdvl.com _______________________
You are currently subscribed to wdvltalk as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
To unsubscribe via postal mail, please contact us at:
Jupitermedia Corp.
Attn: Discussion List Management
475 Park Avenue South
New York, NY 10016
Please include the email address which you have been contacted with.