PDA

View Full Version : Copying Banner Ads



bruceldr
03-18-2009, 12:28 AM
I want to put a page on my website where people can click in the box and it'll highlight the code for a banner ad. I've got the box, I've got the code, BUT I can't get the RIGHT code IN the box.

This is my page:

Test page (http://www.eatstayplay.com/temp/test.html)

but I can't get it to work. In fact, I'm not even sure WHERE the code that is in that box is coming from.

The code that I want there is:

<a href="http://www.eatstayplay.com" target="new"><IMG border="0" hspace="5" src="http://www.eatstayplay.com/images/misc/esp120x60motion.gif" vspace="5"/></a>


But what I've got in the box isn't even close!

The whole click-and-highlight part of the box DOES work but not the code in the box itself.




The code that I'm using to create the box, with what I want inside is:

<textarea id="code" cols="65" rows="10" readonly onclick="this.focus(); this.select();">

<a href="http://www.eatstayplay.com" target="new"><IMG border="0" hspace="5" src="http://www.eatstayplay.com/images/misc/esp120x60motion.gif"

vspace="5"/></a>
</textarea>

But, that isn't what's appearing in the box. Can somebody PLEASE take a look at this for me? You'll probably have to look at the source code of the test page and see what's what.

Thanks! Thanks! Thanks!

morestar
03-18-2009, 05:49 PM
edit: it works for me but i didn't finish reading your post

morestar
03-18-2009, 05:51 PM
maybe copy the code from this page: The JavaScript Source: Text Effects: 1 Cool TextBox Scroller (http://javascript.internet.com/text-effects/1-cool-textbox-scroller.html)

it has the functionality you're looking for...


onClick="javascript:this.form.txt.focus();this.form.txt.sel ect();"

Dinghus
03-18-2009, 06:10 PM
It works fine for me too.

Maybe it is a browser issue. I'm using MSIE 6 at the moment. What are you using that you see something different?

I recommend you use different browsers and different resolutions to look at your website because things are just all over the place overlapping etc.

Remember, IE doesn't render the same as Mozilla based browsers.

mnboater
03-18-2009, 07:26 PM
One thing that sticks out is that the code is not valid XHTML. Being a stickler for that, I would change that first.

Chris

morestar
03-18-2009, 10:06 PM
One thing that sticks out is that the code is not valid XHTML. Being a stickler for that, I would change that first.

Chris

why should the html be "valid" ?

wige
03-19-2009, 10:26 AM
why should the html be "valid" ?

Invalid code would be more prone to errors.

That being said, it works for me as well. What are you seeing in the box when you view the page, and what browser/version are you using?

bruceldr
03-25-2009, 11:23 AM
Thanks for all your help! And, I see what you're saying, I left it alone for a couple of days, and NOW I am seeing the correct code in the box. Even though I had cleared cache and refreshed and EVERYTHING, Firefox just wasn't displaying what it should have been.

Now, what do you mean about valid code? What about this is invalid or needs to be changed?

If I DON'T change it, what might happen?

Thanks again this was a big help.

mnboater
03-25-2009, 01:04 PM
Nothing will break with invalid code. If it's important that the site validates as valid XHTML, fix it. As far as what's wrong, IMG should not be capitalized. The border=0 is deprecated, as was hspace and vspace. If you're not familiar with XHTML, just leave it. It works.

Chris

webgheek
03-27-2009, 09:22 PM
someone beat me to the punch, I'm about to answer it but I guess all was settled down here..