PDA

View Full Version : Code validation please - alternative to Dreamweaver



maverik
03-18-2005, 03:25 PM
Hi there,

I'm a designer not an author and you guys have kindly encouraged me to improve my coding - in particular to ditch the client side scripts that Dreamweaver produces automatically with its behaviour action panel. I try to use simple hypertext links in the body of my pages and for side bar navigation links but would like to keep the graphical links in the top menu bar.

I have come up with some alternative code for graphical buttons with rollovers and I would be most grateful for comments. I am particularly concerned that the links still work even if end users disable some browser functions for security reasons. The link works fine for me on a 5yr old Intel PC running 98c/Explorer (and on Macs running 9.2 Explorer and 10.3.8 Safari).

Heres a sample link;

<TD><A href="products.htm" target=_self><IMG onmouseover="this.src='rollovers/pro_rol.jpg';"
onmouseout="this.src='menu25_pic/base2-5_r2_c3.jpg';" height=19
alt=Products src="menu25_pic/base2-5_r2_c3.jpg" width=73
border=0></A></TD>

I understand that the 'target=_self' code is debateable as I do not use any frames and the link will open in the current page by default anyway. However, I read that this could prevent other websites placing your page within one of their own? I use the alternative 'target=_blank' once in my website to open an external webpage in new window. I understand that new windows are frowned upon but I have a need to keep the two separate at this time.

Thanks in advance to anyone for having a look.

Mav

mwinter
03-18-2005, 07:46 PM
I [...] would like to keep the graphical links in the top menu bar.That's fine. The site is much easier to navigate now. By the way, you can, and should, use spaces in alt attributes. After all, if an important image isn't shown, the user should be able to work out what it represented so the text should make sense. Just write normally.


I have come up with some alternative code for graphical buttons with rollovers and I would be most grateful for comments.It's simple and will work (at least in that it will degrade well), but it's difficult to maintain. It's not really worth worrying over, though.


I am particularly concerned that the links still work even if end users disable some browser functions for security reasons.Yup. They will. :)


I understand that the 'target=_self' code is debateable as I do not use any frames and the link will open in the current page by default anyway. However, I read that this could prevent other websites placing your page within one of their own?The _self target refers to the same frame. Use the _top target instead.


I use the alternative 'target=_blank' once in my website to open an external webpage in new window. I understand that new windows are frowned upon but I have a need to keep the two separate at this time.To be kind, just put a short note stating that a new window will open.

Mike

maverik
03-18-2005, 09:51 PM
Mike,

thanks very much for your guidance - now and in the past. Now that I have seen for myself how much rubbish Dreamweaver puts in the page I am pretty much converted.

Now working to develop my CSS knowledge!

I have put the 'New Window' note on the page concerned. Thanks again.

Mav