Using Two Scripts On The Same Page, Only One At A Time Works?
May 24, 2011
I am currently trying to display a gallery of images using Lightbox, and a contact form in a different modal window using a different script.
Here is the URL, so you can view the source. [URL]
Clicking 'contact' opens the Contact window, which currently works, and clicking the images SHOULD open lightbox but doesn't. If I shuffle the code around, I can get Lightbox to work but the contact window then breaks.
If someone could provide just the code I should replace mine with so I can just copy and paste it in, that would be great because I don't know anything about javascript and struggled to follow the instructions for this I found elsewhere.
I have a web page a lot of thumbnail images arranged in a table. I would like the user to be able to click on the thumbnail to open a window with a larger view of the image.
So I wrote a JS function to accept a URL as the argument and open a new pop-up window with the given parameters. I need this function to potentially run multiple times from multiple links (in this case images) on the same page. However, after the first time I click the link, the function runs, and I close the pop-up, the function will not run again if I click the same or another link on the page. If I refresh the page, the function will work once and then not again. Is there a buffer I need to clear or something to reset to allow multiple links to work?
I have tried the function call in a whole slew of ways. Here's my current code (I "..."'ed out the URLs for brevity):
1. Make ajax request (via getHTTPObject(), no libraries is used)
2. Create an iframe with script, src is "blank.html".
3. use iframe.document.write() to execute scripts (inkluding document.write based scripts) in the iframe.
4. call parent window's document to clone the iframe content.
5. Append the content clone to parent body.
Works like a charm in all browsers but IE, where every version - including IE9 beta - hangs on iframeWindow.document.close() with empty cache, leaving the window/tab unresponsible. When I force quit, restart and load the page again (now in cache) it works.What I've tried already:
* Googled.
* called the ajax request callback manually with string instead of request.responseText - it works even with empty cache here.Removed document.close() - resulting in scripts in iframe not executing at all (again, only with empty cache, cached pages works fine).
* Tested to make the ajax request synchronous - no difference.
Console.log trace:
Code: append() begin unlimited-scroll.js:160 install() begin unlimited-scroll.js:194 iframe begin[code].....
I wrote this code but it only works every other click So it doesn't work the first time it's called, but it does the 2nd time etc.Zero errors reported. What's wrong? javascript Code:
I have a site that uses a sort of coverflow to display images. The coverflow is a JS implementation.A fair amount of time, the script works fine. Other times, it does not. The page loads but the script does not start. Reloading the page usually gets the script to work.I think that the script may be trying to start before the page has finished loading. Is there a way to delay running the script until I'm sure the page has loaded? That at least would confirm this hypothesis (or not).
I have a dialog that opens from inside a tab. Everything works great until I change tabs and come back. the second time I visit the tab and open the dialog my javascript does not work.I can retrieve the data from the form but its the old data from the last time it was open.the ajax does not submit and if I try debugging with firebug I see this error:[code]
When I close the dialog I am only using $(this).dialog('close');I read that I need to use remove in addition to close or destroy;so I have tried using :$(this).dialog('remove');$ (this).dialog('close');as well as destroy and I get the same results.
I want to use the the replaceWith() function in a html form with many select buttons to replace the select elements from a second button to other values when the value of a first select button has been changed. The html code is generated in a perl cgi script (I write this only for completeness).The function works but only the first time when I change the value of the first button (e.g. button "Type"). On the second change no more actions are done on button "Severity".[code]I added alert() debug functions in the javascript function getOneofs() and the output looks ok.So the var "selectCode" should be also ok.
I use DIV tags with onMouseOver action on the DIV-s. I want to download and show a photo if an onMouseOver activates. This is simple and works but there is a problem.First time I move my mouse cursor on the DIV the photo doesn't appear, only its border. When I move the mouse off and back again, the photo appears right. I want to show the photo first time well.There is a solution: preloading images with JavaScript invoked with the onLoad event of the BODY tag. But I would have numerous (100+) photos, so it's a bad idea to preload all the photos (and users usually want to see only a few, not all of them). It is acceptable to wait a second or two after activating onMouseOver while the photo is downloading but it's not acceptable to do TWO onMouseOver actions for a photo
I would like to run this in recursive mode, and I'm starting the function with:
$(function(){ $.bubbles(); }
The problem is, that function works only one (and a half) time. Console shows: start callback start I have not idea what is a problem. Function needs to be run constantly.
I am displaying an external website via an iFrame on my website. I am using the following code to detect if the iFrame tries to redirect the parent window:
I'm a developer located in Venezuela (latin america), and i have like 2 years using Jquery in every project that came to my hands. I have created a modal dialog inside a tab with a simple form that has a datepicker:
I have a html document when i run in Internet explorer i am getting the desired output(j query working fine). But i copy pasted the same code in aspx page...the same code is not working properly...
I know this is not supposed to be that way, but somehow that's the only way it works for me. First I include
<script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="fadeslideshow.js"></script> where fadeslideshow.js is jQuery-based http://www.dynamicdrive.com/dynamicindex14/fadeinslideshow.htm But I also want to use jQueryUI, so I have to include it:
I am using jquery to popupa calendar. I have done this on several pages with not problems this one page keeps claiming the error below. Message: Object doesn't support this property or method
var sortableTable = new Class({:thumbsup: getOptions: function(){ return {[code]....
It works flawlessly on my dev page: http:[url].....But I am having issues with is on my live page: http:[url].....My first thought is that it could be a labeling issue (ie: I forgot to remove "/dev" when moving the HTML over to live) but after reviewing for an hour, I don't believe this is the issue.
sort of made a thread about this earlier but I dont feel I explained the problem very well, if you go to http://love2-create.com and click on the orange "view profile" link about halfway down the left hand column a tab opens showing a profile with a small picture gallery at the bottom, this gallery works fine in firefox and google chrome, however in safari it works sometimes but not always and in IE it usually works on the first time the page is loaded but then when the page is refreshed and the profile link is clicked I get an Error: 'document.getElementById(...)' is null or not an object on line 60,the lines in question look like this:
HTML Code: buildcontentdivs:function(setting){ var alldivs=document.getElementById(setting.id).getElementsByTagName("div")
I'm developing a website and I am using a slideshow done in jquery which works fine on all pages expect the gallery page.On the gallery page I am using Lightbox2 but as soon as I add the js files to this page the slideshow stop working and only shows one image.
I have a really cool floating menu script that I downloaded that creates a layer that moves when the screen scrolls. The script works perfecftly when the page is loaded on it's own.I'm now using a CMS application and trying to load this page in a wrapper. The way the CMS does this is to put the page into an iFrame on the CMS page. When it does this, the floating menu does not scroll with the window anymore. It simply drops down to the very bottom of the page.I believe this is because the script is getting the height parameter from the iFrame instead of the actual CMS document. I have tried altering the height objects in the script to use parent, top, parent.iframe...and many others. None seem to work properly. Here is the script: Code:
I am very new to javascript so I'm sorry if this is a stupid question. I made this page by pecing scripts together that I found online. I don't even know if this is the best way to get my desired results. I want the background to fill up the entire window, as well as the text and link to remain on the bottom in their respective corners and also re-size with the window. The code doesn't work the first time the page is loaded, but it works fine after it is refreshed. Do y'all have any suggestions on how to fix this.
when we access a page if it is idle for sometime automatically it should redirect the page automatically .if in btwn mouse on click i done then reset the time again .
when we access a page if it is idle for sometime automatically it should redirect the page automatically .if in btwn mouse on click i done then reset the time again
i am using an image scroller and i have it on three pages, the pages use the same header, the same css and the same basic structure.such as
table content footer
the problem is that the scroller works fine on two of the pages but does not work at all on the one page.here is what i am getting on that page
Message: 'ElementExtensions' is null or not an object Line: 1898 Char: 3 Code: 0 URI: http://www.mysite.com/lightbox_slideshow/prototype.js
Message: Object doesn't support this property or method Line: 705 Char: 41 Code: 0 URI: http://www.mysite.com/lightbox_slideshow/lightbox.js
Message: Array length must be assigned a finite positive number Line: 464 Char: 5 Code: 0 URI: http:[url]....
the only common denominator i can see is that the page it does NOT work on is in fact a photo manager page, the other two (that DO work dont deal with photos)i checked the array and the js vars and stuff are different from my photo manager vars (php) so i was thinking maybe there might be a clash of some kind accessing the queries at the same time when the page loads but i dont get any errors other than these.by the way the scroller is black not grey like the others for background.does it sound like from the errors that i am getting that it might be a db query clash of some kind.
I have a Nivo slider that works fine on this page. Slideshow page. But it fails when I load it into this page using jQuery's .load function Project List (Click on any of the project links to load the content) Might it be a conflict between nivo slider and the jquery script that controls the open/close and loading the content? Here's that code: [URL]
I'm using an xmlhttp request to get information from a database. Everything works fine in Firefox, and it works in IE until you try to refresh the page. If a news post (thats what it is getting from the database) is deleted it will continue to show the same information. I can't really post all of the script because it (along with the html and php) are spread out through many different pages: