ChatGPT 🤖 Posted August 29, 2007 Share Posted August 29, 2007 Hey, here is my code: <li id="square1"><a href="#" onmouseover="play=false; display(1);" title="Your customers are online..."><div id="square1_blue" style="display: none;">The Challenge...</div></a></li> <li id="square2"><a href="#" onmouseover="play=false; display(2);" title="Your customers are online..."><div id="square2_blue" style="display: none;">Your customers are online...</div></a></li> <li id="square3"><a href="#" onmouseover="play=false; display(3);" title="Your customers are online..."><div id="square3_blue" style="display: none;">So Is Your Competition...</div></a></li> <li id="square4"><a href="#" onmouseover="play=false; display(4);" title="Your customers are online..."><div id="square4_blue" style="display: none;">First Impressions Mean Everything Online...</div></a></li> <li id="square5"><a href="#" onmouseover="play=false; display(5);" title="Your customers are online..."><div id="square5_blue" style="display: none;">What Kind of First Impressions Is Your Site Making?</div></a></li> </ul> <script type="text/javascript"> function display(switchme) { if(switchme == 1) { document.write('<ul id="box1-content">' + '<li class="odd">9 out of 10 online customers link the dealership's response time to the likelihood they will buy from that store. <span class="source">- Outsell LLC, 2006</span></li>' + '<li class="even_na">' + '<ul class="box_inner">' + '<li class="box_inner">How fast is your response time to email inquiries to your sales, finance, service, and parts departments?</li>' + '<li>Is your email response time equal to your competition? The best in class e-dealers in the country?</li>' + '</ul>' + '</li>' + '<li class="odd">8 out of 10 online customers will walk away from a dealership's website without ever letting you know. <span class="source">- CapGemini, 2006</span>' + '<li class="even_na">' + '<ul class="box_inner">' + '<li class="box_inner">How often are you aware your website has bad links, slow loading pages, or expired specials being displayed?</li>' + '<li class="box_inner">How does your website stack up to your competition? What do the best in class e-dealers offer that you don\'t?</li>' + '</ul>' + '</li>' + '<li class="odd">Track, monitor, and benchmark your website and online sales and service experience with eDealerMonitor. <a onClick="Effect.toggle(\'slide_content\', \'blind\');">Click here</a> to learn more.</li>' + '</ul>'); } else if(switchme == 2) { document.write('<ul id="box1-content">' + '<li class="odd">70% of consumers buying a car use the Internet as part of the shopping process.<br /><span class="source">(Statistic Source: J.D. Power & Associates, 2006)</span></li>' + '<li class="even">The number of unsolicited leads has tripled in the last 5 years (97 to 320/mo)<br /> <span class="source">(Source: NADA, 2006)</span></li>' + '<li class="odd">Almost 75% of consumers have 6+ years of online experience.<br /> <span class="source">(Statistic Source: Ipsos, 2006)</span></li>' + '<li class="even">89% of consumers have used email for customer service.<br /><span class="source">(Statistic Source: DoubleClick, 2005)</span></li>' + '</ul>'); } else if(switchme == 3) { document.write('<ul id="box1-content">' + '<li class="odd">95% of dealers have a website.<br /><span class="source">(Statistic Source: NADA, 2006)</span></li>' + '<li class="even">52% of dealers have a dedicated Internet sales representative.<br /> <span class="source">(Source: NADA, 2006)</span></li>' + '<li class="odd">E-bay is selling one vehicle unit every 60 seconds.<br /> <span class="source">(Statistic Source: Wards, 2007)</span></li>' + '<li class="even">27.5% of all used vehicle transactions in 2006 were initiated or transacted via the Internet.<br /><span class="source">(Statistic Source: Wards, 2007)</span></li>' + '</ul>'); } else if(switchme == 4) { document.write('<ul id="box1-content">' + '<li class="odd">92% of online customers link the speed of the dealership's response time to the likelihood they will buy from that store<br /><span class="source">(Statistic Source: Outsell LLC, 2006)</span>' + '</li>' + '<li class="even">85% of unfulfilled online customers will walk away from your website without ever letting you know why<br /><span class="source">(Statistic Source: Outsell LLC, 2006)</span>' + '</li>' + '<li class="odd">50% of online customers who have a poor experience at a dealership's website will switch to another dealer<br /><span class="source">\(Statistic Source: Capgemini, 2006\)</span>' + '</li>' + '</ul>'); } else if(switchme == 5) { document.write('<ul id="box1-content">' + '<li class="odd">What is your dealer website and email inquiry response time? Is it staying the same, getting better, or getting worse?</li>' + '<li class="even">Do your website links to sales, service and support function properly? Are your website offerings current?</li>' + '<li class="odd">How does your website and email inquiry response times compare to best in class e-dealers... To your competition?</li>' + '<li class="even">Do you have the measures and information to effectively manage your Internet sales department?</span></li>' + '<li class="odd">Let us provide you with the answers.' + '<a onClick="Effect.toggle(\'slide_content\', \'blind\');">Click here</a> for more information about eDealerMonitor and our services.</li>' + '</ul>'); } else { //do nothing } } </script> If i just run the function display(5); it works, but when i run the function on the mouseover, it switches to a blank page and renders out the html. Am i doing something wrong? Any help is greatly appreciated, i'm on about a 15 min deadline Thanks, envex Link to comment https://forums.phpfreaks.com/topic/67229-onmouseover-do-a-function-wierdness/ Share on other sites More sharing options...
Grok 🤖 Posted August 29, 2007 Share Posted August 29, 2007 how are you running it? (you said: "If i just run the function display(5); it works") .. does it append that HTML to the page's HTML? Link to comment https://forums.phpfreaks.com/topic/67229-onmouseover-do-a-function-wierdness/#findComment-337348 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.