Jump to content

Phot file names and numerical order


walksfarman

Recommended Posts

I have my own website, set up by a friend, and do the updating and changes to it myself. However, I know nothing about php and don't want to abuse my friends generosity any further.

What I'd like to be able to do is have the pictures appear in the gallery in numerical order by filename, and to have the filename appear when the (enlarged) image is hovered over. you can view it at www.mountain-man.co.uk.

Is this possible? Easy? Within my ability???

Thanks in anticipation...

Link to comment
Share on other sites

How about this, is it something to do with the "none" element in the create caption bit? -

 

 

// create image

var objImage = document.createElement("img");

objImage.setAttribute('id','lightboxImage');

objLink.appendChild(objImage);

 

// create details div, a container for the caption and keyboard message

var objLightboxDetails = document.createElement("div");

objLightboxDetails.setAttribute('id','lightboxDetails');

objLightbox.appendChild(objLightboxDetails);

 

// create caption

var objCaption = document.createElement("div");

objCaption.setAttribute('id','lightboxCaption');

objCaption.style.display = 'none';

objLightboxDetails.appendChild(objCaption);

 

// create keyboard message

var objKeyboardMsg = document.createElement("div");

objKeyboardMsg.setAttribute('id','keyboardMsg');

objKeyboardMsg.innerHTML = 'click image to close';

objLightboxDetails.appendChild(objKeyboardMsg);

 

 

 

Link to comment
Share on other sites

Yeah, that's JavaScript. It looks like that might be inside of a loop, are there curly brackets surrounding that block of code, like...

for(a as b) { ... }

 

Is there any PHP in the script at all, surrounded by <?php ?> - If not, I'll move this over to the JavaScript forum.

Link to comment
Share on other sites

How about this, is it something to do with the "none" element in the create caption bit? -

 

 

// create image

var objImage = document.createElement("img");

objImage.setAttribute('id','lightboxImage');

objLink.appendChild(objImage);

 

// create details div, a container for the caption and keyboard message

var objLightboxDetails = document.createElement("div");

objLightboxDetails.setAttribute('id','lightboxDetails');

objLightbox.appendChild(objLightboxDetails);

 

// create caption

var objCaption = document.createElement("div");

objCaption.setAttribute('id','lightboxCaption');

objCaption.style.display = 'none';

objLightboxDetails.appendChild(objCaption);

 

// create keyboard message

var objKeyboardMsg = document.createElement("div");

objKeyboardMsg.setAttribute('id','keyboardMsg');

objKeyboardMsg.innerHTML = 'click image to close';

objLightboxDetails.appendChild(objKeyboardMsg);

 

Is there more to that portion of the JavaScript? From that, I can't tell if the image is added.

 

Also, next time


your code.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.