...

View Full Version : Help Me



jd2003
06-07-2004, 04:55 PM
:confused: :( Please help me
Hello

I need someone to help me with this script http://digilander.libero.it/JosephDimino/script/
There is two things that Iíve been trying to fix for the last few days, canít seem to get it straight
1) the script doesnít accept any pictures with double names example: "Adrienne Lee" unless I rename it by adding an underscore Adrienne_Lee.jpg. How can I correct that?
2) my other problem is that I canít get the same picture in the family tree
example: Adam.jpg should show twice, one on the very top (larger size) and the other on the top of the family tree below the page

I would appreciate your help. Thanks

Willy Duitt
06-07-2004, 05:06 PM
With thirty-eight posts on the board you have been here long enough to realize that "Help Me" is not an appropriate subject title and does not benifit the community at large in that anyone else with a simular problem will never be able to find this thread in the archives. Please read the Posting Guidlines (http://www.codingforums.com/showthread.php?t=2090) if you haven't already done so.

As for question #1) You will need to rename the images. Most hosts and some browsers will not display a file which contains spaces within the name.

As for question #2) You will need to be more explicit. I do not understand the question. Where exactly is the second copy of the image to appear?

jd2003
06-07-2004, 06:23 PM
:D Answer to question#1 there a total of 8 images shown, but for demo purpose I only show 3
The problem is, when I select from the menu ( Adam or Adrienne Lee).
the top part of the page, will not show any file that has a space in between.
however this is not true for the bottom part. so I would exclude Host or browser problem.
Also when I select from the menu, the same picture should be displayed twice, but only the the top one will show, the second should show on the bottom of the page (the first of the Pyramid or family tree)
Hope you can help and I made myself clear this time.

glenngv
06-08-2004, 04:35 AM
If you insist on naming your pictures with spaces, then replace it with %20 in your code.

Adrienne%20Lee.jpg

jd2003
06-08-2004, 09:01 AM
Hi Glenngv

I got over 3.000 pictures in my database 90% of the files are with space in between, I cannot go through 3.000 pictures and rename them .
Your suggestion is the best solution, unfortunately Iím not a programmer, and itís very difficult for me to find the code, and replace it with ď20%Ē between the file space, thatís the reason why Iím asking anyone in the forum for help.

You can get the codes from the following link:

http://digilander.libero.it/JosephDimino/script/

glenngv
06-08-2004, 09:36 AM
You can still make it work even if you don't put %20 in the code.
Just change this line:

document.getElementById("SuzySpot").innerHTML = '<a href=javascript:SuzyPicRemote("' + ActiveArray[current].PicVal + '");><img name="PicShowing" src=' + ActiveArray[current].PicVal + ' height=250 border=0></a>';

to:

document.getElementById("SuzySpot").innerHTML = '<a href="javascript:SuzyPicRemote(\'' + ActiveArray[current].PicVal + '\');"><img name="PicShowing" src="' + ActiveArray[current].PicVal + '" height="250" border="0"></a>';

The problem with your original script is that you don't use double quotes in attribute values where the values have spaces in them. The sample below will make the browser only consider Adrienne as the value of the src attribute.

src=Adrienne Lee.jpg

It's a good practice to always use double quotes in attribute values even though you expect a value without space.

jd2003
06-08-2004, 10:33 AM
Hi Glenngv

I presume your name is Glenn? Thank you so much for your help, My Name is JD Iím Italian residing in Italy, lived in New Jersey for 21 years. GOD BLESS AMERICA.
The script is working fine now, butÖ I still need your help, if possible.
I need to have the same top picture to be displayed on the bottom of the script, (will try to explain in English :thumbsup: )
For example when you click on the Adam Lee, the same picture should show up on the family tree below.
Iíve tried to use the same array value ďPicValĒ but there might be a problem with looping (I think) could you please take a look at it? (other good Samaritan are welcome)
THANK YOU

glenngv
06-08-2004, 10:48 AM
Sorry, I didn't get it. Can you elaborate?

jd2003
06-08-2004, 12:54 PM
Hi

Iím sorry, but I seem to have a communication problem.
The way the script should work is as follow, whenever you make a selection from the menu, the selected picture should be display in two location, one on top of the page with text description on the right and the identical picture should be displayed just below the page. (please see attached picture)
The script shows the same picture only when you first open the page, but once you select a different picture, only the top picture changes.

script code for the top picture

<SCRIPT LANGUAGE=JavaScript>
document.write('<a href=javascript:SuzyPicRemote("' + ActiveArray[current].PicVal + '");><img name="PicShowing" src=' + ActiveArray[current].PicVal + ' height=250 border=0></a>');
</SCRIPT>

script code for the bottom picture

<SCRIPT LANGUAGE=JavaScript>
document.write('<a href=javascript:SuzyPicRemote("' + ActiveArray[current].PicVal + '");><img name="PicShowing7" src=' + ActiveArray[current].PicVal + ' height=150 border=0></a>');
</SCRIPT>

glenngv
06-09-2004, 02:46 AM
Just put an id to the div where the bottom picture is contained. You have a div there but it has no id

<DIV ALIGN="center" id="SuzySpot2">
<SCRIPT LANGUAGE=JavaScript>
document.write('<a href=javascript:SuzyPicRemote("' + ActiveArray[current].PicVal + '");><img name="PicShowing7" src=' + ActiveArray[current].PicVal + ' height=150 border=0></a>');
</SCRIPT>
</div>

Then just do as what you did in SuzySpot div.

document.getElementById("SuzySpot2").innerHTML = '<a href="javascript:SuzyPicRemote(\'' + ActiveArray[current].PicVal + '\');"><img name="PicShowing7" src="' + ActiveArray[current].PicVal + '" height="150" border="0"></a>';

jd2003
06-09-2004, 11:16 AM
:thumbsup: :cool: Thank you so much, you are great.
could I write to you privately, if I need further help?

glenngv
06-10-2004, 03:24 AM
You're welcome! :)
If you have further problems, post them here not through PM.
There are many helpful members here and it's good that the public can see the problems solved so that people with similar problems can easily refer to it.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum