View Full Version : Help needed with coding please
AnniePrice
11-17-2004, 10:06 PM
Can anyone tell me how to do the following:-
this is the display i currently have........
_________________________________________________________
link1 link 2 link 3
table with information relevant to link1 visible
_________________________________________________________
what i need is for when anyone clicks on link2, link3 or back to link1 for the current table to be hidden and the information table relevant to the link clicked to become visible
Any help would be appreciated.
Annie
codegoboom
11-17-2004, 10:32 PM
I think it would help if you posted a skeleton of your actual html code, so that no guessing is involved... ;)
AnniePrice
11-17-2004, 10:49 PM
the code is as follows:
link1(uk pricing) link2(us pricing) link3(eu pricing) (not created yet)
initially the code for link1(UK pricing) should be visible (and should become visible again if anyone clicks on link1
<table width="100%" border="0">
<tr bgcolor="#FF9933"> <th width="33%" scope="col"><img src="../../sitebackground/flaguk.jpg" width="40" height="27" /><br />
ECDL
Version 4.0 <br />
Self Study Online Course <br />
SPECIAL AT
£19.99 (RRP £39.99) </th>
<th width="33%" scope="col"><img src="../../sitebackground/flaguk.jpg" width="40" height="27" /><br />
ECDL
Version 4.0 <br />
Self Study Online Course<br />
with <a href="../../instantmentoring.html">Instant Mentoring/Tutor Support </a><br />
£36.99</th>
</tr><tr bordercolor="#003366" bgcolor="#FF9933">
<th colspan="2" scope="col"><b>Select WorldPay or PayPal as your method of payment</b></th>
</tr>
<tr bgcolor="#FFFFFF">
<th width="33%" scope="col"><form action="http://www.fastcart.co.uk/cart/index.php" method="post">
<input type="hidden" name="id" value="****" />
<input type="hidden" name="item" value="ECDL Version 4.0 Online Course" />
<input type="hidden" name="price" value="19.99" />
<font color="#003366" size="2">Pay by Credit Card</font><br />
<input type="image" value="Add to Cart" src="../../sitebackground/worldpay_logo.gif" width="130" height="30" />
</form></th>
<th width="33%" scope="col"><form action="http://www.fastcart.co.uk/cart/index.php" method="post">
<input type="hidden" name="id" value="****" />
<input type="hidden" name="item" value="ECDL Version 4.0 Online Course + Instant Mentoring" />
<input type="hidden" name="price" value="36.99" />
<font color="#003366" size="2">Pay by Credit Card</font><br />
<input type="image" value="Add to Cart" src="../../sitebackground/worldpay_logo.gif" width="130" height="30" />
</form></th>
</tr>
<tr bgcolor="#FFFFFF">
<th width="33%" scope="col"><form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input name="submit" type="image" src="../../sitebackground/button_paypal.gif" alt="Make payments with PayPal - it's fast, free and secure!" width="170" height="24" border="0" />
<input type="hidden" name="add" value="1" />
<input type="hidden" name="cmd" value="_cart" />
<input type="hidden" name="item_name" value="ECDL Version 4.0 Online Course" />
<input type="hidden" name="amount" value="19.99" />
<input type="hidden" name="return" value="http://www.global-tuition.com" />
<input type="hidden" name="cn" value="Login/Password for course(s)" />
<input type="hidden" name="currency_code" value="GBP" />
</form></th>
<th width="33%" scope="col"><form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input name="submit" type="image" src="../../sitebackground/button_paypal.gif" alt="Make payments with PayPal - it's fast, free and secure!" width="170" height="24" border="0" />
<input type="hidden" name="add" value="1" />
<input type="hidden" name="cmd" value="_cart" />
<input type="hidden" name="item_name" value="ECDL Version 4.0 Online Course + Instant Mentoring" />
<input type="hidden" name="amount" value="36.99" />
<input type="hidden" name="return" value="http://www.global-tuition.com" />
<input type="hidden" name="currency_code" value="GBP" />
</form></th>
</tr>
</table>
WHEN LINK2 (us pricing) IS CLICKED THIS IS THE CODE THAT SHOULD BE VISIBLE
</table>
<table width="100%" border="0">
<tr bgcolor="#FF9933"> <th width="33%" scope="col"><img src="../../sitebackground/flagusa.jpg" width="49" height="31" /><br />
Self Study Online Course <br />
$34.99</th>
<th width="33%" scope="col"><img src="../../sitebackground/flagusa.jpg" width="49" height="31" /><br />
Self Study Online Course<br />
with Instant Mentoring<br />
$64.99 </th>
</tr><tr bordercolor="#003366" bgcolor="#FF9933">
<th colspan="2" scope="col"><b>Select WorldPay or PayPal as your method of payment</b></th>
</tr>
<tr bgcolor="#FFFFFF">
<th width="33%" scope="col"><form action="http://www.fastcart.co.uk/cart/index.php" method="post">
<input type="hidden" name="id" value="****" />
<input type="hidden" name="item" value="ICDL Version 4.0 Online Course" />
<input type="hidden" name="price" value="34.99" />
<font color="#003366" size="2">Pay by Credit Card</font><br />
<input type="image" value="Add to Cart" src="../../sitebackground/worldpay_logo.gif" width="130" height="30" />
</form></th>
<th width="33%" scope="col"><form action="http://www.fastcart.co.uk/cart/index.php" method="post">
<input type="hidden" name="id" value="****" />
<input type="hidden" name="item" value="ICDL Version 4.0 Online Course + Instant Mentoring" />
<input type="hidden" name="price" value="64.99" />
<font color="#003366" size="2">Pay by Credit Card</font><br />
<input type="image" value="Add to Cart" src="../../sitebackground/worldpay_logo.gif" width="130" height="30" />
</form></th>
</tr>
<tr bgcolor="#FFFFFF">
<th width="33%" scope="col"><form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input name="submit" type="image" src="../../sitebackground/button_paypal.gif" alt="Make payments with PayPal - it's fast, free and secure!" width="170" height="24" border="0" />
<input type="hidden" name="add" value="1" />
<input type="hidden" name="cmd" value="_cart" />
<input type="hidden" name="item_name" value="ICDL Version 4.0 Online Course" />
<input type="hidden" name="amount" value="34.99" />
<input type="hidden" name="return" value="http://www.global-tuition.com" />
<input type="hidden" name="cn" value="Login/Password for course(s)" />
<input type="hidden" name="currency_code" value="USD" />
</form></th>
<th width="33%" scope="col"><form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input name="submit" type="image" src="../../sitebackground/button_paypal.gif" alt="Make payments with PayPal - it's fast, free and secure!" width="170" height="24" border="0" />
<input type="hidden" name="add" value="1" />
<input type="hidden" name="cmd" value="_cart" />
<input type="hidden" name="item_name" value="ICDL Version 4.0 Online Course + Instant Mentoring" />
<input type="hidden" name="amount" value="64.99" />
<input type="hidden" name="return" value="http://www.global-tuition.com" />
<input type="hidden" name="currency_code" value="USD" />
</form></th>
</tr>
</table>
WHEN LINK 3 (eu pricing) IS CLICKED THIS IS THE CODE THAT SHOULD BE VISIBLE
<table width="100%" border="0">
<tr bgcolor="#FF9933"> <th width="33%" scope="col"><img src="../../sitebackground/flageurope.jpg" width="53" height="31" /><br />
Self Study Online Course <br />
€29.99</th>
<th width="33%" scope="col"><img src="../../sitebackground/flageurope.jpg" width="53" height="31" /><br />
Self Study Online Course<br />
with Instant Mentoring/Tutor Support <br />
€53.99</th>
</tr><tr bordercolor="#003366" bgcolor="#FF9933">
<th colspan="2" scope="col"><b>Select WorldPay or PayPal as your method of payment</b></th>
</tr>
<tr bgcolor="#FFFFFF">
<th width="33%" scope="col"><form action="http://www.fastcart.co.uk/cart/index.php" method="post">
<input type="hidden" name="id" value="****" />
<input type="hidden" name="item" value="ECDL Version 4.0 Online Course" />
<input type="hidden" name="price" value="29.99" />
<font color="#003366" size="2">Pay by Credit Card</font><br />
<input type="image" value="Add to Cart" src="../../sitebackground/worldpay_logo.gif" width="130" height="30" />
</form></th>
<th width="33%" scope="col"><form action="http://www.fastcart.co.uk/cart/index.php" method="post">
<input type="hidden" name="id" value="****" />
<input type="hidden" name="item" value="ECDL Version 4.0 Online Course + Instant Mentoring" />
<input type="hidden" name="price" value="53.99" />
<font color="#003366" size="2">Pay by Credit Card</font><br />
<input type="image" value="Add to Cart" src="../../sitebackground/worldpay_logo.gif" width="130" height="30" />
</form></th>
</tr>
<tr bgcolor="#FFFFFF">
<th width="33%" scope="col"><form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input name="submit" type="image" src="../../sitebackground/button_paypal.gif" alt="Make payments with PayPal - it's fast, free and secure!" width="170" height="24" border="0" />
<input type="hidden" name="add" value="1" />
<input type="hidden" name="cmd" value="_cart" />
<input type="hidden" name="item_name" value="ECDL Version 4.0 Online Course" />
<input type="hidden" name="amount" value="29.99" />
<input type="hidden" name="return" value="http://www.global-tuition.com" />
<input type="hidden" name="cn" value="Login/Password for course(s)" />
<input type="hidden" name="currency_code" value="EUR" />
</form></th>
<th width="33%" scope="col"><form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input name="submit" type="image" src="../../sitebackground/button_paypal.gif" alt="Make payments with PayPal - it's fast, free and secure!" width="170" height="24" border="0" />
<input type="hidden" name="add" value="1" />
<input type="hidden" name="cmd" value="_cart" />
<input type="hidden" name="item_name" value="ECDL Version 4.0 Online Course + Instant Mentoring" />
<input type="hidden" name="amount" value="53.99" />
<input type="hidden" name="return" value="http://www.global-tuition.com" />
<input type="hidden" name="currency_code" value="EUR" />
</form></th>
</tr>
</table>
IMPORTANT NOTE: I also run the static menu from dynamic drive on the page
http://www.dynamicdrive.com/dynamicindex1/staticmenu.htm and need to ensure there are not going to be any conflicts.
codegoboom
11-17-2004, 11:13 PM
Some skeleton! :D
Really, a simple and complete presentation of the problem is important. Complete meaning all of the code necessary, and simple meaning no more than that (a skeleton, if you will).
mcdougals4all
11-17-2004, 11:48 PM
If you're working with stuff from Dynamic Drive you should be able to make one of their tabbed menus (http://dynamicdrive.com/dynamicindex1/ddtabmenu2.htm) work for you.
hemebond
11-17-2004, 11:57 PM
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<title>47619</title>
<style type="text/css">
form {
display:inline;
}
</style>
</head>
<body>
<ul>
<li><a href="" onclick="show(0);return false">link1</a></li>
<li><a href="" onclick="show(1);return false">link2</a></li>
<li><a href="" onclick="show(2);return false">link3</a></li>
</ul>
<dl>
<dt>ECDL</dt>
<dd>Version 4.0</dd>
<dd>Self Study Online Course</dd>
<dd>SPECIAL AT £19.99 (RRP £39.99)</dd>
<dd>
<form action="http://www.fastcart.co.uk/cart/index.php" method="post">
<input type="hidden" name="id" value="****">
<input type="hidden" name="item" value="ECDL Version 4.0 Online Course">
<input type="hidden" name="price" value="19.99">
<input type="submit" value="Pay by credit card">
</form>
<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="submit" value="Pay with PayPal">
<input type="hidden" name="add" value="1">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="item_name" value="ECDL Version 4.0 Online Course">
<input type="hidden" name="amount" value="19.99">
<input type="hidden" name="return" value="http://www.global-tuition.com">
<input type="hidden" name="cn" value="Login/Password for course(s)">
<input type="hidden" name="currency_code" value="GBP">
</form>
</dd>
<dt>ECDL</dt>
<dd>Version 4.0</dd>
<dd>Self Study Online Course with <a href="../../instantmentoring.html">Instant Mentoring/Tutor Support</a></dd>
<dd>£36.99</dd>
<dd>
<form action="http://www.fastcart.co.uk/cart/index.php" method="post">
<input type="hidden" name="id" value="****">
<input type="hidden" name="item" value="ECDL Version 4.0 Online Course + Instant Mentoring">
<input type="hidden" name="price" value="36.99">
<input type="submit" value="Pay by credit card">
</form>
<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="submit" value="Pay with PayPal">
<input type="hidden" name="add" value="1">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="item_name" value="ECDL Version 4.0 Online Course + Instant Mentoring">
<input type="hidden" name="amount" value="36.99">
<input type="hidden" name="return" value="http://www.global-tuition.com">
<input type="hidden" name="currency_code" value="GBP">
</form>
</dd>
</dl>
<dl>
<dt>Self Study Online Course</dt>
<dd>$34.99</dd>
<dd>
<form action="http://www.fastcart.co.uk/cart/index.php" method="post">
<input type="hidden" name="id" value="****">
<input type="hidden" name="item" value="ICDL Version 4.0 Online Course">
<input type="hidden" name="price" value="34.99">
<input type="submit" value="Pay by credit card">
</form>
<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="submit" value="Pay with PayPal">
<input type="hidden" name="add" value="1">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="item_name" value="ICDL Version 4.0 Online Course">
<input type="hidden" name="amount" value="34.99">
<input type="hidden" name="return" value="http://www.global-tuition.com">
<input type="hidden" name="cn" value="Login/Password for course(s)">
<input type="hidden" name="currency_code" value="USD">
</form>
</dd>
<dt>Self Study Online Course with Instant Mentoring</dd>
<dd>$64.99</dd>
<dd>
<form action="http://www.fastcart.co.uk/cart/index.php" method="post">
<input type="hidden" name="id" value="****">
<input type="hidden" name="item" value="ICDL Version 4.0 Online Course + Instant Mentoring">
<input type="hidden" name="price" value="64.99">
<input type="submit" value="Pay by cradit card">
</form>
<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="submit" value="Pay with PayPal">
<input type="hidden" name="add" value="1">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="item_name" value="ICDL Version 4.0 Online Course + Instant Mentoring">
<input type="hidden" name="amount" value="64.99">
<input type="hidden" name="return" value="http://www.global-tuition.com">
<input type="hidden" name="currency_code" value="USD">
</form>
</dd>
</dl>
<dl>
<dt>Self Study Online Course</dt>
<dd>€29.99</dd>
<dd>
<form action="http://www.fastcart.co.uk/cart/index.php" method="post">
<input type="hidden" name="id" value="****">
<input type="hidden" name="item" value="ECDL Version 4.0 Online Course">
<input type="hidden" name="price" value="29.99">
<input type="submit" value="Pay with credit card">
</form>
<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="submit" value="Pay with PayPal">
<input type="hidden" name="add" value="1">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="item_name" value="ECDL Version 4.0 Online Course">
<input type="hidden" name="amount" value="29.99">
<input type="hidden" name="return" value="http://www.global-tuition.com">
<input type="hidden" name="cn" value="Login/Password for course(s)">
<input type="hidden" name="currency_code" value="EUR">
</form>
</dd>
<dt>Self Study Online Course with Instant Mentoring/Tutor Support</dt>
<dd>€53.99</dd>
<dd>
<form action="http://www.fastcart.co.uk/cart/index.php" method="post">
<input type="hidden" name="id" value="****">
<input type="hidden" name="item" value="ECDL Version 4.0 Online Course + Instant Mentoring">
<input type="hidden" name="price" value="53.99">
<input type="submit" value="Pay by credit card">
</form>
<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="submit"value="Pay with PayPal">
<input type="hidden" name="add" value="1">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="item_name" value="ECDL Version 4.0 Online Course + Instant Mentoring">
<input type="hidden" name="amount" value="53.99">
<input type="hidden" name="return" value="http://www.global-tuition.com">
<input type="hidden" name="currency_code" value="EUR">
</form>
</dd>
</dl>
<script type="text/javascript">
var list = document.getElementsByTagName("dl");
for(var i = 1; i < list.length; i++)
{
list[i].style.display = "none";
}
function show(item)
{
for(i = 0; i < list.length; i++)
{
list[i].style.display = "none";
}
list[item].style.display = "";
}
</script>
</body>
</html>
jettlarue2003
11-18-2004, 12:58 AM
also it should be td fields, i have never heard of a th:)
hemebond
11-18-2004, 02:44 AM
i have never heard of a th:)Table head cells.
canadianjameson
11-18-2004, 04:18 AM
annie, when you paste in code please encase it in these tags
[.code]
your code
[./code]
minus the .
that will show it like hemebonds post
canadianjameson
11-18-2004, 04:19 AM
annie, when you paste in code please encase it in these tags
[.code]
your code
[./code]
minus the .
that will show it like hemebonds post
heme: HA, EVIL RANDISS TITLES AGAIN! :p
<title>47619</title>
hemebond
11-18-2004, 04:58 AM
heme: HA, EVIL RANDISS TITLES AGAIN! :p
<title>47619</title>
Hahaha. Now I see what you're on about. They're not random though, they're the thread id. I name them that so I can find them again.
codegoboom
11-18-2004, 06:41 AM
I swear, it's not worth trying to help around these parts... the script was already given in another thread (http://codingforums.com/showthread.php?t=47607), but then it turned into a pm thing, because apparently it could not be adapted without more help, so I suggested a detailed post, here... but then I still couldn't get the details, so I put it another way... and then only half the details were given, along with an obscure demand, so I put it yet another way... and then you people couldn't handle the suspense, so the thread was taken over, the markup altered (without asking), and the script rewritten in a worse way. What's the point, you fools? :rolleyes:
AnniePrice
11-18-2004, 09:39 AM
Hi
Thanks Hemebond .. I got the code to work with my code (phew)
erm... Codegoboom did I do something wrong .. I thought I was just following instructions .. didn't mean to cause anyone any upset .. sorry if I did
I know I must seem like a simpleton to you guys but I really am trying hard to learn
Annie
codegoboom
11-18-2004, 04:38 PM
Me upset? No, just amazed at the lameness of such a turn of events... thought I'd share. :D
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.