/    Sign up×
Community /Pin to ProfileBookmark

Rollovers and mailto

I am currently working on a somewhat ecommerce website that allows quotes to be made online. My boss does not want any hardcore programming or database, so as a result, all images, text, buttons, etc, are preloaded onto the website.

refer here to the design: [url]http://members.iinet.net.au/~hinda/Clothing/products.html[/url]

My problem is that when the user rolls over a navgational element (on the left), the main image, description, title and REQUEST BUTTON changes. I have everything working except for the request button. The request button basically opens up outlook.

Although not visible on the frontend, the request button and its mailto statement must change to the appropriate subject, email, body text, etc once the user rolls over the navigation (on the left).

Any suggestions?

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@FangJan 26.2006 — Is this the intention:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<title>mailto</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

<script type="text/javascript">
function mailOrder(obj) {
var str='&body=';
str+=document.getElementById('ProductName').innerHTML;
str+='%0A'; // line-break in email
str+=document.getElementById('ProductCode').innerHTML;
obj.href+=str;
}
</script>

</head>
<body>
<div id="ProductName">Lady Storm</div>
<div id="ProductCode">J522</div>
<a href="mailto:[email protected]?&subject=Order" onclick="mailOrder(this);">Mail us!</a>
</body>
</html>
Copy linkTweet thisAlerts:
@anniebelle82authorJan 26.2006 — Thank you so much Fang, that code works perfectly! ?

Much appreciated!
×

Success!

Help @anniebelle82 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...