Jump to content

Displaying dynamic content with lightbox


greens85

Recommended Posts

Hi all,

 

I'm not sure if this is a PHP question or javascript, so if it needs to be moved can an admin please do so...

 

Anyway, basically I have the following code:

 

<a href = "javascript:void(0)" onclick = "document.getElementById('light').style.display='block';document.getElementById('fade').style.display='block'">View Availability</a>

 

This pops up a divs with a black alpha background, so that it appears the new content is displaying over the top of the current content. This all works fine, however the content I am displaying in the top level div is (or should be) dynamic.

 

In order for the content to be useful I need to grab the id.

 

Normally I would simply do this:

 

<a href = "[b]url.php?uniqueidentifier=<?php echo $row['id'];?>[/b]" onclick = "document.getElementById('light').style.display='block';document.getElementById('fade').style.display='block'">View Availability</a>

 

However what happens in this instance is that the page loads with the javascript and the id in the url but it then disappears...

 

Has anyone got any ideas on how I might be able to get around this?

 

Many thanks,

 

Greens85

 

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.