problems with this HTML... [Archive] - SpeedGuide.net Broadband Community

View Full Version : problems with this HTML...


mountainman
05-11-02, 04:45 AM
Hi there geniuses!! :)

I have a question about this. A couple weeks ago I got a website for making automatic HTML for making sizable pop-up windows that are customized.

Now, when you do this, it makes some code for the "head" part of the page and then some more to put where you want the TEXT that will link to this. What I want is a graphic that I made to be the link.

Here is the code for the BOX:

<a href="http://www.limawebdesign.com/quote.htm" onclick="NewWindow(this.href,'::: ::: request a quote ::: :::','500','400','yes','center');return false" onfocus="this.blur()">YourLinkText</a>

Here is the code for that graphic button that I want to be the link:

<td><a href="http://www.limawebdesign.com/quote.htm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('index_r8_c2','','graphics/index_r8_c2_f2.gif',1);" ><img name="index_r8_c2" src="graphics/index_r8_c2.gif" width="120" height="105" border="0"></a></td>

Do you understand what I'm doing here? If you could help me out (telling me where I need to put the top code INTO the bottom code so it links to that popup box - http://www.lima......./quote.htm), that would be excellent! :)

Thank you very much!

Tryn
05-11-02, 06:20 AM
If I understand what you want you want to Click the Image and pop up the New Window if that is the Case this should work



<a href="http://www.limawebdesign.com/quote.htm" onclick="NewWindow(this.href,'::: ::: request a quote ::: :::','500','400','yes','center');return false" onfocus="this.blur()">

<a href="" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('index_r8_c2','','graphics/index_r8_c2_f2.gif',1);" ><img name="index_r8_c2" src="graphics/index_r8_c2.gif" width="120" height="105" border="0"></a>

</a>


Im not sure if that is what you want, the more I read your question the more I do think that is what you want.



Tryn

mountainman
05-11-02, 11:19 AM
It keeps messing up on me. One thing more...I made that graphic in Fireworks and it is inside of another graphic that is used as the main page. However, it is put in there using an HTML file which is what I am trying to edit with this code.

Below is what happens when I insert that code that you gave me. See if you can figure out what is going on. Thanks so much!

HTML code: http://www.jumpinduo.com/htmlshot.jpg

page view: http://www.jumpinduo.com/pageshot.jpg

Hope this helps! :)

TonyT
05-11-02, 03:44 PM
If the popup code includes a name for the window then you must include it in the link.

TonyT
05-11-02, 03:46 PM
here's a generator that gives the option of using an image link:http://www.hypergurl.com/newwindow.html

mountainman
05-11-02, 03:57 PM
Will try this out. Thanks!

mountainman
05-11-02, 05:07 PM
Things are looking good, however I cannot get the graphic to go into the center of that table section! Look what I mean...HERE (http://www.jumpinduo.com/center.jpg).

Any ideas??

Tryn
05-11-02, 05:51 PM
You Probably have already tried this but in the table data tag put an align property to Center

<td align="center">



if that does not work then I'm not sure





Tryn

mountainman
05-11-02, 06:21 PM
Yeah, I tried that, and it still puts in on the left.

That is pretty damn weird.

Hmm.....I'm gonna have to play with it some more, I guess. :)

TonyT
05-12-02, 02:32 AM
show the code

mountainman
05-12-02, 11:38 AM
I got it to work, sorta. I cheated and just made the actual graphic the same width as that section of the table so it looked like it is in the middle.

However, I would really like to make it "correctly", so here is the code for that section of table. If you need more, let me know! :)

(The part in bold at the bottom is that graphic and the JavaScript that goes with it.)

You may see this page at http://www.jumpinduo.com/webdesign/pcrepair.htm

<td width="100" valign="top" align="center">
<div align="left">
<table border="0" cellpadding="0" cellspacing="0" width="160">
<!-- fwtable fwsrc="menu.png" fwbase="menu.gif" fwstyle="Dreamweaver" fwdocid = "742308039" fwnested="0" -->
<tr>
<td><img src="graphics/spacer.gif" width="160" height="1" border="0" name="undefined_2"></td>
<td><img src="graphics/spacer.gif" width="1" height="1" border="0" name="undefined_2"></td>
</tr>
<tr>
<td><a href="http://www.limawebdesign.com" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('menu_r1_c1','','graphics/menu_r1_c1_f2.gif',1);" ><img name="menu_r1_c1" src="graphics/menu_r1_c1.gif" width="160" height="24" border="0"></a></td>
<td><img src="graphics/spacer.gif" width="1" height="24" border="0" name="undefined_2"></td>
</tr>
<tr>
<td><a href="http://www.limawebdesign.com/web.htm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('menu_r2_c1','','graphics/menu_r2_c1_f2.gif',1);" ><img name="menu_r2_c1" src="graphics/menu_r2_c1.gif" width="160" height="24" border="0"></a></td>
<td><img src="graphics/spacer.gif" width="1" height="24" border="0" name="undefined_2"></td>
</tr>
<tr>
<td><a href="http://www.limawebdesign.com/portfolio.htm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('menu_r3_c1','','graphics/menu_r3_c1_f2.gif',1);" ><img name="menu_r3_c1" src="graphics/menu_r3_c1.gif" width="160" height="24" border="0"></a></td>
<td><img src="graphics/spacer.gif" width="1" height="24" border="0" name="undefined_2"></td>
</tr>
<tr>
<td><a href="http://www.limawebdesign.com/pcrepair.htm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('menu_r4_c1','','graphics/menu_r4_c1_f2.gif',1);" ><img name="menu_r4_c1" src="graphics/menu_r4_c1.gif" width="160" height="24" border="0"></a></td>
<td><img src="graphics/spacer.gif" width="1" height="24" border="0" name="undefined_2"></td>
</tr>
<tr>
<td><a href="http://www.limawebdesign.com/contact.htm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('menu_r5_c1','','graphics/menu_r5_c1_f2.gif',1);" ><img name="menu_r5_c1" src="graphics/menu_r5_c1.gif" width="160" height="24" border="0"></a></td>
<td><img src="graphics/spacer.gif" width="1" height="24" border="0" name="undefined_2"></td>
</tr>
</table>
<div align="center">
<p>&nbsp;</p>
<p>&nbsp;
<!--
/*********
You must edit the src of the img so it DOES NOT contain the img directory.
EX: c:/some_directory/img.jpg
You should make the src just the img.jpg
*********/
// -->
<a href="http://www.jumpinduo.com/quote.htm" onclick="NewWindow(this.href,'request','550','450','yes','center');return false" onfocus="this.blur()"><img src='graphics/quotebutton.gif' border=0 align="center" width="160" height="64"></a></p>
</div>
</div>
</td>

TonyT
05-12-02, 06:08 PM
<td align=center width=100%><a href="http://www.limawebdesign.com/contact.htm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('menu_r5_c1','','graphics/menu_r5_c1_f2.gif',1);" ><img name="menu_r5_c1" src="graphics/menu_r5_c1.gif" width="160" height="24" border="0"></a></td>


assuming that "click here for a quote" is menu_r5_c1.gif

TonyT
05-12-02, 06:31 PM
You should also be using a 'preload" script for all onMouseOver images used in the table. Without a preload script the images MUST get downloaded on every onMouseOver rather than pulled from the cache, which causes a delay for the 56K viewer on his first mouse passes over the menu.

Type the full path of the onMpuseOver images between the quotes in script below where iy says preloadimages("","","","");

Put script anywhere in body, preferably as 1st or second element in page.



<script language="javascript">
<!--
var myimages=new Array()
function preloadimages(){
for (i=0;i<preloadimages.arguments.length;i++){
myimages[i]=new Image()
myimages[i].src=preloadimages.arguments[i]
}
}
preloadimages("","","","");
//--></script>
<body onload="preloadimages()">

mountainman
05-12-02, 07:09 PM
Thanks Tony!

You're awesome, dude.

:)

TonyT
05-12-02, 07:50 PM
um......er.....now, show us the actual page so we can really rip it apart!

mountainman
05-12-02, 08:42 PM
Originally posted by TonyT
um......er.....now, show us the actual page so we can really rip it apart!

Since you put it like that, umm........I don't know.

For what you wrote, that seems like it has to do with that menu of buttons on the page.

I was talking about the single button on the bottom, below those.

You are still awesome since I now understand what you were talking about! :)

TonyT
05-12-02, 10:19 PM
Put all onMouseOver images in the preloader, makes gthe site faster.

Still wanna see the site

mountainman
05-14-02, 01:21 PM
Tony...when you say "preloader", that basically refers to "loading all images on page load instead of loading as the mouse goes over it", right?

Either way, you can see it at http://www.jumpinduo.com/web/

When I get home, I'll change them all to preload. :)

Thank you so much again!