The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
SOLVED can't link to site from banner
Hello,
I want to place 3 banners on my forum. The banners have to resize depending on the screen resolution of the user. Choices are 1024x768 and 1280x1024. This works all well. But I also want to redirect the member to the website of the banner in an other screen. I can't figure out how to do this. I tried the usual <a href="................."> on different places but nothing works. Who can help me? I have placed the folowing script in the advertising area. HTML Code:
<script language="javascript" type="text/javascript" src="/templates/high_javascript.js"> <!-- //var iWidth = 0; //var iHeight = 0; //--> </script> <center> <script type="text/Javascript"> <!-- /*initialization for IE! Leave this funtion after the body tag */ /*if(!window.Width && document.body && document.body.offsetWidth) { //window.onresize = recal; //alert("line114!"); Width = windowWidth(); Height = windowHeight(); //alert(Width + "<br>" + Height); //alert("width"); } */ //--> var iWidth, iHeight, sRes; if (window.innerWidth != null) { //alert("first"); iWidth = window.innerWidth; iHeight = window.innerHeight; } else if (document.body.clientWidth != null) { //alert("second"); iWidth = document.body.clientWidth; iHeight=document.body.clientHeight; } else { //alert("third"); } var imgPath1 = "left.jpg"; var imgPath2 = "center.jpg"; var imgPath3 = "right.jpg"; var imgAlt = "Click here to go to the website of the sponsor."; if (iWidth <= 1100) { document.write("<img src='/images/advertenties/" + imgPath1 + "' vspace='20' alt='" + imgAlt + "' width='190'>"); document.write(" "); document.write("<img src='/images/advertenties/" + imgPath2 + "' vspace='20' alt='" + imgAlt + "' width='250'>"); document.write(" "); document.write("<img src='/images/advertenties/" + imgPath3 + "' vspace='20' alt='" + imgAlt + "' width='190'>"); } else { document.write("<img src='/images/advertenties/" + imgPath1 + "' vspace='20' alt='" + imgAlt + "' width='250'>"); document.write(" "); document.write("<img src='/images/advertenties/" + imgPath2 + "' vspace='20' alt='" + imgAlt + "' width='400'>"); document.write(" "); document.write("<img src='/images/advertenties/" + imgPath3 + "' vspace='20' alt='" + imgAlt + "' width='250'>"); } </script> </center> |
#2
|
||||
|
||||
Can you post your code with the URL in it that you tried to add so we can see what was wrong?
|
#3
|
|||
|
|||
I fixed it.
What i did was this: HTML Code:
document.write("<a href="http://www.hondaciviccrewapeldoorn.nl"><img src='/images/advertenties/" + imgPath1 + " alt='" + imgAlt + "' width='250'></a>"); HTML Code:
document.write("<a href=http://www.hondaciviccrewapeldoorn.nl><img src='/images/advertenties/" + imgPath1 + "' alt='" + imgAlt + "' width='190'></a>"); <a href="http://www.hondaciviccrewapeldoorn.nl"> <a href=http://www.hondaciviccrewapeldoorn.nl> Took me only more than 2 days! |
#4
|
||||
|
||||
Did you try just escaping the quotes?
HTML Code:
document.write("<a href=\"http://www.hondaciviccrewapeldoorn.nl\"><img src='/images/advertenties/" + imgPath1 + " alt='" + imgAlt + "' width='250'></a>"); |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|