Search Results

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

Page 100/260 | < Previous Page | 96 97 98 99 100 101 102 103 104 105 106 107  | Next Page >

  • What is the recommended approach towards multi-tenant databases in MongoDB?

    - by Braintapper
    I'm thinking of creating a multi-tenant app using MongoDB. I don't have any guesses in terms of how many tenants I'd have yet, but I would like to be able to scale into the thousands. I can think of three strategies: All tenants in the same collection, using tenant-specific fields for security 1 Collection per tenant in a single shared DB 1 Database per tenant The voice in my head is suggesting that I go with option 2. Thoughts and implications, anyone?

    Read the article

  • Raphael Scope Drag n drop multiple paper instances

    - by donald
    I have two Raphael paper instances. In both I want to drag and drop an element (circle). It is important for me to assign both these circles the same id. I expected no problem, as both are in different paper instances and therefore in different scope. What happens is, that somehow both elements react, when I have clicked both elements at least once. If I however give these elements different IDs everything works fine (each element only calls its "start", "drag" and "up" function if draged around). Is this intended behaviour of Raphael and do I have to assign different IDs to the elements in the different paper instances? Hopefully not and you can point me to the right direction :-) Thanks a lot for your Help in advance, Here comes the code: <!doctype html> <html> <head> <meta charset="utf-8" /> <title>DragNDrop</title> <script src="raphael-min.js"></script> </head> <body> <h1>Paper1</h1> <div id="divPaper1" style ="height: 150px; width: 300px; border:thin solid red"></div> <h1>Paper2</h1> <div id="divPaper2" style ="height: 150px; width: 300px; border:thin solid red"></div> <script> start1 = function () { console.log("start1"); } drag1 = function () { console.log("move1"); } up1 = function () { console.log("up1"); } start2 = function () { console.log("start2"); } drag2 = function () { console.log("move2"); } up2 = function () { console.log("up2"); } var paper1 = Raphael("divPaper1", "100%", "100%"); var circle1 = paper1.circle(40, 40, 30); circle1.attr("fill", "yellow"); circle1.id = "circle"; //both circles get the same id circle1.drag(drag1, start1, up1); paper2 = Raphael("divPaper2", "100%", "100%"); var circle2 = paper2.circle(40, 40, 30); circle2.attr("fill", "red"); circle2.id = "circle"; //both circles get the same id circle2.drag(drag2, start2, up2); </script> </body>

    Read the article

  • How to stop page refresh when hit enter button from rich:inputNumberSpinner field?

    - by eswaramoorthy-nec
    Hi, I use rich:inputNumberSpinner tag. The problem is : I set cursor focus to inside of rich:inputNumberSpinner field, then i hit the enter button from my keyboard, that time page will be automatically refresh. But i don't need page refresh when i hit the enter button from my keyboard. The code : spinnerTagTest.jsp <%@page contentType="text/html" pageEncoding="UTF-8"%> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %> <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> <%@ taglib uri="http://richfaces.org/a4j" prefix="a4j" %> <%@ taglib uri="http://richfaces.org/rich" prefix="rich"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <f:view> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Spinner Tag Test</title> </head> <body> <h:form id="SpinnerForm"> <rich:panel id="SpinnerPanel"> <h:outputText value="Input Spinner Tag : "/> <rich:inputNumberSpinner id="spinnerField" value="" maxValue="23" inputSize="2"/> </rich:panel> </h:form> </body> I also use rich:hotKey for that inputNumberSpinner field. But Page refreshed. <rich:hotKey key="return" selector="#spinnerField" handler="event.stopPropagation();event.preventDefault(); return false;"/> And i check anotherway using javasccript, but page refreshed. The specific tag and javascript is : <rich:inputNumberSpinner id="spinnerField" value="" maxValue="23" inputSize="2" oninputkeypress="return stopPageRefresh();"/> <script type="text/javascript"> function stopPageRefresh() { return false; } </script> Here i use one alert message inside of stopPageRefresh(). But i hit enter button, first page refreshing and then alert message displayed. Help me about this. Thanks in advance.

    Read the article

  • Jquery Plugins/Autocomplete Special Char problem

    - by Yetkin EREN
    Hi; i use that plugin for autocomplate; docs.jquery.com/Plugins/Autocomplete but i have a problem with spacial chars. if a special char first char of a word, this char has being ignored and if its not first char, chars before that has being ignored. for example: "slk" cant found but if i type "lk" "slk" found and if i type öd "aöd" found. i made a test page; http://www.yetkineren.com/Autocomplete/oto.html and tahts the code thanks.. <html> <head> <meta http-equiv="Content-Language" content="tr"> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-9"> <script src="http://code.jquery.com/jquery-latest.js"></script> <link rel="stylesheet" href="jquery.autocomplete.css" type="text/css" /> <script type="text/javascript" src="encoder.js"></script> <script type="text/javascript" src="Scripts/jquery.bgiframe.min.js"></script> <script type="text/javascript" src="Scripts/jquery.autocomplete.js"></script> <script> $(document).ready(function(){ var gata=[ {"text": '21.png resmi aöd', "value": '21.png'}, {"text": '21.png resmi cöd', "value": '21.png'}, {"text": '21.png resmi acd', "value": '21.png'}, {"text": '21.png resmi aéd', "value": '21.png'}, {"text": '42.png resmi ésd', "value": '42.png'}, {"text": '63.png resmi aId', "value": '63.png'}, {"text": '34.png resmi Çsd', "value": '34.png'}, {"text": '65.png resmi jkl', "value": '65.png'}, {"text": '65.png resmi Gkl', "value": '65.png'}, {"text": '65.png resmi ökl', "value": '65.png'}, {"text": '65.png resmi slk', "value": '65.png'}, {"text": '65.png resmi lsk', "value": '65.png'}, {"text": '65.png resmi slk', "value": '65.png'}, {"text": '36.png resmi &#351;lk', "value": '36.png'} ]; $('#eksampil').autocomplete(gata, { width: 300, scroll: true, scrollHeight: 300, matchContains: "word", mustMatch: true, formatItem: function(row, i) { return i+". result <img src='images/" + row.value + "'/> " + row.text }, formatMatch: function(row) { //Encoder.EncodeType="entity"; return row.text //Encoder.EncodeType="entity"; //Encoder.htmlDecode( //Encoder.htmlEncode(i); }, formatResult: function(row) { return row.text } }); }); </script> </head> <body> <br> type "re" for see all: <input id="eksampil" /><br> </body> </html>

    Read the article

  • jQuery: how to know when an external JS has finished?

    - by andufo
    Hi, i need to execute specific javascript instructions AFTER an external javascript finishes its own process. (function(){ var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; dsq.src = 'http://xxxxxxxx.disqus.com/embed.js'; (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); })(); How can jQuery know when that .js has finished doing what it does?

    Read the article

  • CSS Rollovers: how to maintain "hit area" size when hidden image is larger than anchor area

    - by nukefusion
    I have a small problem and I don't think what I want to do can be achieved with just pure CSS, but I figured I'd ask anyway. Basically, I have one DIV which contains a hyperlinked element that is smaller in size to it's parent DIV. So in effect I have a square within a square with the inner square being the "hit area". When I mouse over this inner square I want the background of the outer square to change. I know it's not possible to change the parent DIV's background on a:hover, but I figured I could give the illusion of it happening by nesting a hidden image inside the anchor. This works great until I want to "roll off". The problem is that I want the image to disappear when I leave the area of the anchor tag, not the larger hidden image. Is this possible? For the benefit of everyone I've provided an example to demonstrate what I mean: <!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 content="text/html; charset=utf-8" http-equiv="Content-Type" /> <title>Test Rollover</title> <link href="main.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="d1"> <a href="#nogo"> <b id="b1"></b> <b id="b2"></b> </a> </div> </body> And the css: #b1 { width: 200px; height: 200px; top: 100px; left: 100px; background-color:aqua; position: absolute; z-index: 100; } #b2 { width: 400px; height: 400px; background-color:lime; position: absolute; display: none; z-index: 90; } #d1 { width: 400px; height: 400px; background-color:fuchsia; position: relative; } #d1 a:hover #b2 { display: block; } In this example I want the green outer square to disappear when I leave the bounds of the hidden inner blue square.

    Read the article

  • CSS RGBA border / background alpha double

    - by stockli
    I'm working on a website that has a lot of transparency involved, and I thought I would try to build it entirely in RGBA and then do fallbacks for IE. I need a "facebox" style border effect, where the outer border is rounded and is less opaque than the background of the box it surrounds. The last example from http://24ways.org/2009/working-with-rgba-colour seems to suggest that it's possible, but I can't seem to get it to work. When I try the following: <!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"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <title>RGBA Test</title> <style type='text/css'> body { background: #000; color: #fff; } #container { width: 700px; margin: 0 auto; background: rgba(255, 255, 255, 0.2); border: 10px solid rgba(255, 255, 255, 0.1); padding: 20px; } </style> </head> <body> <div id='container'> This should look like a facebox. </div> </body></html> It seems like the background "extends" underneath the border of the element, which causes the pixel values to get added together. Thus, when both the background and the border are semi-transparent, the border will ALWAYS be more opaque than the background of the element. This is exactly the opposite of what I am trying to achieve, but it seems like it should be possible based on the examples I've seen. I should also add that I can't use another element inside the container, because I'm also going to use a border-radius on the container to get rounded corners, and webkit squares the corners of the child elements if they have a background assigned, which would essentially mean a rounded outer border with square contents. Sorry I can't post an image of this... Apparently I don't have enough rep to post an image.

    Read the article

  • Howcome I cannot make my javascript 'executable' in an address bar

    - by imHavoc
    The second link does not work like the first one. How come? <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>Dynamic CSS Properties</title> <script language="JavaScript"> function change(){ //document.getElementById("box1").style.visibility = "visible"; var spanArray = document.getElementsByTagName('span'); var number_spans = spanArray.length ; for( var i = 0; i < number_spans ; i++ ){ var target = spanArray[ i ] ; // do something with target like set visibility target.style.visibility = "visible"; } } function change2(){ var spanArray=document.getElementsByTagName('span');var number_spans=spanArray.length;for(var i=0;i<number_spans;i++){var target=spanArray[i];target.style.visibility="visible";} } </script> </head> <body> <a href="javascript:change2();">Change</a> <br /> <a href="javascript:var spanArray=document.getElementsByTagName('span');va r number_spans=spanArray.length;for(var i=0;i<number_spans;i++){var target=spanArray[i];target.style.visibility='visible';}; ">Show Spans</a> <br /> <div style="position: relative; overflow: hidden;"><center> <br><br> <font size="5" color="blue"> 1. just press the <img src="http://up203.siz.co.il/up1/jw2k4az1imny.jpg"> button on the top to see the picture i promise you its so funny!!!!: <br><br><br> <span style="background: none repeat scroll 0% 0% white;"><span style="visibility: hidden;"> <a onmousedown="UntrustedLink.bootstrap($(this), &quot;77a0d&quot;, event)" rel="nofollow" target="_blank" onclick="(new Image()).src = '/ajax/ct.php?app_id=4949752878&amp;action_type=3&amp;post_form_id=3917211492ade40ee468fbe283b54b3b&amp;position=16&amp;' + Math.random();return true;" href="http://thebigbrotherisrael.blogspot.com/2010/04/all-family-guy-characters-in-real-life.html">Press here to see the picture!!!</a> </span><span style="visibility: visible;"></span></span></font></center></div> </body> </html>

    Read the article

  • IE7 doesn't render part of page until the window resizes or switch between tabs

    - by BlackMael
    I have a problem with IE7. I have a fixed layout for keeping the header and a sidepanel fixed on a page leaving only the "main content" area switch can happily scroll it's content. This layout works perfectly fine for IE6 and IE8, but sometimes one page may start "hiding" the content that should be showing in the "main content" area. The page finishes loading just fine. For a split second IE7 will render the main content just fine and then it will immediately hide it from view.. somewhere.. It would also seem that it only experiences this problem when there is enough content to force the "main content" area to scroll. By resizing the window or switching to another open tab and back again will cause IE7 to show the page as it was intended. Note the same problem does occur with IE8 in compatibility mode, but the page is rendered correctly in IE8 mode. If need be I can attach the basic CSS styling I use, but I first want to see if this is a known issue with IE7. Does IE7 have issues with positioned layout and overflow scrolling that is sometimes likes to forgot to finish rendering the page correctly until some window redraw event forces to finish rendering? Please remember, this exact same layout is used across multiple pages in the site as it is set up in a master page. It is just (in this case) one page that is experiencing this problem. Other pages with the exact same layout do render correctly. Even if the main content is full enough to also scroll. UPDATE: A related question which doesn't have an answer at this point. LATE UPDATE: Adding example masterpage and css Please note this same layout is the same for all the pages in the application. My problem with IE7 only occurs on one such page. All other pages have happily render correctly in IE7. Just one page, using the exact same layout, has issues where it sometimes hides the content in the "work-space" div. The master page <%@ Master Language="VB" CodeFile="MasterPage.master.vb" Inherits="shared_templates_MasterPage" %> <!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 rel="Stylesheet" type="text/css" href="~/common/yui/2.7.0/build/reset-fonts/reset-fonts.css" runat="server" /> <link rel="Stylesheet" type="text/css" href="~/shared/css/layout.css" runat="server" /> <asp:ContentPlaceHolder ID="head" runat="server" /> </head> <body> <form id="form1" runat="server"> <asp:ScriptManager ID="ScriptManager1" runat="server" /> <div id="app-header"> </div> <div id="side-panel"> </div> <div id="work-space"> <asp:ContentPlaceHolder ID="WorkSpaceContentPlaceHolder" runat="server" /> </div> <div id="status-bar"> <asp:ContentPlaceHolder ID="StatusBarContentPlaceHolder" runat="server" /> </div> </form> </body> </html> The layout.css html { overflow: hidden; } body { overflow: hidden; padding: 0; margin: 0; width: 100%; height: 100%; background-color: white; } body, table, td, th, select, textarea, input { font-family: Tahoma, Arial, Sans-Serif; font-size: 9pt; } p { padding-left: 1em; margin-bottom: 1em; } #app-header { position: absolute; top: 0; left: 0; width: 100%; height: 80px; background-color: #dcdcdc; border-bottom: solid 4px #000; } #side-panel { position: absolute; top: 84px; left: 0px; bottom: 0px; overflow: auto; padding: 0; margin: 0; width: 227px; background-color: #AABCCA; border-right: solid 1px black; background-repeat: repeat-x; padding-top: 5px; } #work-space { position: absolute; top: 84px; left: 232px; right: 0px; padding: 0; margin: 0; bottom: 22px; overflow: auto; background-color: White; } #status-bar { position: absolute; height: 20px; left: 228px; right: 0px; padding: 0; margin: 0; bottom: 0px; border-top: solid 1px #c0c0c0; background-color: #f0f0f0; } The Default.aspx <%@ Page Title="Test" Language="VB" MasterPageFile="~/shared/templates/MasterPage.master" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %> <asp:Content ID="WorkspaceContent" ContentPlaceHolderID="WorkSpaceContentPlaceHolder" Runat="Server"> Workspace <asp:ListView ID="DemoListView" runat="server" DataSourceID="DemoObjectDataSource" ItemPlaceholderID="DemoPlaceHolder"> <LayoutTemplate> <table style="border: 1px solid #a0a0a0; width: 600px"> <colgroup> <col width="80" /> <col /> <col width="80" /> <col width="120" /> </colgroup> <tbody> <asp:PlaceHolder ID="DemoPlaceHolder" runat="server" /> </tbody> </table> </LayoutTemplate> <ItemTemplate> <tr> <th><%#Eval("ID")%></th> <td><%#Eval("Name")%></td> <td><%#Eval("Size")%></td> <td><%#Eval("CreatedOn", "{0:yyyy-MM-dd HH:mm:ss}")%></td> </tr> </ItemTemplate> </asp:ListView> <asp:ObjectDataSource ID="DemoObjectDataSource" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" TypeName="DemoLogic"> <SelectParameters> <asp:Parameter Name="path" Type="String" /> </SelectParameters> </asp:ObjectDataSource> </asp:Content> <asp:Content ID="StatusContent" ContentPlaceHolderID="StatusBarContentPlaceHolder" Runat="Server"> Ready OK. </asp:Content>

    Read the article

  • Exclamation mark used with assert method in its parameters.

    - by Maxsy
    Okay this has been lingering in my head for quite a while now. In ruby on rails unit testing there is an exclamation mark with the assert method. Here is an example test "No empty values to be inserted" do product = Produce.new assert !product.save end Let me know the function of the exclamation mark. Quick replies appreciated. Thanks.

    Read the article

  • How can I include an external JavaScript file exactly once per partial view?

    - by AaronSieb
    I have a partial view (UserControl) that implements a simple pager in my Asp.Net MVC project. This pager needs access to a .js file that needs to be included exactly once, regardless of how many instances of the pager control are present on the parent page. I've tried to use Page.ClientScript.RegisterClientScriptInclude, but it had no effect (I assume because the code nugget was evaluated too late to impact the head control). Is there any simple alternative?

    Read the article

  • Error using a hyphen as an object property name in Flex

    - by John Leonard
    I'm trying to assemble a header object for an api request. One of the headers is 'Content-Type'. The hyphen is causing a compile error. Flex is giving me: 1050 - Cannot assign to a non-reference value. I find it spiteful that they enjoy the use of a hyphen in the error message while I hang my head and come here for answers.

    Read the article

  • Failed to obtain JDBC Driver for MySQL under Tomcat environment

    - by Michael Mao
    Hi all: I've been trying to obtain the Driver class for JDBC connection to MySQL. The workstation is running on Linux, Fedora 10. I have manually set up the classpath variable for Java by CLI like this: bash-3.2$ echo $CLASSPATH /home/cmao/public_html/jsp/mysql-connector-java-5.1.12-bin.jar This shows that I've added the lastest mysql connection jar archive to my CLASSPATH variable. I've created a test JSP page which can be found here And source code for this page is: <%@page language="java"%> <%@page import="java.sql.*"%> <%@page import="java.util.*"%> <html> <head> <title>UTS JDBC MySQL connection test page</title> </head> <body> <% Connection con = null; out.print("Java version is : " + System.getProperty("java.version") + "<br />"); out.print("Tomcat version is : " + application.getServerInfo() + "<br />"); out.print("Servlet version is: " + application.getMajorVersion() + "<br />"); out.print("JSP version is : " + JspFactory.getDefaultFactory().getEngineInfo().getSpecificationVersion() +"<br />"); //out.print("Java classpath is : " + System.getProperty("java.class.path")+ "<br />"); //out.print("JSP classpath is : " + appliaction.getAttribute("org.apache.catalina.jsp_classpath") + "<br />"); //out.print("Tomcat classpath is : " + System.getProperty("org.apache.tomcat.common.classpath") + "<br />"); try { Class c = Class.forName("com.mysql.jdbc.Driver"); } catch(Exception e) { out.println("Error! Failed to obtain JDBC driver for MySQL... Missing class \"com.mysql.jdbc.Driver\"<br />"); } %> </body> </html> None of those commented out line would work, various Jsper Expetions would be thrown. You can check those Error pages from the following links: classpath Error page catalina Error page tomcat Error page It seems, from my limited knowledge of JSP and Servlet, the Tomcat environment "ignores" my Java CLASSPATH? In which case I cannot configure the MySQL JDBC package to let my Servlets(a JSP is but a Servlet anyway) work. I am not sure how to fix this issue. would it be better if I use an IDE like Eclipse or NetBeans and create a real Java "web app" so that everything can be "self-configured" by the usage of a web.config XML configuration file? So that I can certainly bypass this Tomcat environment restriction? Many thanks for the suggestions in advance.

    Read the article

  • xhtml-css coding before Drupal Implementing?

    - by artmania
    Hi friends, I'm going to start my first Drupal project :) pretty excited. I have many questions in my head :/ but I will find out the answers and learn many about Drupal while working on this project. ok, I have the design completed. now is it better to make xhtml-css coding of all pages, and then implementing these codes to Drupal? or is it better to make xhtml-css coding straight into Drupal theme? Appreciate advices!

    Read the article

  • Objective-C Class Question?

    - by tarnfeld
    Hey, My head is about to explode with this logic, can anyone help? Class A #imports Class B. Class A calls Method A in Class B. This works great Class B wants to send a response back to Class A from another method that is called from Method A. If you #import Class A from Class B, it is in effect an infinite loop and the whole thing crashes. Is there a way to do this properly, like a parent type thing? BTW, I'm developing for iPhone.

    Read the article

  • jQuery 1.4.2 and IE6: change event not firing first time using keyboard

    - by macca1
    I've done a good amount of research on this and found a bunch of reported problems and solutions but the general consensus seems that all change problems in IE6 were fixed in jQuery 1.4.2. I'm having an issue where a change event is not firing in jQuery 1.4.2, but it did fire successfully in jQuery 1.3.2. This is in IE6. I'm about to submit a bug for this, but for my sanity I wanted to post it here first to see if there's something dumb I'm missing. I don't understand why this is working this way... <HTML> <HEAD> <TITLE>jQuery 1.4.2 Problem </TITLE> <script src="jquery-1.4.2.min.js" type="text/javascript"></script> <script> $(document).ready( function() { $("#firstBox").change(function() { alert("CHANGE"); }); // ONLOAD of document autofocus into the first element... $("form").find(":input:visible:first").focus() }); </script> </HEAD> <BODY> <form> <select id="firstBox"> <option value="" selected="selected">--</option> <option value="1">One</option> <option value="2">Two</option> </select> <br><br> <input size="10" id="secondBox"> </form> </BODY> </HTML> Simple enough, right? Onload of the page, give the first element focus. Onchange of the first element, alert. If you use the mouse, it works as expected. The page loads, the focus is in the drop down, you change the option, you get the alert. The problem is if you use the keyboard. The page loads, the focus is in the drop down, you press the down arrow. The option changes. Tab off the field, no alert. Weird. To make it even weirder, if you tab back into the field and change it again (all using the keyboard), the change event DOES fire after tab out this time. Any ideas?

    Read the article

  • PHP: Simple, Validate if string is hex?

    - by oni-kun
    I have no clue how to validate this string. I am simply supplying an IV for an encryption, but can find no "is_hex()" or similar function, I can't wrap my head around it! I read on a comment in the php documentation (user contrib. notes) this: if($iv == dechex(hexdec($iv))) { //True } else { //False } But that doesn't seem to work at all.. It only says false. If it helps my input of my IV would be this: 92bff433cc639a6d

    Read the article

  • how to use jquery autocomplete?

    - by kyrogue
    hi, i am creating a web project using JSP, and is trying to implement a simple search for users from my database using jquery autocomplete, however i am having trouble understanding how it works. i have little to no knowledge on jquery and ajax just to let you know. i have done the following code and am stuck. <%@page contentType="text/html" pageEncoding="UTF-8" import="ewa.dbConnect,ewa.sendEmail,ewa.pwGen,ewa.hashPw,java.sql.*" %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <link rel="stylesheet" type="text/css" href="css/jquery.autocomplete.css" /> <script src="js/jquery.autocomplete.js"></script> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>JSP Page</title> </head> <body> <input type="text" id="search" name="search"/> <script> $("#search").autocomplete("getdata.jsp"); </script> </body> </html> <%@page contentType="text/html" pageEncoding="UTF-8" import="ewa.dbConnect,java.sql.*" %> <%! dbConnect db = new dbConnect(); %> <% String query = request.getParameter("q"); db.connect(); Statement stmt = db.getConnection().createStatement(); ResultSet rs = stmt.executeQuery("SELECT username FROM created_accounts WHERE username LIKE "+query); while(rs.next()) { out.println(rs.getString("username")); } db.disconnect %> if i am not wrong i read from a website, the parameter q is default and is just there, however how do i display the data? how do i pass the values from getdata.jsp into the autocomplete?

    Read the article

  • How to get multiple selected values of select box in php?

    - by Param-Ganak
    Hi Friends! I have a html form which have a select list box from which you can select multiple values because its multiple property is set to multiple. Consider form method is get method. The html code for form is as follows. <html> <head> <title>Untitled Document</title> </head> <body> <form id="form1" name="form1" method="get" action="display.php"> <table width="300" border="1"> <tr> <td><label>Multiple Selection </label>&nbsp;</td> <td><select name="select2" size="3" multiple="multiple" tabindex="1"> <option value="11">eleven</option> <option value="12">twelve</option> <option value="13">thirette</option> <option value="14">fourteen</option> <option value="15">fifteen</option> <option value="16">sixteen</option> <option value="17">seventeen</option> <option value="18">eighteen</option> <option value="19">nineteen</option> <option value="20">twenty</option> </select> </td> </tr> <tr> <td>&nbsp;</td> <td><input type="submit" name="Submit" value="Submit" tabindex="2" /></td> </tr> </table> </form> </body> </html> I want to display the selected values in select list box on display.php page. So how the selected values are accessed on display.php page using $_GET[] array. Please reply Friends. Bye. Thank You.

    Read the article

  • Included php file calling Javascript function

    - by Illes Peter
    Hi there! Here's the deal. I've got index.php which links to an internal JS file in it's header. index.php then includes another .php file, which outputs this: + add file. addFile() is a Javascript function defined in the external JS file. By doing this nothing happens, the included php does not "see" the JS function. Encapsulating the JS in the included PHP makes it all work. But I don't want to do it that way. Any ideas? EDIT: here's the source <!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> <title>Archie</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <link rel="stylesheet" href="/screen.css" type="text/css" media="screen"/> <script src="/lib/js/archie.js" type="text/javascript"></script> </head> <body> ... ... //included php starts here <form action="/lib/course.php" method="post"> <fieldset> <div id="addFileLocation"></div> <a href="#" onClick="addFile()">+ add file</a> <input type="hidden" id="addFileCount" value="0"/> </fieldset> </form> //ends here ... ... </body> </html> and the js: <script type="text/javascript"> //Dynamically add form fields //add file browser function addFile() { var location = document.getElementById('addFileLocation'); var num = document.getElementById('addFileCount'); var newnum = (document.getElementById('addFileCount').value -1)+ 2; num.value = newnum; var newname = 'addFile_'+newnum; var newelement = document.createElement('input'); newelement.setAttribute('name',newname); newelement.setAttribute('type','file'); location.appendChild(newelement); } </script>

    Read the article

< Previous Page | 96 97 98 99 100 101 102 103 104 105 106 107  | Next Page >