href

Does onClick affect SEO-value?

I wonder if there's any SEO difference between using a regular a href-link or making an element clickable by adding javascript onclick? Basic example of the my two options... <a href="myUrl">Link</a> <div onclick="javascript:yUrl">Link</div> ...

displaying words from db as links in php

i have words like 123.com , 234.org in database how to display them as links? <?php $con=mysql_connect("localhost","root","123"); mysql_select_db("www",$con); $result=mysql_query("SELECT * FROM Tag"); for ($c=0; $c< mysql_num_rows($result); $c++) { $f=mysql_fetch_array($result); ###########echo $f['name']." "; } mysql_close($con); ?...

HTML - Recomnended href link sytanx

we can give the href like the following <a href="images\image.png"> <a href="images/image.png"> <a href=".\images\image.png"> <a href="./images/image.png"> which is the recommended method... which doesnot have problem on any browser and on any web server.... leave the image type... consider the link\paths and PLEASE explain why t...

In coldfusion how can I find the filesize of a linked file and use that as an alt attribute

I have a large list with icons linking to pdf and msword files. I'd like to get the filesize in kb of the linked file then use that as the alt attribute on the image. The generated code would look something like this. Description of file <a href="file1.pdf"><img src="pdficon.gif" alt="27.6 kb" /></a> <a href="file1.doc"><img src="wordi...

Access asp:HiddenField through javascript from target page in anchor tag

Hi, I have a page (startPage.aspx) which transfers control to another page using an anchor tag i.e. (a href="newPage.aspx"). I would like to know how I can access some form element on startPage.aspx from the newPage.aspx in javascript? (eg: document.getElementById, etc). The element I am trying to access is an asp:HiddenField which does...

javascript add variable onto end of link

I'm trying to add a variable i created on to the end of one of my links but not sure how to do it? <a href="../../availability/default.aspx?propid=' + myvariable + '">Link</a> Any ideas? Thanks Jamie ...

change <a> target to "_blank" depending on href

I'm trying to sort through the links on my page and make some of them open into a new window, depending on their URL. This is the code I have. It doesn't seem to be working. Can you see why? function MakeMenuLinksOpenInNewWindow() { var links = document.getElementsByTagName("a"); for (var i = 0; i < links.length; i++) { ...

get the href of one link and put it in the href of another link

I'm trying to grab the href of one of my links and clone/copy that to the href of another link Here's what i'm trying var link = $('.topbook'); var link2 = $('.sidelink'); var hrefOrig = link2.href; link.href = hrefOrig; Thanks Jamie UPDATE Here's is what I'm trying to get <a href="default.aspx?propid=BAR...

PHP Replace Variables in URL

Hello, I wondered if it was possible to rewrite a URL so designed for the rewrite wrote in htaccess e.g. I have the URL: http://example.com/page.php?page=5&amp;action=something But I want to change the URL to: example.co m/page/5/something This is just for the href, the htaccess bit is solved. ...

Link to download image instead of view image

I need to provide website visitors a link to download an original high resolution image. If I simply link to the image with a href="image.jpg", the browser displays the image. How do I make the browser download it? I'm using amazon S3 to server these images... If this requires having a special header set on the image, I'm sure it's po...

jquery - disable anchor "jump" when loading a page..

Hi I think this may not be possible, will try and explain as best as I can. I have a page containing tabs (jquery powered), controlled by the following: I'm using this code, as provided by another user from a previous question. <script type="text/javascript"> $(function() { $('html, body').animate({scrollTop:0}); // this is ...

code for back button

hi i have a php code here and i would like to create a "back" href to get me back where I was before. <input type="submit" <a href="#" onclick="history.back();">"Back"</a> <html> <head></head> <body> <?php // get form selection $day = $_GET['day']; // check value and select appropriate item i...

FancyBox close from within iframe and take parent page to the link

I found applying the following function to a links onclose works to close Fancybox from within an iFrame: parent.$.fancybox.close(); I want to take this further and have the link take the parent page to a new url. I've tried the following but it doesn't work: <a onclick="location.href='http://www.domain.com/page/';parent.$.fancybox.cl...

Jquery: Select full href with a 'contains' method.

Hi to all, Is it possible using jQuery to select one full link which href contains another variable? My code is: var element1 = $(".not-viewed").parents('li').attr("id"); var element2 = $(".videoTitle").attr("href"); Where i need to select a full link that contains 'element1',because there several videos in the page.In my code sele...

Why the hash part of the URL is not in the server side?

For example if I type in the URL: http://www.foo.com/page.php?parameter=kickme#MOREURL In the server isn't the part: #MOREURL Is possible to send or get these part to the server without jQuery AJAX?. Thanks ...

page jumping around on click after javascript execution

I have a javascript (jquery) snippet that is link to a href="#" to toggle the click.. everything is fine exept when i click around the page is going back all scrooled up... i prefer the page to stay where it is... return false done nothing... here is the code : <script type="text/javascript"> jQuery(document).ready(function(){ jQu...

Invoking the HREF attribute of a link with javascript using javascript!!!!

I never seen this before but you can invoke the HREF attribute of a link using javascript if the HREF contains javascript:;//code......; On my example below click on both links. they do the same thing even though they have different javascript in the HREF. for example: <script type="text/javascript"> function clickme(...

Jquery refuses to select an element using the correct syntax

Hi i wanted to remove a link and i got this code $(document).ready(function(){ $(".features-list a").removeAttr("href"); And is not selecting the element <ul class="features-list"> <li id="f1"><a href="http://www.somepage.com"Link that stops being a link</a></li> </ul> I added the id to try and see if i could do this $(".feature...

how to exchange variables between two html pages

I have two html pages example1.html and example2.html, how will i pass variables from example1.html to example2.html using query string and retreive that variable in example2.html without using any serverside code ...

How do i pass a javascript variable in querystring from one html page to other

I have two html pages example1.html and example2.html ,how can i pass a javascript variable username from example1.html to example2.html in querystring. <script type="text/javascript" > $(document).ready(function() { $('#SubmitForm').submit(function() { var username = ($("#username").val()); .........