Search Results

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

Page 109/260 | < Previous Page | 105 106 107 108 109 110 111 112 113 114 115 116  | Next Page >

  • How can i maintain last cookie value in flex with jsp?

    - by praveen
    Hi All, my login form in flex when I login I have created a cookie in jsp like this name setValueCookie.jsp <%@ page language="java" import="java.util.* , javax.net.*" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <% String username = request.getParameter("value"); System.out.println("Email got in cookieSet = " + username); if(username==null) username=""; Date now = new Date(); String timestamp = now.toString(); Cookie cookie = new Cookie("username",username); cookie.setMaxAge(365 * 24 * 60 * 60); response.addCookie(cookie); %> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>DashBoard-Cookie</title> </head> <body> </body> </html> now using Http service request parameter i am passing username 'Value' to this jsp. and i am reading cookie value from getValueCookie.jsp like this <% String cookieName = "username"; Cookie cookies [] = request.getCookies (); Cookie myCookie = null; String result; if (cookies != null) { for (int i = 0; i < cookies.length; i++) { if (cookies [i].getName().equals (cookieName)) { myCookie = cookies[i]; break; } } } %> <data> <status><%=myCookie.getValue().toString()%></status> </data> through the httpservice value i am getting but if i open a new window or any new tab cookie value is not getting how can i solve this? Thanks in advance.

    Read the article

  • Looping through array in PHP to post several multipart form-data

    - by Léon Pelletier
    I'm trying in an asp web application to code a function that would loop through a list of files in a multiple upload form and send them one by one. Is this something that can be done in ASP? Because I've read some posts about how to attach several files together, but saw nothing about looping through the files. I can easily imagine it in C# via HttpWebRequest or with socket, but in php, I guess there are already function designed to handle it? // This is false/pseudo-code :) for (int index = 0; index < number_of_files; index++) { postfile(file[index]); } And in each iteration, it should send a multipart form-data POST. postfile(TheFileInfos) should make a POST like it: POST /afs.aspx?fn=upload HTTP/1.1 [Header stuff] Content-Type: multipart/form-data; boundary=----------Ef1Ef1cH2Ij5GI3ae0gL6KM7GI3GI3 [Header stuff] ------------Ef1Ef1cH2Ij5GI3ae0gL6KM7GI3GI3 Content-Disposition: form-data; name="Filename" myimage1.png ------------Ef1Ef1cH2Ij5GI3ae0gL6KM7GI3GI3 Content-Disposition: form-data; name="fileid" 58e21ede4ead43a5201206101806420000007667212251 ------------Ef1Ef1cH2Ij5GI3ae0gL6KM7GI3GI3 Content-Disposition: form-data; name="Filedata"; filename="myimage1.png" Content-Type: application/octet-stream [Octet Stream] [Edit] I'll try it: <html> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body> <form name="form1" enctype="multipart/form-data" method="post" action="processFiles.php"> <p> <? // start of dynamic form $uploadNeed = $_POST['uploadNeed']; for($x=0;$x<$uploadNeed;$x++){ ?> <input name="uploadFile<? echo $x;?>" type="file" id="uploadFile<? echo $x;?>"> </p> <? // end of for loop } ?> <p><input name="uploadNeed" type="hidden" value="<? echo $uploadNeed;?>"> <input type="submit" name="Submit" value="Submit"> </p> </form> </body> </html>

    Read the article

  • HTML Aligning Text

    - by nevillejones
    I want to display text on a page like in the following way: My Text: Text Here My Text: More Text Here......................................................... Text from line above continued here. I have the following markup just to test: <html> <head> <style type="text/css"> body { font-family: arial; } form div { padding: 3px; } form .label { float: left; text-align: right; width: 150px; margin-right: 8px; } </style> </head> <body> <form> <div class="label">My Text:</div> <div>Aenean tellus diam, pharetra sed posuere sed, ullamcorper eget enim. Suspendisse quis posuere nisi. Integer sodales neque id erat luctus suscipit. Curabitur in nisi arcu. Curabitur suscipit tellus non lectus blandit non mollis risus aliquet. Proin et felis nulla. Integer ut felis nibh, eu condimentum elit. Sed tincidunt fermentum lorem, convallis ornare ipsum mattis sed. Vestibulum vel quam sed velit condimentum volutpat eu sed enim. Duis tincidunt, turpis id suscipit molestie, erat tortor tincidunt augue, eu venenatis erat neque nec nisi. Nunc malesuada bibendum elit eu bibendum.</div> <div class="label">My Text 2:</div> <div>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla suscipit arcu ut risus dapibus tincidunt et ut orci. Vestibulum vitae urna in ligula fringilla facilisis aliquet vel nisl. Quisque placerat risus eget arcu fermentum at consectetur arcu lobortis. In hac habitasse platea dictumst. In in libero non justo pellentesque cursus quis non nisi. Donec sit amet pharetra ipsum. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Nulla enim enim, fringilla vitae sodales id, ultrices non lacus. Etiam id augue ut dui convallis hendrerit. Vivamus urna justo, dignissim in suscipit eu, facilisis a libero. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. .</div> </form> </body> When this is rendered about half the text is displayed underneath the corresponding "label" class div. I would like all the text to be appear to the right of the "label" div.

    Read the article

  • Eclipse BIRT - XHTML output

    - by Etienne
    Is there a way to set BIRT to output a report as XHTML (1.0 Transitional would be fine) instead of HTML? I did a few tests and there are some elements that are not valid:head does not include a title, html must have a namespace (xmlns) attribute Is this functionality supported at all by BIRT?

    Read the article

  • Setting background-image with javascript

    - by Mattoe3k
    In chrome, safari, and opera setting the background image to an absolute reference such as: "/images/image.png" changes it to "http://sitepath/images/image.png". It does not do this in firefox. Is there any way to avoid this behavior, or is it written into the browser's javascript engine? Using jquery to set the background-image also does this problem. The problem is that I am posting the HTML to a php script that needs the urls in this specific format. I know that setting the image path relative fixes this, but I can't do that. The only other alternative would be to use a regexp. to convert the urls. Thanks. Test this in firefox, and chrome / webkit browser: <!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> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> </head> <body> <div style="height:400px;width:400px;background-image:url(/images/images/logo.gif);"> </div> <br /> <br /> <div id="test" style="height:400px;width:400px;"> </div> <script type="text/javascript" src="/javascripts/jquery.js"></script> <script type="text/javascript"> $(document).ready(function(){ $("#test").css('background-image',"url(/images/images/logo.gif)"); alert(document.getElementById('test').style.backgroundImage); }); </script> </body> </html>

    Read the article

  • Cannot delete a remote branch created unintentionally

    - by Himel
    $ git branch -a * SocialAct master remotes/origin/HEAD -> origin/master remotes/origin/SocialAct remotes/origin/social I want to delete the remote branch "remotes/origin/social", and applied folloing command: $ git branch -d -r origin/social Deleted remote branch origin/social (was 26f6f61). But I have no idea how to bring these changes remotely so that the branches are deleted from origin and everyone can see the changes. I tried git push but that does not work Any help.

    Read the article

  • MooTools request fails

    - by acoder
    Hi everyone, I am trying to achieve this task using MooTools. Description: I have three buttons. Two buttons outside myDiv and one button inside myDiv. A click on any of these buttons initiates an AJAX request (passing button variable to "button.php") and updates myDiv content based on the response text. So, after update, myDiv shows Button3 link + a message showing which button has been clicked. The problem: Everything seems to work fine but after several clicks, it happens that myDiv shows loader.gif image and stops. After this, if I wait a few moments, the browser sometimes stops working (gets blocked). I noticed this problem with IE6. Does anyone know what does this problem mean and how it can be avoided? index.html <html> <head> <script type="text/javascript" src="mootools/mootools-1.2.4-core-nc.js"></script> <script type="text/javascript" src="mootools/mootools-1.2.4.4-more.js"></script> <script type="text/javascript"> window.addEvent('domready', function() { $("myPage").addEvent("click:relay(a)", function(e) { e.stop(); var myRequest = new Request({ method: 'post', url: 'button.php', data: { button : this.get('id'), test : 'test' }, onRequest: function() { $('myDiv').innerHTML = '<img src="images/loader.gif" />'; }, onComplete: function(response) { $('myDiv').innerHTML = response; } }); myRequest.send(); }); }); </script> </head> <body> <div id="myPage"> <a href="#" id="button1">Button1</a> <a href="#" id="button2">Button2</a> <div id="myDiv"> <a href="#" id="button3">Button3</a> </div> </div> </body> </html> button.php <a href="#" id="button3"Button3</a> <br><br> <?php echo 'You clicked ['.$_REQUEST['button'].']'; ?>

    Read the article

  • json null error help in php

    - by bobby
    I get 'json is null' as error My php file: <?php if (isset($_REQUEST['query'])) { $query = $_REQUEST['query']; $url='https://www.googleapis.com/urlshortener/v1/'; $key='ApiKey'; $result= $url.($query).$key; $ch = curl_init($result); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,1); $resp = curl_exec($ch); curl_close($ch); echo $resp; } ?> My html: <html> <head> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ // when the user clicks the button $("button").click(function(){ $.getJSON("shortner.php?query="+$('#query').attr("value"),function(json){ $('#results').append('<p>Id : ' + json.id+ '</p>'); $('#results').append('<p>Longurl: ' + json.longurl+ '</p>'); }); }); }); </script> </head> <body> <input type="text" value="Enter a place" id="query" /><button>Get Coordinates</button> <div id="results"></div> Edited : <?php if (isset($_REQUEST['query'])) { $query = $_REQUEST['query']; $url='https://www.googleapis.com/urlshortener/v1/'; $key='Api'; $key2='?key='; $result= $url.$query.$key2.$key; $requestData= json_encode($result); echo var_dump($query); $ch = curl_init($requestData); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,1); $resp = curl_exec($ch); curl_close($ch); echo $resp; } ?>

    Read the article

  • Unexpected space between DIV elements

    - by jon
    my code for the php page displaying the divs <?php session_start(); require_once("classlib/mainspace.php"); if (isset($_SESSION['username'])==FALSE) { header("location:login.php"); } $user = new User($_SESSION['username']); ?><!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> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="style/style.css" /> <title>SimpleTask - Home</title> </head> <body> <div id="main"> <div id="menu"> <div id="items"> <ul> <li><a href="home.php">home</a></li> <li>&bull;</li> <li><a href="projects.php">my projects</a></li> <li>&bull;</li> <li><a href="comments.php">my comments</a></li> </ul> </div> <div id="user"> <p>Welcome, <?php echo $user->GetRealName(); ?><br/><a href="editprofile.php">edit profile</a> &bull; <a href="logout.php">logout</a></p> </div> </div> <div id="content"> <h1>HOME</h1> </div> <div id="footer"> <p>footer text goes here here here here</p> </div> </div> </body> </html> and you can find my CSS here http://tasker.efficaxdevelopment.com/style/style.css and to view the live page go here http://tasker.efficaxdevelopment.com/login.php username:admin password:password

    Read the article

  • Add class to elements which already have a class

    - by bwstud
    I have a group of divs which I'm dynamically generating when a button is clicked with the class, "brick". This gives them dimension and starting position of top: 0. I'm trying to get them to animate to the bottom of the view using a css transition with a second class assignment which gives them a bottom position: 0;. Can't figure out the syntax for adding a second class to elements with a pre-existing class. On inspection they only show the original class of, "brick". HTML <!DOCTYPE html> <html> <head> <script src="http://code.jquery.com/jquery-2.1.0.min.js"></script> <meta charset="utf-8"> <title>JS Bin</title> </head> <body> <div id="container"> <div id="button" >Click Me</div> </div> </body> </html> CSS #container { width: 100%; height: 100vh; padding: 10vmax; } #button { position: fixed; } .brick { position: relative; top: 0; height: 10vmax; width: 20vmax; background: white; margin: 0; padding: 0; transition: all 1s; } .drop { transition: all 1s; bottom 0; } The offending JS: var brickCount = function() { var count = prompt("How many boxes you lookin' for?"); for(var i=0; i < count; i++) { var newBrick = document.createElement("div"); newBrick.className="brick"; document.querySelector("#container") .appendChild(newBrick); } }; var getBricks = function(){ document.getElementByClass("brick"); }; var changeColor = function(){ getBricks.style.backgroundColor = '#'+Math.floor(Math.random()*16777215).toString(16); }; var addDrop = function() { getBricks.brick = "getBricks.brick" + " drop"; }; var multiple = function() { brickCount(); getBricks(); changeColor(); addDrop(); }; document.getElementById("button").onclick = function() {multiple();}; Thanks!

    Read the article

  • javascript div movement not working

    - by William
    For some reason I can't move this div at all. Can anyone help me out with why this won't work? <!DOCTYPE html> <html lang="en"> <head> <title>Move Div Test</title> <meta charset="utf-8" /> <link href="/bms/style.css" rel="stylesheet" /> <style> body { text-align: center; background-color: #ffffff;} #box { position: absolute; left: 610px; top: 80px; height: 50px; width: 50px; background-color: #ff0000;} </style> <script type="text/javascript"> document.onkeydown=function(event){keyDown(event)}; document.onkeyup=function(event){keyUp(event)}; var box = document.getElementById('box'); var speed = 5; var keys = new Array(256); var i = 0; for (i = 0;i <= 256; i++){ keys[i] = false; } function keyDown(event){ if(!event){ //for IE event = window.event; } keys[event.keyCode] = true; } function keyUp(event){ if(!event){ //for IE event = window.event; } keys[event.keyCode] = false; } function update(){ if(keys[37]) box.style.left = parseInt(box.style.left) - speed + "px"; if(keys[39]) box.style.left = parseInt(box.style.left) + speed + "px"; if(keys[38]) box.style.top = parseInt(box.style.top) - speed + "px"; if(keys[40]) box.style.top = parseInt(box.style.top) + speed + "px"; } setInterval('update();', 1000/60); </script> </head> <body> <div id="box">blah</div> </body> </html>

    Read the article

  • jQuery multiple class selection

    - by morpheous
    I am a bit confused with this: I have a page with a set of buttons (i.e. elements with class attribute 'button'. The buttons belong to one of two classes (grp1 and grp2). These are my requirements For buttons with class enabled, when the mouse hovers over them, a 'button-hover' class is added to them (i.e. the element the mouse is hovering over). Otherwise, the hover event is ignored When one of the buttons with class grp2 is clicked on (it has to be 'enabled' first), then I disable (i.e. remove the 'enabled' class for all elements with class 'enabled' (should probably selecting for elements with class 'button' AND 'enabled' - but I am having enough problems as it is, so I need to keep things simple for now). This is what my page looks like: <html> <head> <title>Demo</title> <style type="text/css" .button {border: 1px solid gray; color: gray} .enabled {border: 1px solid red; color: red} .button-hover {background-color: blue; } </style> <script type="text/javascript" src="jquery.js"></script> </head> <body> <div class="btn-cntnr"> <span class="grp1 button enabled">button 1</span> <span class="grp2 button enabled">button 2</span> <span class="grp2 button enabled">button 3</span> <span class="grp2 button enabled">button 4</span> </div> <script type="text/javascript"> /* <![CDATA[ */ $(document).ready(function(){ $(".button.enabled").hover(function(){ $(this).toggleClass('button-hover'); }, function() { $(this).toggleClass('button-hover'); }); $('.grp2.enabled').click(function(){ $(".grp2").removeClass('enabled');} }); /* ]]> */ </script> </body> </html> Currently, when a button with class 'grp2' is clicked on, the other elements with class 'grp2' have the 'enabled' class removed (works correctly). HOWEVER, I notice that even though the class no longer have a 'enabled' class, SOMEHOW, the hover behaviour is still applied to these elemets (WRONG). Once an element has been 'disabled', I no longer want it to respond to the hover() event. How may I implement this behavior, and what is wrong with the code above (i.e. why is it not working? (I am still learning jQuery)

    Read the article

  • Jetty servlet respons to Ajax always empty

    - by chris
    Hi I try to run a java server on Jetty which should respond to an ajax call. Unfortunately the response seems to be empty when I call it with ajax. When I call http://localhost:8081/?id=something I get an answer. The Java Server: public class Answer extends AbstractHandler { public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { String id = request.getParameter("id"); response.setContentType("text/xml"); response.setHeader("Cache-Control", "no-cache"); response.setContentLength(19+id.length()); response.setStatus(HttpServletResponse.SC_OK); response.getWriter().write("<message>"+id+"</message>"); //response.setContentType("text/html;charset=utf-8"); response.flushBuffer(); baseRequest.setHandled(true); } public static void main(String[] args) throws Exception { Server server = new Server(8081); server.setHandler(new Answer()); server.start(); server.join(); } } The js and html: <html> <head> <script> var req; function validate() { var idField = document.getElementById("userid"); var url = "validate?id=" + encodeURIComponent(idField.value); if (typeof XMLHttpRequest != "undefined") { req = new XMLHttpRequest(); } else if (window.ActiveXObject) { req = new ActiveXObject("Microsoft.XMLHTTP"); } req.open("GET", "http://localhost:8081?id=fd", true); req.onreadystatechange = callback; req.send(null); } function callback() { if (req.readyState == 4) { if (req.status == 200) { var message = req.responseXML.getElementsByTagName("message")[0]; document.getElementById("userid").innerHTML = "message.childNodes[0].nodeValue"; } } } </script> </head> <body onload="validate('foobar')"> <div id="userid">hannak</div> </body> </html> I'm actually don't know what I'm doing wrong here. Maybe someone has a good idea. greetings chris

    Read the article

  • Connect to mercurial via ssh on windows

    - by richzilla
    Can anyone point me in the direction of a simple step by step guide as to how to connect to a mercurial repo via ssh on windows. Im really struggling to get my head around it, and so far i jus keep getting a string of errors. Any help would be appreciated.

    Read the article

  • connection string through tcp/ip

    - by sreenath sreenath
    I had an issue can you suggest some idea , I remember we spoke aboutsomething around this issue Iam in head office Dubai I had developed my winform application with sql server here in my office .... Now its time for deployment but what the issue is before implementation it should be tested by the clients in Kenya.I cannot hold the expense of traveling to Kenya and setting up the server there i TRIED OF TEAMWEAVER bUT IT S HARD TO GO WITH IT , Is ther any idea for sharing my application via internet?? moreover like connection string through internet/tcp/ip

    Read the article

  • boostrap 3.1.1 navbar - toggle button does not appear on page

    - by PST
    I am trying to use bootstrap nav bar with toggle functionality. With sample code as below, my page is not showing toggle button on the header bar. NavHeader (NavBarMenuCaption) and 1st menu item appears on the same line. Bootply link http://www.bootply.com/123050# what could be wrong in below code? <!DOCTYPE html> <html> <head> <title>Bootstap menu demo</title> <link rel="stylesheet" href="vendor/bootstrap-3.1.1-dist/css/bootstrap.min.css"> </head> <body> <h2>This is bootstap navbar demo</h2> <nav class="navbar navbar-default"> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#example-navbar-collapse"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar">-</span> <span class="icon-bar">-</span> <span class="icon-bar">-</span> </button> <a class="navbar-brand" href="#">NavBarMenuCaption</a> </div> <div class="navbar-collapse collapse" id="example-navbar-collapse"> <ul class="nav nav-pills nav-stacked"> <li ><a href="#">Home</a></li> <li class="active"><a href="#">About</a></li> <li><a href="#">Products</a></li> <li><a href="#">Contact</a></li> </ul> </div> </nav> <script type="text/javascript" src="vendor/jquery-2.1.0/jquery-2.1.0.min.js"></script> <script type="text/javascript" src="vendor/bootstrap-3.1.1-dist/js/bootstrap.min.js"></script> </body>

    Read the article

  • Why jQuery selector can't work but getElementById works in this scenario?

    - by Stallman
    Here is the HTML: <html> <head> <script type="text/javascript" src="jquery-1.7.2.min.js"></script> <script type="text/javascript" charset="utf-8" src="jquery-1.7.2.js"></script> <script type="text/javascript" src="access.js"></script> </head> <body> <button id="trigger"></button> <img id= "testElement" style= "position: absolute; border-color: white; top:340px; left:615px;" width="34px" height= "34px" /> </body> </html> And the access.js file is: $(document).ready( function(){ $('#trigger').click(function(){ $('#testElement').src="success.png"; //THIS WON'T WORK. document.getElementById('testElement').src= "success.png"; //BUT THIS WORKS. }); }); I know that if I use $, the return object is a jQuery object. It's not the same as getElementById. But why the jQuery selector can't work here? I need the jQuery object to make more operations like "append/style"... Thanks. UPDATE Too much correct answers appear at almost the same time... Please give more explanations to let me decide who I should give the credit, thanks!!! Sorry for my poor understanding of your correct answer... I just want more detail. Are all the attribute nodes(src/width/height...) not the property of jQuery object? So does the jQuery selector only select DOM Element Node like ? Thank you! 3. List item

    Read the article

  • How to create a hover effect in a newsletter?

    - by Moak
    I'm creating a newsletter, and i want to have panels that change background-color on mouse over. Seeing as the newsletter wont have a head, I am defining all styles inline. I'm pretty sure most popular mail clients will block JS. So I was wondering if I can define a hover effect in the style attribute. Or is there any other solution to achieve this effect? Peace

    Read the article

< Previous Page | 105 106 107 108 109 110 111 112 113 114 115 116  | Next Page >