PDA

View Full Version : Im new and very stuck



jeffromad
07-28-2006, 02:37 PM
Im well out of my league at the moment and i was hoping someone could try and help me?!

An example of what i want to do is here:
http://www.avfc.premiumtv.co.uk/

If you look you can see that when you hover over sub articles at the side of the main artilce, the sub article appears where the main article goes.

Does anybody know how to do this?

Id much appreciate any help possible.

Cheers
Jeff

mburt
07-28-2006, 09:22 PM
This might help


<html>
<head>
<script language="javascript">
var a = "Article 2"
var b = "Article 3"
var c = "Article 4"
var orig = "Main Article Text"
function showArticle(which) {
mainContent.innerHTML = which
}
function origArticle() {
mainContent.innerHTML = orig
}
</script>
</head>
<body>
<table width="400" border="1">
<tr>
<td width="200" id="mainContent">Main Article Text</td>
<td width="200" height="200" valign="top">
<a href="#" onmouseover="showArticle(a)" onmouseout="origArticle()">Article 2</a>
<br><a href="#" onmouseover="showArticle(b)" onmouseout="origArticle()">Article 3</a>
<br><a href="#" onmouseover="showArticle(c)" onmouseout="origArticle()">Article 4</a>
</td>
</tr>
</table>
</body>
</html>

jeffromad
07-30-2006, 03:06 PM
Cheers Mike that awesome the only problem is how do i put it into dreamweaver?!

I put it in the code section of dremaeaver and it didnt work!!

I then put it in the design page as a script, still didnt work!

Anybody help??

Cheers again people

mburt
07-30-2006, 03:13 PM
How about... USE NOTEPAD. Like the olden days. Then save is as *.htm And if you can't do that, hit Tools > Folder Options> View and uncheck "Hide extensions for known file types". Then you'll be able to save it as whatever you want, *.htm, *.html, *.php whatever. Just ask if there's any more problems. :)

jeffromad
07-30-2006, 03:20 PM
Do you mean do my whole website on dreamweaver with the code (which doesnt work in dreamweaver).

Then copy the whole html for the whole page into notepad save as .php then upload to my site.

If so i just done that and the code still doesnt work :confused:

mburt
07-30-2006, 03:25 PM
Well, If what I said still wasn't the problem I wouldn't know how to help. I still don't think using DreamWeaver is better than Notepad. NOTEPAD IS THE BOMB... Not really, I just had to say that :)
But really, I don't know how to help you anymore on this one.

mburt
07-30-2006, 03:26 PM
Forget that last thing I said, do you have a URL of the webpage you're doing this on? I might be able to help.

jeffromad
07-30-2006, 03:29 PM
No im just testing it on dreamweaver, but ive uploaded a quick test one here:

http://www.bromleyaces.com/test.php

AND ive jsut noticed IT DOES WORK BUT only in internet explorer (im using ie 7 beta) and not in firefox, and i hope/want it to work in both internet explorer and firefox

mburt
07-30-2006, 03:48 PM
I just tested this in FireFox. It should work:


<html>
<head>
<script language="javascript">
var orig = "Main Article"
var a = "Article 2"
var b = "Article 3"
var c = "Article 4"
function showArticle(which) {
mainContent.innerHTML = which
}
function origArticle() {
mainContent.innerHTML = orig
}
</script>
</head>
<body onload="origArticle()">
<table width="400" border="1">
<tr>
<td width="200" id="mainContent">
</td>
<td width="200" height="200" valign="top">
<a href="#" onmouseover="showArticle(a)" onmouseout="origArticle()">Article 2</a>
<br><a href="#" onmouseover="showArticle(b)" onmouseout="origArticle()">Article 3</a>
<br><a href="#" onmouseover="showArticle(c)" onmouseout="origArticle()">Article 4</a>
</td>
</tr>
</table>
</body>
</html>

jeffromad
07-30-2006, 04:00 PM
using dreamwever it still doesnt work!

Did you use notepad or something else?

mburt
07-30-2006, 04:07 PM
Here take a look at this link:
http://www40.brinkster.com/mburt/scripts/swap_info.htm
(try opening it in FireFox)

jeffromad
07-30-2006, 04:18 PM
Awesome its working when i use my cheap as website builder but not with dreamweaver i guess ill just have to keep trying different methods.

Cheers for all your help dude, really appreciated. :)

mburt
07-30-2006, 04:19 PM
No problem