JQuery :: Targeting A Div As Content For Lightbox?
Apr 29, 2010
I have a JQuery lightbox popup but am struggling how to control the content of the lightbox. all the examples given on the internet are from anchor links that are fixed. I however, need to use it from images pulled from the database so therefore the content will be different depending on what image is clicked. I already have the content I need in a div, so is there a way of targeting that div so it is displayed within the lightbox?
For my new site I plan to have 2 iframes (iframe1 and iframe2) and what I am hoping for is that when any link is clicked inside iframe1 the page will be loaded in iframe2. I know you can target links inside an iframe to load in another iframe, however this will not be possible as the content of iframe1 will be an external search engine such as google meaning of course I can't edit the source to target the links.Does anyone know if it is possible to use javascript or any other web language to get links clicked in 1 iframe to load in another?
I'm using Lightbox picture displayer [URL].. and a content slide show UI [URL].. on the same pagesimultaneously. Although when I connect to the javascript files in my html page one of the effects won't work. Whichever javascript file I include last doesn't seem to work.
In the scenario below my content slide show effects won't work because they are listed first. It seems that whatever is listed last overrides everything else. I've also listed the error I get when running the page.
i have a site that uses a lightbox based image viewer and the jeditable plugin. basically my site has a photo gallery and below each gallery i have the option to set a caption to the photo.
i have done the caption using jeditable and i've also tried using the ajaxForm plugin for jquery to see if jeditable caused the problem. but whichever method i use, approximately 20% of the time a photo caption is submitted, if you then click on the photo to view full size using lightbox (so far i've used fancyBox, prettyPhoto and Lightbox itself, and all break in the same way) it gets stuck at "loading", whereby the overlay appears, the inital empty box and animated gif appear, but then it just spins forever and never loads the image, as if it cant access the URL. weirder still, the FIRST time i do a page refresh to try and fix the problem, it doesnt work (something in the cache i expect), but if i do a second refresh or a shift + refresh, it resets and works again. it's very difficult to eliminate all variables because the problem is so sporadic, but it seems that the most likely way of breaking lightbox is to do the following:
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:
How to embed this flash so it will stay behind other content, e.g. a lightbox?
<td align="left" id="container" valign="middle" z-index="0"><!-- see notes for files included --> <a href="[URL]">Get the Flash Player to see this rotator.</a> <script type="text/javascript" src="my/path/to/file.js"></script> <object><script type="text/javascript"> var s1 = new SWFObject("my/path/to/flash.swf","rotator","415","120","7"); s1.addParam("allowfullscreen","false"); s1.addVariable("file","my/path/to/file.xml"); s1.addVariable("width","415"); s1.addVariable("height","120"); s1.write("container","embed"); </script></object> </td>
I am fine with embedding full flash but with this XML/javascript flash, I am truly lost.
i have a xml document (static) that I need to test what is in a grand child element. The real application is a jqGrid. I have a onSelectRow operation going on. I can click on a row and get a response (in a alert window) for any root children. But how do I do this for anything deeper in the tree? A portion of my xml is attached.
I am putting together a validation function and am having trouble with targeting multiple elements.[code]an onclick event fires my validation function. If any of the fields are empty, the appropriate error message should display.This sort of works. If all of the fields are empty, only the error message of the first element is displayed, not all 3.
I'm customizing the cycle plugin a bit from [URL] , which slides through a number of items.The issue I have is selecting a child object, to get its 'alt' attribute, and display it as a description. Using the default example:
function onBefore() { $('#output').html("Scrolling image:<br>" + this.alt ); }
...works great when each item is an image. But I need to link each element, so my markup looks like this:
I'm working on the validation plugin for jquery and trying to figure out how I can target the text boxes that are dynamically generated with this change event. I'm trying to target them so I can set up rules for my page.
I'm trying to use a :not statement, so if you click anywhere else on the page BUT the element in the :not a div will disappear. When i use the same statement without the not, it works fine (click that one element and the div in the function hides).I'm assuming that the :not statement isn't working because the element is a child of its parent, so when you click it, essentially you are still clicking the parent which isn't included in the :not.
I have an instance of a div (button), inside this div is a link wrapped in a span. When you hover over the div (".home-button")I want to move the background position inside its "span a", I've achieved this using the code below.
I currently have a slideshow working on my client's site, but I can't get lightbox to work properly on it. [URL]...
Is there a way to fix the existing slideshow to work with lightbox? Or is there another way of doing this (keeping the same look that is currently in place)?
What I want to do is a simple geo target for some ads I have. If a visitor from the UK or US views a page I want a specific ad to load up, if they are outside the UK or US a want a different ad to load up.
Is this possible with Javascript? I don't need a complicated PHP script, just this simple task.
I am wondering if it is possible to get the response from a method within a given page, and that function alone? Traditionally, I have been getting the response from the Page_Load method of the targeted page, but now I want the response from a particular method on the target page:
Public Sub SomeCallback(ByVal sender As Object, ByVal e As EventArgs)
So I'm having an odd problem (at least odd to me).When I use getElementById to target an element in the DOM, it will work fine until I place it within the content DIV wrapper. Do I have to create a path like getElementById(wrapperDiv.targetItem) or what?
I've got a dropdown list of products and I have a button that will add the product to my cart. However, as with all my 'add to cart' buttons, when the user clicks it I want to pass the details to my cart via an iframe so that the user doesn't leave the page they are on. I am writing in PHP4 and mySQL, and have had to add some javascript for the onclick event.
I have a frameset with two frames one, scriptFrame, containing a page with the javascript on it the other, mainFrame containing a page with a form, form1, on in, with the text field, text1 in it.
I want to target the text field and change the value from the script running in the scriptFrame.
The code i have is:
parent.mainFrame.document.form1.text1.value='x'
But this does not work.
I can target the document ok using:
parent.mainFrame.document.bgColor="violet"
And running a script from the page with the form on it I can target the form using:
document.form1.text1.value='x'
So why doesn't it work when I put the two together? Any help would be much appreciated.
I have been working on a Javascript powered search engine for a set of browser based user guides. I can't use any server-side languages as it will all be accessed from a network drive, which as been a real pain as I would rather have just made a php search engine, but whatever...
I have a working JavaScript search function, currently the results are displayed in the same window/frame as the search form.
All i need is to be able to target the results to a different frame. For example, I'll keep the search form in a top frame, and some information in the bottom frame. Submitting the search form will display the results in the bottom frame. Its giving me a headache, I'm sure it is remarkably simple. Code: