I am using malsup's gfeed plugin with a feed on a site. The links go to an external site.How can I change the jquery of the plugin to open the links in a new window? Or how do I overwrite the "target="_self"" on links with jquery? Nothing I am trying is working. I am not new to jquery, but slow in learning.[URL]
I have a menu, on which is a delete link. The URL of the link is quite plain: <a href="http://mysite.com?delete=true&id=123">http://mysite.com?delete=true&id=123</a> (quite obvious I think that the request is to delete the id=123) I wish to hide the destination URL in the browser from the user - so that it shows a harmless url like: <a href="http://mysite.com?#">http://mysite.com?#</a> or similar. The reasons are more aesthetic than anything else. Also the other advantage is once the user clicks on the link, and then hits on refresh, the request gets posted again and because the id=123 has already been deleted, it will just generate an error. I dont mind using ajax for this - ajax and non-ajax.<br clear="all">
Inside of an img tag I have an onclick that fires a function. The function is supposed to change the src of a larger image elsewhere on the page. Think: click the thumbnail to see it at the enlarged_image that is on the page.
I tried this function but it doesnt work =/
function doit(){ var node = this; var nodesrc = node.getAttribute("src"); dest_img.setAttribute("src", nodesrc); }
I dont think 'this' is doing what I want it to, plus I get the error that node.getAttribute() is not a function.
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.
Basically, when you click a link a function is called with a parameter based on the particular link you run. Then the code runs through an xml file, and if the parent of the nodes I've cyling through has a value equal to the parameter past to the function, that node is used to create a new link with window.open function attached to it.It all works, or seems to, and when I alert what is being built, it looks right to me, yet the links don't work.I've attached a copy of one of the alerts of one of the links as it's built.
Is it possible to create a page (with javascipt) that will send an email to the "me" but the user can't see the destination email address? Im wondering if I can do the "party" with Javascript without using some server page like PHP.
I currently have a normal link like Code:<a href="http://sitepoint.com" class="link">sitepoint</a> and when a user clicks on it I want to be able to change the "link" class to a different class. However, I don't want to add anything to the actual link html. Is it possible to do this using javascript without modifying the original link code?
I am trying to dynamically clear the value of a form input field and then submit the form.When I used $('#my_field').val('') to clear the field, it was cleared on the screen but when the form was submitted the original value of the input field was posted.My browser is FireFox and I can see using FireBug that when the field is cleared, firebug is still showing the html code with the old value. E.G. <input type="text" value="old_value" />The same situation occurred if I used $('#my_field').attr('value', '') to clear the field.The same situation occurred if I actually changed the value of the field rather than just clearing it.To work around this problem I ended up using the $('#my_field').removeAttr('value') to clear the field before it was submitted.
I am a complete novice when it come to Javascript. I copied the script for displaying random images at a specific interval (from javascriptkit.com). I would appreciate knowing whether the following is possible:
The pages are based on tables, so the parts that change are all cells.
1. Can I define text instead of an image in the array? i.e. can I have the image change to say an apple in one cell and the next cell have text explaining what an apple is?
2. Would it be possible to put a countdown timer for when the image/text is going to change?
Ive got a small image of a power button and when pressed the inner section on the button changes to yellow, but when its pressed down Im also trying to get part of my H1 (main header logo title) to change to yellow.
Ive created a span with an id surrounding the letters of the H1 that I want to change, the id being : "power";
The javascript that I have come up with so far and works is as follows:
<img id="poweron" src="http://www.sitepoint.com/forums/images/power.png" alt="Power on button" onmousedown="this.src='images/poweron.png';" onmouseup="this.src='images/power.png';"/>
I understand Im not really supposed to be using inline JS, and I know Ive got to create a function for the onmousedown event to trigger changing the H1 text, so am I under the right impression that the JS so far written is redundant and will have to be re-written so thats contained within a script placed just before the closing </body> and an external script for invoking the main function ?
I,m using js to parse an XML file. the values from each node are written into an HTML table. this all works fine. however when I try to read a web address from the XML and use it as the href in my <a> tag the page jumps straight to the URL specified. how can I prevent this happening?
I have an idea but don't know if it's possible, from a technical point of view. Imagine to have some text.
Example "John and Mary go to the cinema."
I'd like to have this kind of links. By selecting "John" I can go to: Link 1 (eg. page 1) Link 2 (eg. page 2) Link ...
By selecting "John and Mery" I can go to: Link 4 (eg. page 4) Link 5 (eg. page 5) Link ...
So, the word John can be included in two links. The links are multidirected. Do you know if there is a package useful for this purpose? On the contrary, do you have some suggestion useful to achieve this goal? I really don't know how to start.
It could be nice to have this possibility.
Example "John and Mary go to the cinema."
I could choose:
"[John] and Mary go to the cinema." and then go to select among the possible "John" links.
or:
"[John and Mary] go to the cinema." and then go to select among the possible "John and Mary" links.
I have a javascript menu vertical in a left frame of a website and I want to have url-links in that menu to show a html-site in the right frame when I press a sublink All in javascript.....
I want to place a piece of JavaScript at the top of my page/s that wil tell all links on that page to open in certain target windows dependin on the hostname.
Suppose the intranet address is http://intranet so this means that the hostname is "intranet" right? If I want all intranet page links to open in the same window but al other links (ie external internet links) to open in a new windo (_blank) then would I use something like below? Please correct an place I've gone wrong:
But somewhere in there I would also need an "else" statement to tell i to open all other links in "_blank" target. Can someone please tell m where that should be added in. I'm fairly new to javascript and am no exactly sure what order some of this stuff should go in.
I found a script for drop down menus on the web. I use it on my homepage (www.k66t6-mf.com). The script works fine. However when you click on the links the pages open in a new tab or window. I do not want this. Does anyone know how I can prevent this from happening? (I know there is a lot of code, and I'm sorry about that).
Im trying to run javascript on a page, that has a regular frame, and get all the links from the frame. However im not very good at javascript which makes this much harder :cool:This is the script im trying to use: