JQuery :: Hide The Destination URL Of A Link?

Jul 30, 2009

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">

View 7 Replies


ADVERTISEMENT

Changing A Link's Destination Via DOM....

Dec 15, 2005

So I have this:

<A HREF="javascript:dothis();" id="link">

But, via DOM, I want to change the javascript to "javascript:dothat();"

i thought it'd be something like:
document.getElementById("link").nodeValue = 'javascript:dothat();'

but alas, this does not work.

View 2 Replies View Related

SE-friendly Link With Actual Destination Different?

May 11, 2010

I need to have certain links on my site appear to go one place for search engines:

<a href="http://example.com" ...

but go through an intermediate script to track clicks:

... onclick="window.location='http://example.org/track.php?id=112';">

I suppose that's easy enough, but, if the user doesn't have Javascript enabled, I'd like the click to still go through the tracking script.

View 2 Replies View Related

JQuery :: Show / Hide Link Div?

Apr 13, 2009

I have multiple divs called article which have a show/hide link to toggle a div inside called articleBody. Problem is when I click the link all divs show/hide. The html structure is below:

<div class="article">
<p class="show"><a href="#">Hide [-]</a></p>
<div class="articleBody"><!-- Stuff i need to hide on click</div>
</div>

how I can toggle the text to say show/hide as well as just closing that one instance of div article rather than every instance on the page?

Thanks</textarea></p>
<input type='hidden' name='ID[4]' value='206852' />
<input type='hidden' name='URL[4]' value='http://forum.jquery.com/topic/direction-please-show-hide-from-single-link' />
<input type='hidden' name='CAT[4]' value='JQuery' />

[code]....

I have 11 elements with long description of each element of them. I decided to display the elements on the sidebar and the description of each one of them will be displayed on the body directly when the user clicks on the element.but the problem with this one is put the content (or description) inside the javascript code, and I want the description be on the HTML code to make it later on flexible for changes by the admin after putting the data including the description of these elements on the database instead of hard-coded style.

View 4 Replies View Related

Alert Destination Of Form?

Mar 31, 2010

I have a form which I want to see where it's directing. code...

That doesn't seem correct. How do I do it?

View 2 Replies View Related

JQuery :: Hide And Show Elements With Same Link?

Jun 16, 2011

$('a.showContent').click(function(e) {
e.preventDefault();
$(this).each(function(i) {
$(this).parent().parent().find('.hide').slideDown();

[code]...

is also not doing it..how do I hide elements with same link that I used to show them?

View 4 Replies View Related

JQuery :: Show Hide 'td' On Click Of A Link?

Feb 12, 2010

I have a table that contains information that is hidden within a 'td' element. Users can access this information if they wish by clicking on a link that is held in another 'td' element on the previous row (table structure below):

<table>
<tr>
<td><a href="#" class="install_toggle"

[code]....

View 1 Replies View Related

Can't Alert Destination Of Form / Sort It?

Apr 1, 2010

I have a form which I want to see where it's directing. code...

That doesn't seem correct. How do I do it?

View 10 Replies View Related

Get XML File From Source And Send To Destination?

Apr 20, 2005

It should do sth in the line of taking the xml file from the source and sending it to the destination.

PHP Code:
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>New Page 1</title>
<SCRIPT ID="clientEventHandlersJS" LANGUAGE="javascript">
<!-- function SendRS_onclick() {
[Code] .....

View 3 Replies View Related

JQuery :: Use Clear Link To Hide Html Entities?

Jun 18, 2010

I have a large set of input fields (of checkboxes and radio buttons), and aside each set, is a clear button (just looks like text you can click on) that clears any input next to each of the input fields. When no input buttons are selected, the HTML entities that depend on them are supposed to disappear, and this works on load.

My question is how does one easily incorporate that clear button so that it tells the listeners already in action to clear those entities when they click on clear, and without having to manually do it over again with the clear button, if that makes any sense.

[Code]...

View 2 Replies View Related

Need To Change Src Attr Of A Destination Image From One This Clicked On

Sep 5, 2007

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.

View 2 Replies View Related

JQuery :: Repeated Show/hide - P.hidden Must Be Closed By A Link Within Himself

Jun 7, 2010

Here's what I want to do:

1. Have a link (p.advert a.toggle) inside p.advert that tells p.hidden to show itself and at the same moment hides that link (p.advert a.toggle).

2. p.hidden must be closed by a link within himself.

3. When I close p.hidden, I need p.advert a.toggle to become visible so that the user can see p.hidden again by clicking on p.advert a.toggle.

4. The code must be reusable many times on the same page.

At the moment I can't get point 3 to work.

View 4 Replies View Related

Jquery :: Show And Hide Script When Clicked On Link Of Particular Section?

Dec 16, 2011

I have working code to Show/Hide content when clicked on link of particular section:

var showText="Show content FAQ1";
var hideText="Hide content FAQ1";

1. How to do link on particular Title and show this description like Description1, Description2 etc.

2. How to open some sections in advance inside Javascript?

Working code is the following using Jquery jqueryV1.4.4:

PHP Code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">[code]....

View 1 Replies View Related

JQuery :: Anchor Link List Show / Hide Content ID On Mouseover

Jun 8, 2011

I have a list item, where only some of the items are linking to a quote from the client. The quotes are in another list, where each list item has an id corresponding to the client link. I want to show the client quote when you roll over the client anchor link. Currently when I mouseover it's showing nothing.

Here's my HTML
<!--client list-->
<ul id="clientList">
<li>no quote Client /</li>
<li><a href="#client1">Client 1</a> /</li>
<li>no quote Client /</li>
<li><a href="#client2">Client 2</a> /</li>
</ul>
<!--client testimonials--> .....

At the moment, when I mouseover one of the anchored client links, the content disappears, so it's not showing the correct client quote <li>.
$(document).ready(function() {
// see if the requested page url contains an anchor '#'
var hash = window.location.hash.substring(1);
// if no anchor, show the default blockqoute
if(!hash){
var id = 'default';
}else{
var id = hash;
} .....

View 2 Replies View Related

JQuery :: Selecting Sections - Delete (actually Hide) Either A Salesperson Or Client Depending On Which Link The User Clicked

Jul 18, 2011

I am building a web application using PHP. It lists each salesperson and below it, the clients assigned to them. There are only about 5 or 6 salespeople. There could be any number of clients for a salesperson. Each salesperson is given their own div and client information (name, email, phone) is grouped with an unordered list:

Code:
<div id="salesperson-1">
<h1>Salesperson 1</h1>
<ul>
<li>Steve Smith</li>
<li>steve@company-a.com</li>
<li>555-5555</li>
<li><a href="#">Delete Client</a></li>
</ul>
<a href="#">Delete Salesperson</a>
</div>

I would like to be able to delete (actually hide) either a salesperson or client depending on which link the user clicked. I have been using JQuery throughout my site so far and I can accomplish the task for the salespeople by creating individual events for 6 salespeople. If there are only 5 people, the 6th event will never be triggered. If there are 6, everyone is covered. The tricky part are the clients since I can't guarantee a specific number of them. I would like to fit best practices as much as possible and reduce the complexity of my code if I can. Keeping that in mind...Is there a better way to handle the salespeople rather than rewriting the function 6 times? Can I pass a variable to a JQuery function using the onClick binder on the <a> tag --> <a href="#" onClick=deleteClient(10)> and use the variable to determine which client to delete? Would using a function in plain javascript and ignoring JQuery for this entirely be better?

View 2 Replies View Related

Hide A Div/link Without Any Id

Jan 22, 2010

look at following html:

<div style="padding-bottom: 4px;">
<img height="10" align="absmiddle" width="10" src="images/1rightarrow.gif"> <a class="mainmenu" href="affiliate-settings.php">Inoutscripts Affiliate Id </a>
</div>

way to hide this div or link in javascript/jquery? I can't make use of class as well because there are several links as well with the same class name.

View 7 Replies View Related

Hide A Link After Click?

Jul 21, 2010

I am programming a website. On there website the users will be able to click "Add as friend". I am basically wanting it so that when my users click "Add as friend" the link will dis-appear and then it will visit a page on the iframe that I have already coded with a variable (addfriend.php?pid=CODEHERE).

If there is anyone that knows how I can make the code dis-appear using Ajax.

View 2 Replies View Related

Show / Hide DIV According To Link URL

Mar 4, 2009

I am pretty new to JS but I've managed to create a function to show and hide a div according to a link's URL, but I am gonna have lots of url's and lots of div's to show and hide, its not a problem to show and hide them, the only trouble is that they stack, if I show div 1, and then press link 2 to show div 2, Div 2 is gonna be below div 1, and what I want is that when I click link 2 to hide div 1 or any other shown divs, I am sure its possible but i don't know how to do it. I think it would be possible by storing the id of the div in a variable, but the only problem is that when I call that function, the variable always changes so it would be a matter of storing the id in a variable outside the function, but i don't know how to do that, or what are the rules?

This is my code:
JS
function showHide(product) {
var el = document.getElementById(product);
el.className = (el.className == 'hide') ? '' : 'hide';
}

HTML
<div id="1" class="hide">Content of Div 1</div>
<div id="2" class="hide">Content of Div 2</div>
<a href="javascript:showHide('1');">Show Hide 1</a>
<a href="javascript:showHide('2');">Show Hide 1</a>

CSS
.hide {
display:none;
}

I need to have the javascript function call in href because of an applet I am using. In resume, the divs are hidden at the start, when I click one link, the div shows, when I click the other link I need the previous div shown to be hidden (class="hide"), and show the new div and so on.

View 4 Replies View Related

How To HIDE Link At Certain Time

Dec 1, 2009

I need a javascript code that allows me to hide a link at a certain time and show the link again at a certain time. my project requirement is that i need to be able to hide the link at a certain period of time to restrict users from acessing it.only from 12pm to 2pm the link will be display, users are able to click the link. after and before that timing, the link will not be displayed[hide] or the when click on the link error message will be shown.

View 11 Replies View Related

Hide Link And Div OnClick?

Mar 24, 2010

I am having trouble trying to hide a link and a div when I click on a link. Here is what I tried to do first.

I have two links and one div box. When I click the first link I want to show the div box and another link (hide) then at the same time I want to hide the link that I clicked.

Showdiv HideDiv(initially hidden)
--------------div box------
| initially hidden |
| |

[Code]....

If it is not possible to do with link (<a> tags) can I achieve this with an image? Lets say I just change the image onclick and show a div box and then click the same (now changed image) and hide the box.

View 5 Replies View Related

Hide Link On Click ?

Aug 12, 2011

I have a link, and a onClick event, which calls jscript function.

Everything is okay, but how can i for example hide that link on click ?

I mean, i can do onClick = "this.hide()" or link.observe('click', function() { ... I can acomplish it this way, but can i do it with a function ?

Because, on click,a function does ajax reuqests, and i want that function to hide the link, not with inline code, or with some observe actions..and after that request, i want to hide the link.

View 3 Replies View Related

Hide URL In Statusbar When Mouse Over Link

Jul 23, 2005

I know you can do an onmouseover/onmouseout to display alternate text for
links but Im looking for a script that would cover all links on a page
without having to add code to each link.

Is there such a thing?

I also know lots of people hate it when you do that but this is for an
application which requires IE5.5+ and there is no need for the user to view
the links.

View 9 Replies View Related

Hide Previous Link Until Next Clicked

Dec 31, 2009

HTML Code:
<ul id="toggle">
<li class="previous"><a href="#1"><</li>
<li class="next"><a href="#2">></a></li>
</ul>

Basically what I'm looking to do is at first, I want to hide the previous link until next is clicked. When next is clicked the first href will change to #2 and the 2nd will change to #3. If then #2 is clicked it'll go back to the first step, if #3 is clicked it'll move on to...
#2 changes to #3 and #3 changes to #4, repeat above process.
#3 changes to #4 and #4 from the last frame is now hidden.
Is this possible with javascript?

View 1 Replies View Related

Hide/show Link Like Rapidshare

Jun 29, 2006

just wondering, anybody has script/tutorial that does the show link after 45 seconds like rapidshare? There's a counter and after 45 seconds it displays the link.

View 1 Replies View Related

Hide Email Address With Image As Link

Mar 9, 2006

I'm hiding the email address on a website with this javascript which works fine:
---------------------------------
<p>Send your comments and questions to our
<script language=javascript>
<!--
var contact = "Newsletter Editor"
var email = "news"
var emailHost = "netmechanic.com"
document.write("<a href=" + "mail" + "to:" + email + "@" + emailHost+">" + contact + "</a>" + ".")
//-->
</script>
</p>
---------------------------------
How can I make an image instead of the text as a link to start thisscript?

View 17 Replies View Related

Show/Hide Link PLUS Text Change?

Jan 11, 2010

I can I take a code like this:

<script language="javascript">
function toggle() {
var ele = document.getElementById("toggleText");

[Code]....

But make it so you see "Show" before you click, then change the text to "Hide" once you click the link?

View 12 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved