I had another learning bump I'm going to ask [code]...
during the first try.. everything is okay.. but when i close the modal window.. when i click another boat to view, the previous one that was not supposed to show.. were displayed....
I have tried hiding it.. by doing $('class name').hide();.. also I have tried setting the css again to display:none.. but still a no go..[code]...
I am running a simple show hide div script as follows: <script type="text/javascript"> <!-- function toggle_visibility(slideshow) { var e = document.getElementById(slideshow); if(e.style.display == 'block') e.style.display = 'none'; else e.style.display = 'block'; }
//--> </script> <a href="#" onclick="toggle_visibility('slideshow');">Show Gallery + </a> <div id="slideshow" style="display:none">slideshow</div> It works but the page reloads and returns the user to the top of the page not to the "shown" div. Any way to send them back to the shown div or stop the reload?
If you see this site: [URL]. You will see the button +info. By clicking there, I show or hide a <div> using the below js function:
<script language="javascript"> function toggle() { var ele = document.getElementById("toggleText"); if(ele.style.display == "block") { ele.style.display = "none"; } else { ele.style.display = "block"; window.scrollTo(100,300) }} </script>
The problem I have here, is that each time the "next" or "prev" buttons are pressed (< or >) reload the page, and I want to reload the URL but with last status for the ele.style.display. I don't know if I am clear enough, but for instance, I open the website home, then click in +info, it shows the hidden div, then click in next button ">", I want that +info is opened if previously it was opened.
when I click on a div element an anonymous function gets fired that appends eight handles around the box. Each handle has its over unique anonymous function as well that resizes the div box upon a mouse down and mouse move. Ok all is working fine except when I drag a handle around to resize, other elements on the page become highlighted and the whole resize procedure gets broken or rather stuck. How do I make is so when I drag this handle other elements are excluded from being highlighted by my mouse down and mouse move actions?
First, I did this for testing <script type="text/javascript"> <!-- var cururl = window.location.href + "?style=1" document.write(cururl); //--> </script>
and it works. It gets the current url of the page and appends ?style=1 then writes out the URL. However getting it as a clickable link is what's stumping me. <script type="text/javascript"><!--function goURL() { window.location.href + "?style=1" } //--> </script> <a href="javascript:goURL()">Go There</a>
Doesn't work in my test. As you can probably see, I'm not very well versed in javascript.
I'm trying to add some js automation to a blogging application I've developed for a wysiwig site builder program. This program doesn't allow php or any kind of server scripting, so everything has to be done with js. The basic set up is that a user enters a blog post in the application and the code below appends a comments div (which are already on the page but hidden by css) to the post:
Code:
Instead of using this code for every post instance, I'd like to create a simple loop that will assign an incremental number to the post and comments id's when a new post appears in the page's html, and then append a comments div to the post. I tried a for routine that would add 1 to every post, but couldn't get it to work right.
Everything works great - the returned value is loaded into .postcontent perfectly. However, a 0 is appended to the end. Every time. Even if I return nothing, a lonely 0 shows up inside .postcontent.
Is there a difference between right clicking an iframe and reloading post reponse vs. using javascript to reload the frame? So far, the javascript route hasn't worked for me. [some context] I am writing a little bookmarklet to help me with the online registrations at my school. Here is the setup.
Load up a page on the domain. Remove all body elements. Insert an iframe. Set iframe to page for class roster search. (in iframe on school search page) Select class search options, POST the form data, and view results in frame. *This works perfectly, but I need to have it refresh results every minute or so. When I use frame.contentDocument.location.reload(true); the frame loses the post data or something and the page is broken. BUT when I just right click on the frame and select "reload frame" it works perfectly. What is the difference between rightclicking the frame and refreshing it like that vs. using javascript to reload the frame?
I have a simple product display with an product image. The product image changes with ajax when i click in a dropdown menu on another color.
Now i added the (beautiful) zoom script cloud zoom. It just works fine but after i click on another color and the product image reloads the script does not work anymore. instead my <a> is just a normal <a>.
This is the part that reloads at all:
How can i reload the function when this part reloads? Or what else could i do?
I'm trying to find an example of a country selector (which also provides a state selector if USA is chosen) then you cvan select the city, any samples out there?
I have a simple hide and fadeIn. When you rollover a word it will reveal the definition. The problem I am having is if you move the mouse around quickly from one word to the next word sometimes it gets hung up and a definition will not hide. The result gives this hanging defintion and whatever the other definition the mouse is rolledover.
Here is the code I'm using:
There are about 70 words in a box with the definition being reveals on the right hand side. Is there a way of making sure there is always only one definition being shown?
I am implementing some tabs using jquery and have run into a problem where a google map on one of the tabs is not displaying. I read that a solution is to "Use the off-left technique for hiding inactive tab panels"i.e Code:
I'm writing a script that opens the current page into a new window with a different style sheet for printing, don't ask me why it needs to open into a new window, it's a request from powers that be! Anyway when I reload the page in IE it's fine but in FF it seems to render the html without a style sheet!!?? I think it may be to do a caching problem in FF with new windows but I'm not sure. Heres the code I've written: Code:
I would like in fact that the frame is reloaded in the same way that when one uses the function " reload frame" of the contextual menu of Netscape 4.x.
I have a index page on which there are several iframes which point to pages from a tomcat server. Sometimes when the index page loads, most of the iframes display session expired error. When I refresh the page, all iframes load properly. I want to reload the page twice whenever I come to that page initially. I also want to reload that page twice when I come to it from another page. Any ideas are welcome.
reloading an XML file that I'm reading with AJAX. I'm looking for a way to refresh this XML when the page is refreshed so I know that the data is up to date. It only needs to happen when the page is reloaded. one solution suggested something like this
Code:
var xmlhttp; function loadNewsContent(url) {
[code]....
But that doesn't work at all and I don't know why.
I have a php script that dynamically creates images, reusing image files on the server to save space and clutter.
The problem is described in the steps below:
1. User clicks on a button. 2. Same page loads, but the php script creates a new image in an old file. 3. It displays the image file, but the old image shows, even though the file contains the new image.
My options are:
1. Use javascript to force a reload when the user clicks the button (not desirable, because the user is forced to confirm the reload by the browser). 2. Put a cheesy blurb on the page telling the user to reload or refresh (along with ideotic explanations of how to do it). 3. Some really great way someone here is going to describe to me (my preference).
After my web page has been loaded I'm doing some tests with a JavaScript. If I figure out that something is wrong I'd like to reload the whole frameset.
With Internet Explorer and Mozilla Firefox I can reload the whole frameset with parent.location.href = "index.html";
However, this doesn't work with Opera. Does someone know how to do that with Opera?
I'm a j-script (and html) newbie with what I thought was a simple requirement:
1) From a link in a primary window open a secondary window 2) Want to specify size of secondary window 3) Want primary window NOT to reload when secondary opens
Don't want to prejudge the approach; I'm guessing Javascript can help, and in fact have accomplished 1) and 2) above with the following, embedded in the body of the primary window html:
But when the secondary window opens, the primary window reloads. I've seen earlier posts addressing this problem (or similar ones), but I haven't been able to make any of the suggestions work.
I'm using window.location.reload(true) to refresh the current page. It works fine in IE but in FF it doesn't seem to work correctly. If I view the page source, I see that it has been updated, but the display isn't updated. What's going on?