PDA

View Full Version : DHTML Slide Show Next & Prev links not working in IE7



webdev82
12-12-2007, 08:24 PM
1) Script Title: DHTML Slide Show (manual)

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex14/dhtmlslide.htm

3) Describe problem: The next and prev links are not working in IE7 on my desktop. When I view the demo page on the Dynamic Drive site with IE7, the links work fine. However, when I copy/paste the code into a web page that I created on my desktop, the pictures show up just fine, but when I click on the next or prev links, nothing happens. If it matters, the page I've created on my desktop is an aspx page. Note that the script works fine on my desktop if I view the page with Firefox. Any suggestions would be greatly appreciated.

ddadmin
12-12-2007, 09:53 PM
When you loaded the page in IE, did you get prompted with an Active X security warning bar at the top (yellow in color), and did you click "OK" to allow IE to run JavaScript offline?

webdev82
12-13-2007, 06:01 AM
Thanks for replying...

No I did not get the ActiveX security warning...

And if it helps, when I view the demo page on the dynamic drive site, it works fine. I even did a view source on that page and cut/paste that code to my desktop aspx page. It still did not work (on my desktop). Any other suggestions will be appreciated.

jscheuer1
12-13-2007, 06:50 AM
If you are running an aspx page locally, don't you need some kind of server or server emulator software to do that? If using an emulator, that could be all or part of the problem. Try a normal page locally and see what results you get. Also, try publishing the page to the internet. If the problem persists, at least then you could give us a link to it so that we could check it out.

webdev82
12-13-2007, 07:53 AM
jscheuer1,

I'm running a web server on my local dev system. The page will work correctly if I view it with Firefox. It's only IE7 that's giving me a problem. I took your suggestion and posted the page on the web at http://www.mobilefaith.us/tmp/. Try both IE7 and Firefox and you'll see what's happening. Thanks for your help with this...

jscheuer1
12-13-2007, 08:57 AM
What a messy page, you will have a hard time getting pages like that to work cross browser.

The css validator:

http://jigsaw.w3.org/css-validator/

The HTML validator:

http://validator.w3.org/

If you are in development, use them, as well as the error console in FF, for checking script errors.

Anyways, after a bit of trial and error of my own, I discovered that your full page form:


<body style="background-color:#000000;margin-left:0px;margin-top:0px;height:100%;width:100%" onload="if (document.all||ns6||ns4) {regenerate2();updatecontent()}">
<form name="aspnetForm" method="post" action="default.aspx" id="aspnetForm">
<div>
<input type="hid . . .

. . . ctl00_topnav_mnuMain_Data.hoverHyperLinkClass = 'ctl00_topnav_mnuMain_11';
ctl00_topnav_mnuMain_Data.staticHoverClass = 'ctl00_topnav_mnuMain_10';
ctl00_topnav_mnuMain_Data.staticHoverHyperLinkClass = 'ctl00_topnav_mnuMain_9';
//]]>
</script>
</form>
</body>
</html>

was causing the problem. I'm not sure why, but it was preventing IE from recognising the image element for scripting purposes.

Now, I'm not sure why or if you need it to be full page. I could only see three form elements in it, and they were at the top:


<form name="aspnetForm" method="post" action="default.aspx" id="aspnetForm">
<div>
<input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" />
<input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" />
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwULLTEwMDUyNjYzMjgPZBYCZg9kFgICAw9kFgICDQ9kFgJmD2QWBAICD2QWAmYPZBYCZg8PFgIeBFRleHQFT1RoZSBMT1JEIGFsc28gd2lsbCBiZSBhIHJlZnVnZSBmb3IgdGhlIG9wcHJlc3NlZCwgYSByZ WZ1Z2UgaW4gdGltZXMgb2YgdHJvdWJsZS5kZAIDD2QWAmYPZBYCZg8PFgIfAAUKUHNhbG1zIDk6OWRkZA==" />
</div>

But I may not have looked hard enough. I took away the </form> tag from the end of the page and placed it there:


<form name="aspnetForm" method="post" action="default.aspx" id="aspnetForm">
<div>
<input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" />
<input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" />
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwULLTEwMDUyNjYzMjgPZBYCZg9kFgICAw9kFgICDQ9kFgJmD2QWBAICD2QWAmYPZBYCZg8PFgIeBFRleHQFT1RoZSBMT1JEIGFsc28gd2lsbCBiZSBhIHJlZnVnZSBmb3IgdGhlIG9wcHJlc3NlZCwgYSByZ WZ1Z2UgaW4gdGltZXMgb2YgdHJvdWJsZS5kZAIDD2QWAmYPZBYCZg8PFgIfAAUKUHNhbG1zIDk6OWRkZA==" />
</div>
</form>

Then, although there were other script and HTML problems with the page, at least the slide show worked.

webdev82
12-13-2007, 07:36 PM
jscheuer1,

I created a bare bones aspx page that includes nothing but the DHTML Slide Show script. The page is located at http://www.mobilefaith.us/tmp/dd.aspx. Note that the script still does not work with IE7. So your suggestion that the form tag is causing the problem is not correct.

Note also that I've had no problems viewing any of the pages in any browser until I added the slide show script.

Any other suggestions?

jscheuer1
12-13-2007, 09:22 PM
Your "plain" page has the same problem (taken directly from your page's served source code):


<form name="form1" method="post" action="dd.aspx" id="form1">
<div>
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUJNzgzNDMwNTMzZGQ=" />
</div>

<div>
<table border="0" align="center" cellspacing="0" cellpadding="0">
<tr height="100"><td>&nbsp</td></tr>
<tr>
<td width="100%" colspan="2" height="22"><center>
<script>
if (linkornot==1)
document.write('<a href="javascript:transport()">')
document.write('<img src="'+photos[0]+'" name="photoslider" style="filter:revealTrans(duration=2,transition=23)" border=0>')
if (linkornot==1)
document.write('</a>')
</script>
</center></td>
</tr>
<tr>
<td width="50%" height="21"><p align="left"><a href="#" class="linknormal" onClick="backward();return false">Previous Slide</a></td>
<td width="50%" height="21"><p align="right"><a href="#" class="linknormal" onClick="forward();return false">Next Slide</a></td>
</tr>
</table>

<p align="center"><font face="Arial" size="-2">Free DHTML scripts provided by<br>
<a href="http://dynamicdrive.com">Dynamic Drive</a></font></p>
</div>
</form>

CoSticla
06-19-2009, 11:12 PM
Your "plain" page has the same problem (taken directly from your page's served source code):


<form name="form1" method="post" action="dd.aspx" id="form1">
<div>
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUJNzgzNDMwNTMzZGQ=" />
</div>

<div>
<table border="0" align="center" cellspacing="0" cellpadding="0">
<tr height="100"><td>&nbsp</td></tr>
<tr>
<td width="100%" colspan="2" height="22"><center>
<script>
if (linkornot==1)
document.write('<a href="javascript:transport()">')
document.write('<img src="'+photos[0]+'" name="photoslider" style="filter:revealTrans(duration=2,transition=23)" border=0>')
if (linkornot==1)
document.write('</a>')
</script>
</center></td>
</tr>
<tr>
<td width="50%" height="21"><p align="left"><a href="#" class="linknormal" onClick="backward();return false">Previous Slide</a></td>
<td width="50%" height="21"><p align="right"><a href="#" class="linknormal" onClick="forward();return false">Next Slide</a></td>
</tr>
</table>

<p align="center"><font face="Arial" size="-2">Free DHTML scripts provided by<br>
<a href="http://dynamicdrive.com">Dynamic Drive</a></font></p>
</div>
</form>

-----
Note that the opening form tag cause this problem. if you will use a closing form tag just above your script, your problem will go away.
-----