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 can't figure this out, it was working fine before, and i did a few updates and now it only works when the button is pressed but not if i type into the form and press 'enter'. i don't want he page to reload at all. (also the entire wrapper for my page is hidden using css, a loading image is displayed until the onload event fires, then the wrapper uses jQuery's .slideDown(2000), so if javascript is off they won't even see the form, i'm not concerned about browsers with javascript disabled, i *only* want them to be able to type in the field and hit enter or click the send button to post the data via ajax with no page reload. i'll make it more accessible later)
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 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 have a div, i set the innerHTML property to a formatted paragraph of text. however, at times the text exceeds the width (and height) of the div. how do i create a fixed width div and make it use a scrollbar if the contents exceed the height and width specified. i'm using microsoft visual studio, and i have the width explicitly set in the properties but still on setting the innerHTML it resizes automatically.
I found this handy little script on the net that means the user can only press backspace or numbers in form input.
<script type="text/javascript"> function numbersonly(e){ var unicode=e.charCode? e.charCode : e.keyCode if (unicode!=8){ //if the key isn't the backspace key (which we should allow) if (unicode<48||unicode>57) //if not a number return false //disable key press }} </script>
I have an onclick handler which executes and jquery ajax load function but I need to validate a form first before executing the load function. I don't know how to prevent the load from occurring until the validate is complete. I am validating using the jquery validate plugin.
So, I have a set of divs in a sentece, and within one div is a link. When the link is clicked, I have all the other divs fade out, and the link is supposed to move to the left, then up. I can accomplish this easily, however, I've noticed that there's a pause between when all the divs fade out, and then the moving of the link. During that pause, it jumps to the leftmost edge of the div that it is contained in.Is there a way to prevent the div from jumping? The following is the code that I have. (I've supplied the html and javascript)I tried using callbacks to prevent the div from jumping, but that didn't really work...
Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head>[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.
Let me give a brief first. When someone logs in my application with correct username and password, I set a session attribute, say "user" with his username.
When he logs out, I invalidate the session and remove the attribute "user". In each of the protected pages, I check for the session attribute "user". If it exists, I proceed, else I rdirect to login page. Btw, I am also using frames when the user logs in.
Everything is working as I want it to. Except one thing! After the user
logs out and then goes back using "back" button of the browser, the page displayed says that he has been logged out and needs to login again. But if he refreshes the page (after going "Back"), the page reloads with correct information, as if he is already logged in.
What do I do to prevent this?
I am fairly new to JSP. So, maybe I am missing out on something....
I'm having a problem with a script on my website. My website is wordpress based. I have this script that i need to load on every page except on the main page.
I have tried to make it work, but the only way i can get it to work like i need is including it on the main page as well.
Is there any way i can prevent the script to load on the main page, but load on the other pages?
I mean, is there any code to block javascript on a particular page of a website, but still work on the other pages?
How do I prevent my Link from disappearing?? When I click on the link, "Click Here" It display, "Look At Me!!" but the link, "Click Here" is GONE Is there a way to keep my link, "Click Here" from disappearing?So when I click on the link, "Click Here" the content, "Look At Me!!"should display as well.
I searched a while on the web for this but i didn't find a solution that really worked. So is there a way how i can prevent IE9 from scrolling when i use the arrow keys?
Is there a good way to prevent a second click on a link?I have a rating system where users click a link to leave a rating, i only want them to be able to rate a single time. So i need to disable the link to the user after he clicks it, even after page refresh etc..The link i have looks like
Code HTML4Strict: <a id="{comment.COMMENT_ID}" href="{comment.U_RATE_COMMENT_POS}" ><img src="./images/thumb-up.png" alt="agree" /></a> {comment.COMMENT_ID} being a unique number for each link
How do I prevent a webpage from automatically redirecting to a different URL? Many pages automatically redirect you to a local site for whatever country you are in, for example, and often this is not what you want. I thought I was a somewhat knowledgeable webmonkey but I don't know how to stop this. How do I get to the URL that I type into the address bar without being redirected to a different URL?
Is there a way to prevent the user from refreshing/reloading a particular page? Or any way to prevent a particular form from being posted/inserted twice?
I could ricie myself here pretty good by asking this. but is there anyway to prevent frames from breaking. Examples of how to break them are everywhere, and makes sense.
But a way to stop a foreign page from exiting a frame or at least limit it's chances would be pretty neat. I can both see why there wouldn't be a way to do such a thing, but thought I'd throw it out there.