PDA

View Full Version : Following script not working



newarnikanchhi
03-19-2011, 01:17 PM
I used the following script in the Front Page it worked very well, when I paste same script in my site it does not work ? Other script I used from this site is working perfectly but this one does not work.


<html>

<head><script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>

<script type="text/javascript" src="http://www.************/fadeslideshow.js">

/***********************************************
* Ultimate Fade In Slideshow v2.0- (c) Dynamic Drive DHTML code library (Dynamic Drive DHTML(dynamic html) & JavaScript code library)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at Dynamic Drive DHTML(dynamic html) & JavaScript code library for this script and 100s more
***********************************************/

</script>

<script type="text/javascript">

var mygallery=new fadeSlideShow({
wrapperid: "fadeshow1", //ID of blank DIV on page to house Slideshow
dimensions: [625, 275], //width/height of gallery in pixels. Should reflect dimensions of largest image
imagearray: [
["http://************/banners/potalachina.jpg", "http://www.************/Tibet.php", "", "Potala Palace in Tibet."],
["http://************/banners/treking_ghandruk.jpg", "http://************/Nepal.php", "", "On the way to Ghandruk in Annapurna trekking"],
["http://************/banners/ilovenepal.jpg", "", "", "Students from Netherlands wearing I Love Nepal T-shirt while our presentation in the Netherlands"],
["http://************/banners/Tiger_nest_bhutan.JPG", "", "", "Tiger Nest or Takshang, Guru Rimpoche's cave in Bhutan."] //<--no trailing comma after very last image element!
],
displaymode: {type:'auto', pause:2500, cycles:0, wraparound:false},
persist: false, //remember last viewed slide and recall within same session?
fadeduration: 500, //transition duration (milliseconds)
descreveal: "peekaboo",
togglerid: ""
})


</script>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 2</title>
</head>

<body><div id="fadeshow1"></div>

<br />

</body>

</html>

jscheuer1
03-19-2011, 04:37 PM
Works fine here. For layout purposes you should use valid HTML and a DOCTYPE that invokes standards, but what you have there works OK. It just lays out a little oddly in some browsers. Here it is with valid markup and a standards invoking DOCTYPE:


<!DOCTYPE html>
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 2</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>

<script type="text/javascript" src="http://www.************/fadeslideshow.js">

/***********************************************
* Ultimate Fade In Slideshow v2.0- (c) Dynamic Drive DHTML code library (Dynamic Drive DHTML(dynamic html) & JavaScript code library)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at Dynamic Drive DHTML(dynamic html) & JavaScript code library for this script and 100s more
***********************************************/

</script>

<script type="text/javascript">

var mygallery=new fadeSlideShow({
wrapperid: "fadeshow1", //ID of blank DIV on page to house Slideshow
dimensions: [625, 275], //width/height of gallery in pixels. Should reflect dimensions of largest image
imagearray: [
["http://************/banners/potalachina.jpg", "http://www.************/Tibet.php", "", "Potala Palace in Tibet."],
["http://************/banners/treking_ghandruk.jpg", "http://************/Nepal.php", "", "On the way to Ghandruk in Annapurna trekking"],
["http://************/banners/ilovenepal.jpg", "", "", "Students from Netherlands wearing I Love Nepal T-shirt while our presentation in the Netherlands"],
["http://************/banners/Tiger_nest_bhutan.JPG", "", "", "Tiger Nest or Takshang, Guru Rimpoche's cave in Bhutan."] //<--no trailing comma after very last image element!
],
displaymode: {type:'auto', pause:2500, cycles:0, wraparound:false},
persist: false, //remember last viewed slide and recall within same session?
fadeduration: 500, //transition duration (milliseconds)
descreveal: "peekaboo",
togglerid: ""
})


</script>
</head>

<body><div id="fadeshow1"></div>

<br />

</body>

</html>

As long as you don't move the resources (scripts and images) from their current locations, that works. Your domain must be on some kind of ban list, but I figured it out. Once again, as long as you don't move the resources, here's a live demo:

http://home.comcast.net/~jscheuer1/side/egtours_h.htm

And I now see that your actual home page uses prototype 1.5.0_pre1, which as far as I know is incompatible with jQuery. So, unless you can update to at least prototype 1.6.0.2, which may require you to update effects as well as any scripts using them (it would actually be better, if you can, to update to the most recent prototype version) - That's if you even need them at all - I'm not sure what you're doing with them . . . Unless you can deal with that, you cannot use jQuery, which is required by Ultimate Fade 2.x. Even if you can, the order in which the scripts appear in the head would have to be a certain way to avoid conflicts.

You could use something like:

http://www.dynamicdrive.com/dynamicindex14/swissarmy/index.htm

which doesn't require jQuery.

newarnikanchhi
03-20-2011, 03:59 AM
Hello,

Thank you for your great help, I do not know what happened on it. Here is the example.

http://www.************/test.php

jscheuer1
03-20-2011, 09:51 AM
It's like I said. If you just change:


<script type="text/javascript" src="sohoadmin/program/includes/display_elements/window/prototype.js"></script>

to:


<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/prototype/1.7.0.0/prototype.js"></script>

It works.

But, as I also said, I'm not sure what, if anything you're using prototype for. It looks like you aren't using it for anything, in which case you could get rid of that line entirely, as well as this one:


<script type="text/javascript" src="sohoadmin/program/includes/display_elements/window/effects.js"></script>

Probably this one too:


<script type="text/javascript" src="sohoadmin/program/includes/display_elements/window/window.js"></script>

What are these scripts used for? Perhaps they are used on another page, or were once used on the actual home page, or still are used there. There could be other dependencies. It looks like they might be for a lightbox type effect, are you using that on the home page or any of the pages?

Anyways, and this is important:

For IE you need to add this to your stylesheet:


#fadeshow1 .descpanelfg {
text-align: left;
}

newarnikanchhi
03-20-2011, 11:27 PM
You mean I edit .js file also with above ?

jscheuer1
03-21-2011, 03:13 AM
You mean I edit .js file also with above ?

Now I'm unclear what you mean.

This part is about the script tags on the page:


It's like I said. If you just change:


<script type="text/javascript" src="sohoadmin/program/includes/display_elements/window/prototype.js"></script>

to:


<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/prototype/1.7.0.0/prototype.js"></script>

It works.

But, as I also said, I'm not sure what, if anything you're using prototype for. It looks like you aren't using it for anything, in which case you could get rid of that line entirely, as well as this one:


<script type="text/javascript" src="sohoadmin/program/includes/display_elements/window/effects.js"></script>

Probably this one too:


<script type="text/javascript" src="sohoadmin/program/includes/display_elements/window/window.js"></script>

What are these scripts used for? Perhaps they are used on another page, or were once used on the actual home page, or still are used there. There could be other dependencies. It looks like they might be for a lightbox type effect, are you using that on the home page or any of the pages?

And this part is about adding to your stylesheet:


Anyways, and this is important:

For IE you need to add this to your stylesheet:


#fadeshow1 .descpanelfg {
text-align: left;
}

Nowhere do I tell you to edit a .js file.

What are you using prototype for?

newarnikanchhi
03-22-2011, 12:20 AM
Thank you but I am still unclear. Whether those lines replace in custom code ? I tried replacing with one of them it came blank. I'm unsure which prototype I am using.

jscheuer1
03-22-2011, 03:29 AM
What custom code are you talking about?

What lines are you talking about?

If you don't know what you are using Prototype for, try the page without it.

newarnikanchhi
03-22-2011, 08:55 AM
I was talking about custom code.

I did try but no work. I think Swiss army slide also similar function I assume.

newarnikanchhi
05-08-2011, 11:19 AM
1) Script Title: Ajax Tabs

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/ajaxtabscontent/ajaxtabs_suppliment3.htm

3) Describe problem:


I wanted to use above script in my page but there are some I could not customise.

1. Loading image is not loading
2. example availa at http://www.************/test.php

ddadmin
05-09-2011, 08:12 AM
Please email me the example URL (ddrivehelp [at] gmail.com), as it's censored for some reason (usually due to a penalty on the forums).

newarnikanchhi
05-17-2011, 01:09 PM
1) Script Title: Ajaxtabs

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/ajaxtabscontent/ajaxtabs_suppliment3.htm

3) Describe problem: I used above script in my site it looks fine but it shows default bullets along with tabs as well why this happened. How to remove it ?

newarnikanchhi
05-17-2011, 01:25 PM
I try to use the following script in my site but it shows default bullets along with tabs.

I test it at ************/test.php

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml2/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<link rel="stylesheet" type="text/css" href="http://www.************/ajaxtabs/ajaxtabs.css" />

<script type="text/javascript" src="http://www.************/ajaxtabs/ajaxtabs.js">

/***********************************************
* Ajax Tabs Content script v2.2- 頄ynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

</script>

</head>
<html>


<body>

<ul id="countrytabs" class="shadetabs">
<li><a href="external1.htm" rel="countrycontainer" class="selected">Itinerary</a></li>
<li><a href="external2.htm" rel="countrycontainer" id="favorite">Lodging & Dinning</a></li>
<li><a href="external3.htm" rel="countrycontainer">All included</a></li>
<li><a href="external4.htm" rel="countrycontainer">Trip Addon</a></li>
<li><a href="external4.htm" rel="countrycontainer">Map</a></li>
</ul>


<div id="countrydivcontainer" style="border:1px solid gray; width:450px; margin-bottom: 1em; padding: 10px">
</div>

<script type="text/javascript">

var countries=new ddajaxtabs("countrytabs", "countrydivcontainer")
countries.setpersist(true)
countries.setselectedClassTarget("link") //"link" or "linkparent"
countries.init()

</script></body>

</html>