Void(0) Not Working - Blocking Any Links From Allowing The Use To Leave The CMS
Feb 12, 2009
Currently I am building a mini CMS thing for a client. The areas they are editing deal with links so as the code is being pulled in I replace any:
I am doing this so a person is not in the middle of working on an edit and accidentally clicks a link and all their edits are wiped clean cause they left the page.
Now everything is working just fine and my javascript:void(0) is blocking any links from allowing the use to leave the CMS, well all links except ones that have a url ending in .html
So again all:
Any reason why the javascript void wont work on urls that have .html but do work with urls that have .php?
<div id="mush" style="position:absolute;top:80px;left:1500px;width:200px;height:10px;background-color:black;" onmouseover="tim();"> <p>MUSHcode</p> </div> <script type='text/javascript'> var div; var ts; var te; [Code]....
The script just stops working completely when the if, then statements is in there. The div's original height is 10, so it should work, because it only issues void(0) if the height is not 10.
I am new to jquery, and love it so far, but I am more of a designer, not a developer. I am learning jquery to enhance my sites, and I am having a problem figuring out buttons.
I have them working in firefox and safari, but in IE links do not work.
The very first javascript:void(0) I have in this script works perfectly. It calls my database and gets 12 images and titles for my site when you click the next and back button.
However the next javascript:void(0) I use for some reason gives me "error on page" and does not navigate like the first one. I have tried everything I can think of and I am totally stumped as JS is not my area.
Would someone kindly point me in the right direction? I have manipulate the php script thinking it might be that, I have tried every variation to try to get the second javascript:void(0) to control only the second div. Code:
I've a 'TEST' link on page, which has href='javascript: void(0)', and a big iframe page.
When I load the page, window.onload event is triggered after the big iframe page loaded, If I click the 'TEST' link before the window.onload execute, the window.onload will never execute in IE 6.0.
Here 'some_function' is opening the 'pagename' in a new customised window.
This page also contains a few images weighing 50kb. Now if I click the <a> links before the images are loaded fully, following happens (on my pc it works well but it happens when i test it online):-
1. The new page opens in a window as required 2. But the page loading is ABORTED and the images are not loaded.
Why not a plugin like (small correction void should be a string) $.fn.delay = function(delay){ if(typeof delay==="undefined") delay = 1000; return this.animate({"void":0}, delay); } This way you can call it like this $('#element').delay().effect('pulsate');
I am creating a several step sign up process for our company. I want a new div for each step along the way. I will then either accordian or some other style for them as the customer progresses through the process.
I want to use a hierarchy like div#step1 -->content div#step2 -->content
I recently went into twp php files and made a few very minor changes to some outdated $date functions. Now, I have three small icons for 'copy', 'paste','delete' using the javascript 'onclick' function that have stopped working.
In fact, when I replace the two recently revised files with the originals, these icons no longer work there either.
From the primary php file is the relevant lines of source code....As far as I can tell, the second paragraph in each area is returning a 'null' value; i.e. o1a.options.selectedIndex is null.
From the supporting php file are the following lines of code....
None of these lines of code were changed or altered when I was updating the code.
I have an expandable menu (not an accordion), that needs to toggle div elements below it. If I put the click event on the h3 of the menu, it works fine but as soon as I put it on the link, it doesn't work.
My site pages are now html4/strict so I used the "function externalLinks" script found here [URL]. I followed the instructions carefully, made sure I copied the script shown to the external.js file and uploaded it into the same directory as the html files. Also made sure that external.js was called as required in the head. Also made sure all target="_blank" were changed to rel="external" as required. Unfortunately, it doesn't work. The link takes the visitor outside my site, instead of creating a new window. I don't get it. Here's one of my pages ... [URL]
I'm utilizing the replaceWith(); function on a page to simply replace content in one area with new content with corresponding buttons.
Problem is I really want to have slimbox on my images that I am loading into this new area, and the links will not work. Oddly enough the code recognized that it is a link, it just won't play the slimbox animation, it just opens the image normally.
The code I have in a function file linked from the main page (portfolio.html) is:
$('#graphicOne').click(function() { $('#descrip').replaceWith ('<div id="descrip"><div class="floatRightPortfolio"><h4><em>"Embrace your Environment"</em></h4><p class="right"><a href="portfolio/embrace.html" rel="lightbox" title="Embrace Your Environment"><img
[Code].....
So basically there's a descriptive area on the right hand side, and the buttons are on the left. Inside the descriptive area is the title, and then the image.
I've been trying to make my very ajaxy site more SEO friendly, lots of the returned actions from ajax can be retrieved as a full page, so it's just a matter of exposing the links. Up until now I've had 'span' tags which I have now changed to 'a href' so that the search engines will follow them. I've added the following code so that if the event should send an ajax request, it does that, or if it should go get the full page, it does that.
I have some code which forces external urls to open in a new window, it works great but an Addthis I have added to the exclusion list still opens in a new window (which is a fallback if there is no .js etc) (as well as the popup appearing).Really not sure what to do about this, any suggestions will be welcome. Maybe change the new window method from simply adding the target="_blank"?
I have a Google map (API v3) with one marker and infowindow which contains a link that I have placed in a modal dialog. The problem is that the link in the infowindow is not clickable, even though it reacts to mouse hover. If I remove 'modal: true' from my call to open the dialog, the link becomes clickable, and the new page is loaded. Is there a solution to this?
I want to know is it possible to block user from selecting any text displayed on a webpage? What I want is to block user from selecting anything by mouse drag.
I have been given the task of creating an online coupon system. The only real challenge that I can identify at this point is allowing only one coupon to be printed rather than several times. Because printing is done on the client side, I thought that it would make sense to post this to newsgroups that cater to the JavaScript folk. Can anyone out there point me to how I would enforce this, that is, allowing only one coupon to be printed. Someone told me to look at the window.print() method.
iw ant to have a function so that user can only enter numbers in the text box and + ( only once in the beggininging). if user wants to add + he can only enter + once as the first character like +123 or 123 bt cannot enter 1+2 or 123+ or +123+
I wrote a script that tracks the number of characters a user types into a text box. It has a limit you can set, and when that limit is reached I would like to block the user from entering any more text.
How can I block the user from typing characters in the textarea?
I'm doing some code to show an image where a user clicks on an image map. I've got code that tracks the mouse location and uses that to place the image where you click (it also stores the value in some inputs so the co-ords are sent through post).
Works perfectly fine in FF but in IE it stops tracking the mouse's location once you move over the image (so when you click it places the image at the edge).It should be tracking the client mouse at a document level so I find it bizarre it doesn't track it for this one element.
Code:
<script> if (window.Event) { document.captureEvents(Event.MOUSEMOVE);
I am using google translator in my own site to translate it to other languages ,but , when mouse is over the text , google popup page indicated , that containes original text in english! Can I disable this popup page ?