Search Results

Search found 6478 results on 260 pages for 'hippy head'.

Page 74/260 | < Previous Page | 70 71 72 73 74 75 76 77 78 79 80 81  | Next Page >

  • (JQuery) How to call a custom function before following link

    - by morpheous
    I want to achieve the following behavior in a page link. When the link is clicked, I want to: First, send (POST) some data back to the server Second, allow the browser to navigate to the url that the link was pointing to. I am relatively new to JQuery, and here is my first attempt below. I will be grateful to any jQuery gurus in here to fillin the blanks (and maybe point out how the snippet below may be improved). <html> <head>test page</head> <body> <div><a id="hotlink" href="http://www.example.com">Clik and see</a></div> </body> <script type="text/javascript"> $(document).ready(function(){ $('hotlink').click(function(){ //AJAX Post data here ... //follow the link url (i.e. navigate/browse to the link) ... }); }); </script> </html>

    Read the article

  • Padding between images doesn't pad

    - by ripper234
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <style type="text/css"> #action-icons { float:right; } #action-icons.img { position:relative; top:-30px; padding-right:200px; } </style> </head> <body> <h1 class="edit">Some nifty title <span id="action-icons"> <img src="foo.png" width="64" height="64" alt="" id="newsticky"/> <img src="bar.png" width="60" height="60" alt="" id="trash"/> </span> </h1> </body> </html>

    Read the article

  • How to fill in form field, and submit, using javascript?

    - by cannyboy
    If I have an html document whose rough structure is <html> <head> </head> <body class="bodyclass" id="bodyid"> <div class="headerstuff">..stuff...</div> <div class = "body"> <form action="http://example.com/login" id="login_form" method="post"> <div class="form_section">You can login here</div> <div class="form_section"> <input xmlns="http://www.w3.org/1999/xhtml" class="text" id="username" name="session[username_or_email]" tabindex="1" type="text" value="" /> </div> <div class="form_section">etc</div> <div xmlns="http://www.w3.org/1999/xhtml" class="buttons"> <button type="submit" class="" name="" id="go" tabindex="3">Go</button> <button type="submit" class="" name="cancel" id="cancel" tabindex="4">Cancel</button> </div> </form> </div> </body> </html> You can see that there is a username field and a Go button. How would I, using Javascript, fill in the username and press Go...? I would prefer to use plain JS, rather than a library like jquery.

    Read the article

  • Return HTML from a user selection

    - by Cruinh
    I have the following, very simple html page... <html> <head> <script type="text/javascript"> function alertSelection() { var selection = window.getSelection(); var txt = selection.toString(); alert(txt); } </script> </head> <body> This is <span style="background-color:black;color:white">the</span> text. <div style="background-color:green;width:30px;height:30px;margin:30px" onmouseover="alertSelection()"> </body> </html> When I select the entire first line and mouseover the square, I get an alert with "This is the text.". How would I fix this so the the span tag or any other selected HTML isn't stripped out of the alert message?

    Read the article

  • Picture lead-in to Youtube video

    - by cf_PhillipSenn
    I have the following, which displays an image and when the user clicks on the image, it takes them to the Youtube video: <html> <head> <script src="http://www.google.com/jsapi"></script> <script type="text/javascript"> google.load("jquery", "1", {uncompressed: true}); </script> <script> jQuery(function($){ $('a').click(function() { $(this).html('<object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/Msef24JErmU&hl=en_US&fs=1&rel=0&color1=0x2b405b&color2=0x6b8ab6"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/Msef24JErmU&hl=en_US&fs=1&rel=0&color1=0x2b405b&color2=0x6b8ab6" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object>'); return false; }); }); </script> </head> <body> <a href="javascript:void();"><img src="http://www.clipov.net/pic/paul_oakenfold+%5Bstarry_eyed_surprise%5D+_+3-07+mtv_dance_beats+clear.jpg"></a> </body> </html> Q: How do I autoplay the video to keep the user from having to click on it (a second time)?

    Read the article

  • Vertically And Horizonatally center main wrap div

    - by Hello you all men
    Now i try <html> <head> <title>?????????????????</title> <style type="text/css"> body { margin-left: auto; margin-right:auto; } #wrap { background: black; margin-left: auto; margin-right:auto; height:450px; width:450px; position:absolute; top:50%; right:50%; left:50%; margin-top:-225px; } </style> </head> <body> <div id="wrap"> Hello </div> </body> </html> ?????

    Read the article

  • Make a div content (googlemap) fullscreen

    - by lena2211
    Hi iam trying to make a button that will turn the googlemap div into fullscreen.. this is what i have untill now, but it is not working correctly .. problem is: the map will only half loaded the code is below, and a screenshot how can i repair this? where is the problem? thanks in advance http://img32.imageshack.us/img32/9365/halfload.gif <html> <head> <meta name="viewport" content="initial-scale=1.0, user-scalable=no" /> <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script> <script type="text/javascript"> function initialize() { var latlng = new google.maps.LatLng(-34.397, 150.644); var myOptions = { zoom: 8, center: latlng, mapTypeId: google.maps.MapTypeId.ROADMAP }; var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); } function fs() { var elem = document.getElementById("map_canvas"); elem.style.position="absolute"; elem.style.width="100%"; elem.style.height="100%"; elem.style.top="0px"; document.body.style.overflow = "hidden"; } </script> </head> <body onload="initialize()"> <div id="map_canvas" style="width:400px; height:300px"></div> <a href="#" onclick ="fs()">makefullscreen</a> </body> </html>

    Read the article

  • Do I need to echo html inside included php file

    - by UmeRonaldo
    I just learned how to include php .Here's the index or main php file <!DOCTYPE HTML> <html> <head> </head> <body> <?php include 'header.php'; ?> </body> </html> now in header.php file which way is better to print html Way 1 directly use html without php <header> <h1>Header</h1> </header> Way 2 Using php and echo <?php echo ' <header> <h1>Header</h1> </header> ' ?> Another quick question. Will it work if I use .html for the base or index file ?? sorry for my bad english

    Read the article

  • Jquery ajax load not working

    - by Slay
    This is my code: test.html <html> <head> <title>test</title> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> <script> $(document).ready(function(){ $(window).bind('hashchange', function(){ $('#result').load('test2.html', function(){ alert('Load was performed.'); }); }); }); </script> </head> <body> <a href="#Test1">Test 1</a> <a href="#Test2">Test 2</a> <div id="result"></div> </body> </html> test2.html <h3>This is content from test2.html</h3> I want to detect the specific page to load using window.hash in change. For instance if user go to http://localhost/test.html#test2 The main container(result) in the page will do an ajax load call to test2.html to get the content. I can't manage to get this simple code working. Appreciate if someone can guide me in the right direction. Thanks.

    Read the article

  • How to store a captured image into MySQL database using JavaScript

    - by R J.
    I am capturing image using canvas and i want to store a captured image in MySQL Database using Javascript. This is my code: <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, maximum-scale=1.0"> <style> body {width: 100%;} canvas {display: none;} </style> <title>Instant Camera - Remote</title> <script> var video, canvas, msg; var load = function () { video = document.getElementById('video'); canvas = document.getElementById('canvas'); msg = document.getElementById('error'); if( navigator.getUserMedia ) { video.onclick = function () { var context = canvas.getContext("2d"); context.drawImage(video, 0, 0, 240, 320); var image1 = canvas.toDataURL("image/png"); document.write('<img src="' + image1 + '" />'); }; } else { msg.innerHTML = "Native web camera not supported :("; } }; window.addEventListener('DOMContentLoaded', load, false); </script> </head> <body> <video id="video" width="240" height="320" autoplay> </video> <p id="error">Click on the video to send a snapshot to the receiving screen</p> <canvas id="canvas" width="240" height="320"> </canvas> </body> </html>

    Read the article

  • jquery to toggle a label

    - by Juan Almonte
    How can I get the label to toggle show/hide? Below is my code and currently it is also displaying show. I would like it to toggle from show to hide and from hide back to show. when show is displayed the div will be hidden but when show is clicked the label will switch to hide and the div will be displayed and when hide is clicked the label will go back to show and the div will be hidden <html> <head> <title>jQuery test page</title> <script type="text/javascript" src="../scripts/jquery-1.4.2.js"></script> <script type="text/javascript"> $(document).ready(function() { $("#clickMe").click(function() { $("#textBox").toggle(); }); }); </script> </head> <body> <label id="clickMe">Show</label> <br /> <div id="textBox" style="display: none">This text will be toggled</div> </body> </html>

    Read the article

  • Two Overlapping divisions, but upper one is unscrollable

    - by FREAKENGINEER
    I have two divisions in my html page with their respective css <html> <head> #lowerone {position:absolute; bottom:25px; right:25px; height:300px; width:300px;} #upperone {position:absolute; bottom:25px; right:25px; height:300px; width:300px; overflow:scroll;} </head> <body> <div id="lowerone"> </div> <div id="upperone"> <img src="/bg.3.jpg" /> </div> </body> </html> But the upper div i.e. the UPPERONE is unscrollabe.. How to make it scrollable?

    Read the article

  • Facebook FB.Event.subscribe does not work

    - by DNReNTi
    I'd like to follow how many likes I get on my page, but something is wrong. I am using the Facebook javascript event handler but it doesnt work. It should alerts me when I click on the like or on the dislike button but it does not do anything. Any idea where I am wrong? Thanks! And sorry for my english. Here is my UPDATED code: <!DOCTYPE html> <html xmlns:fb="http://ogp.me/ns/fb#"> <head> <title>FBlike check</title> </head> <body> <div id="fb-root"></div> <script> (function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=00000000000000000"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk')); FB.Event.subscribe('edge.create', function(response) { alert('You liked the URL: ' + response); } ); </script> <fb:like href="https://www.facebook.com/XYZ" send="false" layout="button_count" width="200" show_faces="false"></fb:like> </body> </html>

    Read the article

  • need help speeding up tag cloud filter for IE

    - by rod
    Hi All, Any ideas on how to speed this up in IE (performs decent in Firefox, but almost unusable in IE). Basically, it's a tag cloud with a filter text box to filter the cloud. <html> <head> <script type="text/javascript" src="jquery-1.3.2.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ $('#tagFilter').keyup(function(e) { if (e.keyCode==8) { $('#cloudDiv > span').show(); } $('#cloudDiv > span').not('span:contains(' + $(this).val() + ')').hide(); }); }); </script> </head> <body> <input type="text" id="tagFilter" /> <div id="cloudDiv" style="height: 200px; width: 400px; overflow: auto;"> <script type="text/javascript"> for (i=0;i<=1300;i++) { document.write('<span><a href="#">Test ' + i + '</a>&nbsp;</span>'); } </script> </div> </body> </html> thanks, rodchar

    Read the article

  • simple jQuery script not running

    - by romaer
    I just have copied a simple script from W3School and cannot get it running: Here it is: <!DOCTYPE html> <html> <head> <script type="text/javascript" src="http://Web Testing/js/jquery-1.8.0.min.js"> </script> <script> $(document).ready(function(){ $("p").click(function(){ $(this).hide(); }); }); </script> </head> <body> <p>If you click on me, I will disappear.</p> <p>Click me away!</p> <p>Click me too!</p> </body> </html> It works on their Tryit Editor with the following line but does not work even with this line on my Mac under BBEdit

    Read the article

  • How can I embed a XML document inside a XHTML document?

    - by Oriol
    For example, how can I embed <?xml version="1.0" encoding="utf-8"?> <root> <node><![CDATA[Text]]></node> </root> in my XHTML? I know I can put it in a CDATA section... <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> <title>My title</title> </head> <body> <p>I am a XHTML paragraph!</p> <div> <![CDATA[ <?xml version="1.0" encoding="utf-8"?> <root> <node>Text</node> </root> ]]> </div> </body> </html> ... but then I have to remove XML file's CDATA sections and the XML is parsed as text instead of XML. Then, I get this... ... but I want something like this:

    Read the article

  • jQuery: serializing array returns empty string

    - by John Smith
    I did not forget to add name attributes as is a common problem and yet my serialized form is returning an empty string. What am I doing wrong? HTML/javascript: <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script> <script> $( document ).ready( function() { $('#word_form').submit(function(e) { e.preventDefault(); console.log($(this).serialize()); //returns an empty string }); }); </script> </head> <body> <div id="wrapper"> <form name="word_form" id="word_form" method="POST"> <input type="image" name="thumbsUp" id="thumb1" value="1" src="http://upload.wikimedia.org/wikipedia/commons/8/87/Symbol_thumbs_up.svg" style="width:50px;height:50px;"> <input type="image" name="thumbsDown" id="thumb2" value="2" src="http://upload.wikimedia.org/wikipedia/commons/8/84/Symbol_thumbs_down.svg" style="width:50px;height:50px;"> </form> </div> </body> Thanks!

    Read the article

  • not a proper naming convention but it's working fine, How and what is need of naming conventions if it works?

    - by Pravallika69
    I'm new to javascript programming. I have found below example while practicing javascript. <html> <head> <script type="text/javascript"> function changeTabIndex() { document.getElementById('1').tabIndex="3" document.getElementById('2').tabIndex="2" document.getElementById('3').tabIndex="1" } </script> </head> <body> <p><a id="1" href="http://www.w3schools.com">1</a></p> <p><a id="2" href="http://www.w3schools.com">2</a></p> <p><a id="3" href="http://www.w3schools.com">3</a></p> <input type="button" onclick="changeTabIndex()" value="Change TabIndex" /> </body> </html> What's my doubt is, naming conventions for id attribute must start with an alphabet followed by numbers and underscore. But in this example even though they used numbers as id's the code working fine.Then what is the need of following naming conventions. It seems to be simple but anyone please clarify it.

    Read the article

  • CSS Style Firefox/Safari/Chrome

    - by patrick
    hi, i have a problem with css differences between browsers. i have a simple input textfield an a submit button. the should be arranged. with webkit (safari/webkit) everything looks fine but firefox doesnt do it. does anyone have an idea whats wrong? i have written a little test html page: <html> <head> <style type="text/css"> #input { background: none repeat scroll 0 0 white; border-color: #DCDCDC; border-style: solid; border-width: 1px 0 1px 1px; font: 13px "Lucida Grande",Arial,Sans-serif; margin: 0; padding: 5px 5px 5px 15px; width: 220px; outline-width: 0; height: 30px; } #submit { background: none repeat scroll 0 0 white; border: 1px solid #DCDCDC; font: 13px "Lucida Grande",Arial,Sans-serif; margin: 0; outline-width: 0; height: 30px; padding: 5px 10px; } </style> </head> <body> <input id="input" type="text" value="" /><input id="submit" type="button" value="Add" /> </body> </html>

    Read the article

  • Problem with jQuery array

    - by user236106
    <html> <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js" type="text/javascript"></script> <script type="text/jscript"> $('document').ready(function (){ var clickNo=0; $('div#pics>img').hide() $('div#pics>input').click(function(event){ $('div#pics>img')[0].show('slow'); }) }); </script> </head> <body> <div id="pics"> <input type="button" value="next" /> <--a bunch of img tags .I had to resort to this comment because the system won't let me include the img tag in the code--> </div> </body> </html> I can't understand why the line $('div#pics>img')[0].show('slow'); is not working.

    Read the article

  • form.has_errors tag not working

    - by John
    Hello, Im using Django 1.2.3. I have login functionality in my site using django.contrib.auth.views.login. The user is able to login after entering correct username and password. But, form.has_errors is not working i.e. if the login credentials entered are incorrect i dont see the error message. My login.html in templates/registration is as follows : <html> <head> <title>Login</title> </head> <body> <h1>User Login</h1> {% if form.has_errors %} <p>Your username and password didn't match. Please try again.</p> {% endif %} <form method="post" action="."> {% csrf_token %} <p><label for="id_username">Username:</label> {{ form.username }}</p> <p><label for="id_password">Password:</label> {{ form.password }}</p> <input type="hidden" name="next" value="/" /> <input type="submit" value="login" /> </form> </body> </html> Any way to fix this problem? Please Help Thank You.

    Read the article

  • Internet Explorer 6 and 7: floated elements expand to 100% width when they contain a child element f

    - by Paul D. Waite
    I've got a parent div floated left, with two child divs that I need to float right. The parent div should (if I understand the spec correctly) be as wide as needed to contain the child divs, and this is how it behaves in Firefox et al. In IE, the parent div expands to 100% width. This seems to be an issue with floated elements that have children floated right. Test page: <!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" lang="en" xml:lang="en"> <head> <title>Float test</title> </head> <body> <div style="border-top:solid 10px #0c0;float:left;"> <div style="border-top:solid 10px #00c;float:right;">Tester 1</div> <div style="border-top:solid 10px #c0c;float:right;">Tester 2</div> </div> </body> </html> Unfortunately I can't fix the width of the child divs, so I can't set a fixed width on the parent. Is there a CSS-only workaround to make the parent div as wide as the child divs?

    Read the article

  • Calling a view from the second project

    - by user3128303
    I have 2 projects in the Solution (asp.net-mvc). The first project is main, the other project (1 simple controller and views (Index, Layout). I want directly from the menu in the project 1, to refer to the Index view of the second project. I added a reference but I do not know what to do. Someone help? Ps: Sorry for my english. Project 1 _Layout.cshtml <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title>@ViewBag.Title</title> <link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" /> <script src="@Url.Content("~/Scripts/jquery-1.5.1.min.js")" type="text/javascript"></script> <script src="@Url.Content("~/Scripts/modernizr-1.7.min.js")" type="text/javascript"></script> </head> <body> <div> <nav> <a href="@Url.Content("~")" id="current">Home</a> <a href="@Url.Content( /* via a link you want to get to the index from Project 2 */)">TEST</a> </nav> </div> <div id="main"> @RenderBody() </div> <div id="footer"> </div> </body> </html> Project 2 HomeController.cs namespace Panel.Controllers { public class HomeController : Controller { public ActionResult Index() { return View(); } } }

    Read the article

  • Highlight active form with CSS?

    - by 2unco
    <!doctype html> <html lang="en"> <head> <meta charset="utf-8"/> <style> form:focus{ background:red; } </style> <title>Home, sweet home</title> </head> <body> <form> <input type="text"/> <input type="submit"/> </form> <form> <input type="text"/> <input type="submit"/> </form> <form> <input type="text"/> <input type="submit"/> </form> </body> </html> This obviously doesn't work, as is why I'm asking the question. How can I get the form which has one if it's inputs as the focus to highlight? That is, I want to be able to apply styles to the active FORM, not the active INPUT - is that doable without JS or something?

    Read the article

  • why won't background change in firefox but it will in ie

    - by rod
    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> <!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"> <head runat="server"> <title></title> <link id="csslink" href="Handler.ashx" rel="stylesheet" type="text/css" /> </head> <body> <form id="form1" runat="server"> <div> <input id="Button1" type="button" value="Blue" /> <input id="Button2" type="button" value="Red" /> </div> </form> <script type="text/javascript"> var pageDefault = { btn1: document.getElementById('Button1'), btn2: document.getElementById('Button2'), csslink: document.getElementById('csslink'), init: function() { this.btn1.onclick = function() { pageDefault.csslink.href = "Handler.ashx?id=1"; } this.btn2.onclick = function() { pageDefault.csslink.href = "Handler.ashx?id=2"; } } } pageDefault.init(); </script> </body> </html> Here's the ashx ProcessRequest public void ProcessRequest(HttpContext context) { context.Response.ContentType = "text/plain"; var id = context.Request.QueryString["id"]; if (id == "1") { context.Response.Write(@" body { background: Blue; } "); } else if (id == "2") { context.Response.Write(@" body { background: Red; } "); } else { } }

    Read the article

< Previous Page | 70 71 72 73 74 75 76 77 78 79 80 81  | Next Page >