Search Results

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

Page 62/260 | < Previous Page | 58 59 60 61 62 63 64 65 66 67 68 69  | Next Page >

  • Why won't the vertical margins between <p> and <hr> collapse in IE7

    - by Nicolas
    Hello all, Perhaps I am missing something, but I can't explain this from any IE bug I know of. Why in this example do the margins of the <p> and <hr> elements collapse as expected in standards compliant browsers (i.e. FF3, IE8, etc) but not in IE7 (including IE8 compatibility mode)? <!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" > <head> <title>IE7 Box Model</title> <style type="text/css"> p { border: 1px solid #00f; background-color: #fefecb; margin: 20x 0 20px 0; } hr { margin: 20px 0 20px 0; } </style> </head> <body> <p> box 1 </p> <hr /> <p> box 2 </p> <hr /> <p> box 3 </p> </body> </html>

    Read the article

  • uploading image & getting back from database

    - by Anup Prakash
    Putting a set of code which is pushing image to database and fetching back from database: <!-- <?php error_reporting(0); // Connect to database $errmsg = ""; if (! @mysql_connect("localhost","root","")) { $errmsg = "Cannot connect to database"; } @mysql_select_db("test"); $q = <<<CREATE create table image ( pid int primary key not null auto_increment, title text, imgdata longblob, friend text) CREATE; @mysql_query($q); // Insert any new image into database if (isset($_POST['submit'])) { move_uploaded_file($_FILES['imagefile']['tmp_name'],"latest.img"); $instr = fopen("latest.img","rb"); $image = addslashes(fread($instr,filesize("latest.img"))); if (strlen($instr) < 149000) { $image_query="insert into image (title, imgdata,friend) values (\"". $_REQUEST['title']. "\", \"". $image. "\",'".$_REQUEST['friend']."')"; mysql_query ($image_query) or die("query error"); } else { $errmsg = "Too large!"; } $resultbytes=''; // Find out about latest image $query = "select * from image where pid=1"; $result = @mysql_query("$query"); $resultrow = @mysql_fetch_assoc($result); $gotten = @mysql_query("select * from image order by pid desc limit 1"); if ($row = @mysql_fetch_assoc($gotten)) { $title = htmlspecialchars($row[title]); $bytes = $row[imgdata]; $resultbytes = $row[imgdata]; $friend=$row[friend]; } else { $errmsg = "There is no image in the database yet"; $title = "no database image available"; // Put up a picture of our training centre $instr = fopen("../wellimg/ctco.jpg","rb"); $bytes = fread($instr,filesize("../wellimg/ctco.jpg")); } if ($resultbytes!='') { echo $resultbytes; } } ?> <html> <head> <title>Upload an image to a database</title> </head> <body bgcolor="#FFFF66"> <form enctype="multipart/form-data" name="file_upload" method="post"> <center> <div id="image" align="center"> <h2>Heres the latest picture</h2> <font color=red><?php echo $errmsg; ?></font> <b><?php echo $title ?></center> </div> <hr> <h2>Please upload a new picture and title</h2> <table align="center"> <tr> <td>Select image to upload: </td> <td><input type="file" name="imagefile"></td> </tr> <tr> <td>Enter the title for picture: </td> <td><input type="text" name="title"></td> </tr> <tr> <td>Enter your friend's name:</td> <td><input type="text" name="friend"></td> </tr> <tr> <td><input type="submit" name="submit" value="submit"></td> <td></td> </tr> </table> </form> </body> </html> --> Above set of code has one problem. The problem is whenever i pressing the "submit" button. It is just displaying the image on a page. But it is leaving all the html codes. even any new line message after the // Printing image on browser echo $resultbytes; //************************// So, for this i put this set of code in html tag: This is other sample code: <!-- <?php error_reporting(0); // Connect to database $errmsg = ""; if (! @mysql_connect("localhost","root","")) { $errmsg = "Cannot connect to database"; } @mysql_select_db("test"); $q = <<<CREATE create table image ( pid int primary key not null auto_increment, title text, imgdata longblob, friend text) CREATE; @mysql_query($q); // Insert any new image into database if (isset($_POST['submit'])) { move_uploaded_file($_FILES['imagefile']['tmp_name'],"latest.img"); $instr = fopen("latest.img","rb"); $image = addslashes(fread($instr,filesize("latest.img"))); if (strlen($instr) < 149000) { $image_query="insert into image (title, imgdata,friend) values (\"". $_REQUEST['title']. "\", \"". $image. "\",'".$_REQUEST['friend']."')"; mysql_query ($image_query) or die("query error"); } else { $errmsg = "Too large!"; } $resultbytes=''; // Find out about latest image $query = "select * from image where pid=1"; $result = @mysql_query("$query"); $resultrow = @mysql_fetch_assoc($result); $gotten = @mysql_query("select * from image order by pid desc limit 1"); if ($row = @mysql_fetch_assoc($gotten)) { $title = htmlspecialchars($row[title]); $bytes = $row[imgdata]; $resultbytes = $row[imgdata]; $friend=$row[friend]; } else { $errmsg = "There is no image in the database yet"; $title = "no database image available"; // Put up a picture of our training centre $instr = fopen("../wellimg/ctco.jpg","rb"); $bytes = fread($instr,filesize("../wellimg/ctco.jpg")); } } ?> <html> <head> <title>Upload an image to a database</title> </head> <body bgcolor="#FFFF66"> <form enctype="multipart/form-data" name="file_upload" method="post"> <center> <div id="image" align="center"> <h2>Heres the latest picture</h2> <?php if ($resultbytes!='') { // Printing image on browser echo $resultbytes; } ?> <font color=red><?php echo $errmsg; ?></font> <b><?php echo $title ?></center> </div> <hr> <h2>Please upload a new picture and title</h2> <table align="center"> <tr> <td>Select image to upload: </td> <td><input type="file" name="imagefile"></td> </tr> <tr> <td>Enter the title for picture: </td> <td><input type="text" name="title"></td> </tr> <tr> <td>Enter your friend's name:</td> <td><input type="text" name="friend"></td> </tr> <tr> <td><input type="submit" name="submit" value="submit"></td> <td></td> </tr> </table> </form> </body> </html> --> ** But in this It is showing the image in format of special charaters and digits. 1) So, Please help me to print the image with some HTML code. So that i can print it in my form to display the image. 2) Is there any way to convert the database image into real image, so that i can store it into my hard-disk and call it from tag? Please help me.

    Read the article

  • How do I get the WVGA Android browser to stop scaling my images?

    - by Dan Fabulich
    I'm designing an HTML page for display in Android browsers. Consider this simple example page: <html> <head><title>Simple!</title> </head> <body> <p><img src="http://sstatic.net/so/img/logo.png"></p> </body> </html> It looks just fine on the standard HVGA phones (320x480), but on HDPI WVGA sizes (480x800 or 480x854) the built-in browser automatically scales the image up; it looks ugly. I've read that I should be able to use this tag to force the browser to stop scaling my page: <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; minimum-scale=1.0; user-scalable=0;" /> ... but all that does is disable user scaling (the zoom buttons disappear); it doesn't actually prevent the browser from scaling my image. Adjusting the scale factors (setting them all to 2.0 or 0.5) has no effect at all. How can I force the WVGA browser to stop scaling my images?

    Read the article

  • AJAX PopupControl Extender with Bing Maps

    - by Morano88
    Hey! I want to use AJAX PopupControl Extender with a text box so when a user clicks on the text box a popup that contains the Bing Map appears. I'm using the following code but I don't know why it is not working ? <asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager> <asp:Label ID="Label1" runat="server" Font-Bold="true" Font-Size="14px" Text="Click inside the textbox to open AJAX Popup Control:"></asp:Label> <div class="clear"><br /></div> <asp:TextBox ID="TextBox1" CssClass="textbox" runat="server" Width="200px"></asp:TextBox> <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <script type="text/javascript" src="http://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.2"></script> <script type="text/javascript"> var map = null; function GetMap() { map = new VEMap('myMap'); map.LoadMap(new VELatLong(47.6, -122.33), 10 ,'h' ,false); } </script> </head> <body onload="GetMap();"> <div id='myMap' style="position:relative; width:400px; height:400px;"></div> </body> </html> <ajaxToolkit:PopupControlExtender ID="PopupControlExtender1" runat="server" CommitProperty="foreColor" Position="Right" TargetControlID="TextBox1" PopupControlID="myMap" OffsetX="2" OffsetY="2"> </ajaxToolkit:PopupControlExtender> what's wrong ?

    Read the article

  • Question about compilers and how they work

    - by Marin Doric
    This is the C code that frees memory of a singly linked list. It is compiled with Visual C++ 2008 and code works as it should be. /* Program done, so free allocated memory */ current = head; struct film * temp; temp = current; while (current != NULL) { temp = current->next; free(current); current = temp; } But I also encountered ( even in a books ) same code written like this: /* Program done, so free allocated memory */ current = head; while (current != NULL) { free(current); current = current->next; } If I compile that code with my VC++ 2008, program crashes because I am first freeing current and then assigning current-next to current. But obviously if I compile this code with some other complier ( for example, compiler that book author used ) program will work. So question is, why does this code compiled with specific compiler work? Is it because that compiler put instructions in binary file that remember address of current-next although I freed current and my VC++ doesn't. I just want to understand how compilers work.

    Read the article

  • CSS: how come html, body height: 100% is more then 100% ?!

    - by Nati
    hey, i was trying to do a bottom sticky footer link test and but it kept being more then 100% meaning it scrolled a litle bit.. so i made a simple HTML code, without any additions but its still more than 100%, see here: <!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="he" lang="he" dir="rtl" id="bangler"> <head> <title>my title</title> <style type="text/css"> html, body, #wrapper { height: 100%; } body > #wrapper { height: auto; min-height: 100%; } </style> </head> <body> <div id="wrapper">aa</div> </body> </html> the thing is, it scrolls just a little bit more then 100% meaning about 5-10px more.. this is really strange, on both IE and Firefox !! Thanks in advance !

    Read the article

  • jQuery AJAX Loading Page Content Only After I Press Shift Key

    - by Cosmin
    My ajax + jquery loading page only after holding shift key and duplicate new empty window. If I press the loading button nothing hapen, only after I press shift key I get to load the page correctly... this is my ajax script: $(document).ready(function () { $(".getUsersA").click(function () { $.ajax({ beforeSend: function () { $(".gridD").html(spinner) }, url: 'lib/some_url.php', type: 'POST', data: ({ data1:'2013-09-01' }), success: function (results) {$(".gridD").html(results);} }); }); }); I have a second js file with just this line of code for spinner var spinner = "<img src='images/spinner.gif' border='0'>"; html code: <html> <head> <title>Title</title> <script type="text/javascript" src="js/jquery-1.10.2.js"></script> <script type="text/javascript" src="js/ajax.js"></script> <script type="text/javascript" src="js/general.js"></script> </head> <body> <h1>Putting it all tugether ... with jQuery</h1> <div class="thedivD"><a href="" class="buttonA getUsersA">Get Users</a></div> <h3>jQuery results</h3> <div class="gridD"></div> </body> </html>

    Read the article

  • IBM Worklight v6.1.0.1 : Error when using Ionic Framework with Worklight and run on IOS environment

    - by NickNguyen
    I have created demo app using Ionic with Worklight and it worked on Android but got error on IOS, when i used mobile browser simulator and debugged on IOS environment, i got the folowing error message: Uncaught InvalidCharacterError: Failed to execute 'add' on 'DOMTokenList': The token provided ('platform-ios - iphone') contains HTML space characters, which are not valid in tokens. I just add Ionic files in index.html: <!DOCTYPE HTML> <html> <head> <meta charset="UTF-8"> <title>index</title> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=0"> <link rel="shortcut icon" href="images/favicon.png"> <link rel="apple-touch-icon" href="images/apple-touch-icon.png"> <link rel="stylesheet" href="css/main.css"> <link rel="stylesheet" href="ionic/css/ionic.css"> <script src="ionic/js/ionic.bundle.js"></script> </head> <body style="display: none;"> <!--application UI goes here--> <div class="bar bar-header bar-positive"> <h1 class="title">bar-positive</h1> </div> <script src="js/initOptions.js"></script> <script src="js/main.js"></script> <script src="js/messages.js"></script> </body> </html> I also tested on mobile device on both Android and IOS and only got error on IOS device. I don't know how to fix this. Can anyone help? Thanks.

    Read the article

  • using jquery in mysql php

    - by JPro
    I am new to using Jquery using mysql and PHP I am using the following code to pull the data. But there is not data or error displayed. JQUERY: <html> <head> <script> function doAjaxPost() { // get the form values var field_a = $("#field_a").val(); $("#loadthisimage").show(); $.ajax({ type: "POST", url: "serverscript.php", data: "ID="+field_a, success: function(resp){ $("#resposnse").html(resp); $("#loadthisimage").hide(); }, error: function(e){ alert('Error: ' + e); } }); } </script> </head> <body> <select id="field_a"> <option value="data_1">data_1</option> <option value="data_2">data_2</option> </select> <input type="button" value="Ajax Request" onClick="doAjaxPost()"> <a href="#" onClick="doAjaxPost()">Here</a> </form> <div id="resposnse"> <img src="ajax-loader.gif" style="display:none" id="loadthisimage"> </div> </body> and now serverscript.php <?php if(isset($_POST['ID'])) { $nm = $_POST['ID']; echo $nm; //insert your code here for the display. mysql_connect("localhost", "root", "pop") or die(mysql_error()); mysql_select_db("JPro") or die(mysql_error()); $result1 = mysql_query("select Name from results where ID = \"$nm\" ") or die(mysql_error()); // store the record of the "example" table into $row while($row1 = mysql_fetch_array( $result1 )) { $tc = $row1['Name']; echo $tc; } } ?>

    Read the article

  • Javascript functions Math.round(num) vs num.toFixed(0) and browser inconsistencies

    - by eft
    Edit: To clarify, the problem is how to round a number to the nearest integer. i.e. 0.5 should round to 1 and 2.5 shoud round to 3. Consider the following code: <html><head></head><body style="font-family:courier"> <script> for (var i=0;i<3;i++){ var num = i + 0.50; var output = num + " " + Math.round(num) + " " + num.toFixed(0); var node = document.createTextNode(output); var pElement = document.createElement("p"); pElement.appendChild(node); document.body.appendChild(pElement); } </script> </body></html> In Opera 9.63 I get: 0.5 1 0 1.5 2 2 2.5 3 2 In FF 3.03 I get: 0.5 1 1 1.5 2 2 2.5 3 3 In IE 7 I get: 0.5 1 0 1.5 2 2 2.5 3 3 Note the bolded results. Does this mean that toFixed(0) should be avoided?

    Read the article

  • Extremely strange glitch in Chrome - parses contents of string!

    - by George Edison
    Okay - this is the dumbest glitch I have seen in a while: <!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" xml:lang="en" lang="en"> <head> <script type='text/javascript'> var data = "</script>"; </script> </head> <body> This should break! </body> </html> This causes syntax errors because the JavaScript parser is actually reading the contents of the string. How stupid! How can I put </script> in my code. Is there any way? Is there a valid reason for this behavior?

    Read the article

  • By Pressing Enter key move to next Textbox in ASP.Net

    - by Malik Usman
    I have two textboxes and one Button control.....In first TextBox when press enter key moves to next textbox(Barcode) and when i press enter in barcode textbox it fires the button click event......till that its ok.... But what happening after fireing the Button click even on enter in Barcode Textbox its going back to focus on first textbox.........But i want this to stay in same Barcode TextBox to scan more barcodes. The code is below. <script type="text/javascript" src="http://ajax.microsoft.com/ajax/jquery/jquery-1.4.2.min.js"> </script> <Head> <script type="text/javascript"> $(function() { $('input:text:first').focus(); var $inp = $('input:text'); $inp.bind('keydown', function(e) { //var key = (e.keyCode ? e.keyCode : e.charCode); var key = e.which; if (key == 13) { e.preventDefault(); var nxtIdx = $inp.index(this) + 1; $(":input:text:eq(" + nxtIdx + ")").focus(); } }); }); </script> </Head>

    Read the article

  • Can I flow divs down the page instead of across it?

    - by Brabster
    If I have a collection of div elements, I can use CSS to have them flow across the page and overflow onto the next line. Here's a simple example: <html> <head> <title>Flowing Divs</title> <style type="text/css"> .flow { float: left; margin: 4em 8em; } </style> </head> <body> <div class="container"> <div class="flow">Div 1</div> <div class="flow">Div 2</div> <div class="flow">Div 3</div> <div class="flow">Div 4</div> <div class="flow">Div 5</div> <div class="flow">Div 6</div> <div class="flow">Div 7</div> <div class="flow">Div 8</div> </div> </body> </html> Is it possible to have the divs flow down the page instead of across it, so that they would flow down columns not along lines, but still occupy the same space as they would if they flowed across? So for the example above, if they flowed into two lines of four divs, could I get the first column to contain Div1 and Div2 instead of Div1 and Div5?

    Read the article

  • I can't read the value from a radio button.

    - by Corey
    <html> <head> <title>Tip Calculator</title> <script type="text/javascript"><!-- function calculateBill(){ var check = document.getElementById("check").value; /* I try to get the value selected */ var tipPercent = document.getElementById("tipPercent").value; /* But it always returns the value 15 */ var tip = check * (tipPercent / 100) var bill = 1 * check + tip; document.getElementById('bill').innerHTML = bill; } --></script> </head> <body> <h1 style="text-align:center">Tip Calculator</h1> <form id="f1" name="f1"> Average Sevice: 15%<input type="radio" id="tipPercent" name="tipPercent" value="15" /> <br /> Excellent Sevice: 20%<input type="radio" id="tipPercent" name="tipPercent" value="20" /> <br /><br /> <label>Check Amount</label> <input type="text" id="check" size="10" /> <input type="button" onclick="calculateBill()" value="Calculate" /> </form> <br /> Total Bill: <p id="bill"></p> </body> </html>

    Read the article

  • Prettify working using python idle but not when using python script

    - by Loclip
    So when I use print soup.prettify() on idle it's prettifying my html but when I calling the script from server the prettify() not working #!/usr/bin/python import cgi, cgitb, urllib2, sys from bs4 import BeautifulSoup styles = [] i = 1 site = "www.example.com" page = urllib2.urlopen(site) soup = BeautifulSoup(page) table = soup.find('table', {'class' :'style5'}) alltd = table.findAll('td') allspans = table.findAll('span') while i<55: styles.append("style" + str(i)) i+=1 for td in alltd: if any(x in td["class"] for x in styles): td["class"] = "align" for span in allspans: span.replaceWithChildren() print "Content-type: text/html" print print "<!DOCTYPE html>" print "<html>" print "<head>" print '<meta http-equiv="content-type" content="text/html; charset=utf-8">' print '<link rel="stylesheet" href="lightbox/css/lightbox.css" type="text/css" media="screen">' print '<style type="text/css">' print "body {background-color:#b0c4de;}" print '.align {text-align: center;}' print "</style>" print "</head>" print "<body>" print table.pretiffy() print "</body>" print "</html>"

    Read the article

  • Loading attribute in XPATH, problem

    - by Nguyen Quoc Hung
    I've got a question about loading attribute in XPATH. I write short XML code to test: <?xml version="1.0" encoding="iso-8859-1"?> <?xml-stylesheet type="text/xsl" href="testDate.xsl"?> <element attribute="1/1/2100"> Hung </element> My XSL code: <?xml version="1.0" encoding="iso-8859-1"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <!--Handle the document: set up HTML page--> <xsl:template match="/"> <html> <head> </head> <body> This is a test <xsl:value-of select="element@attribute"/> </body> </html> </xsl:template> </xsl:stylesheet> Why it produces an error when loading the stylesheet? Would you please help me explain this? Thank you

    Read the article

  • From Servlet to JSP

    - by kawtousse
    When trying to pass a table built with HTML in my servlet like that: response.setContentType("text/html" ); PrintWriter out = response.getWriter(); out.println("<html>" ); out.println("<head>" ); out.println("<title>Imput OPC</title>" ); out.println("</head>" ); out.println("<body>" ); ... and then response.sendRedirect("/xxx.jsp" ); But I did not found any table in the JSP. A friend told me to use a Bean but how can i catch values from the form ( because I have a treatement with the form before constructing table)in a bean.I must use a servlet for that. So what I want is exactly to construct in the response a table then send it to jsp knowing that: .sendRedirect and getServletContext().getRequestDispatcher("/xxx.jsp").forward(request, response); gives nothing at all. Please Help its urgent. Thinks.

    Read the article

  • accessing list sent from server as JSON object

    - by tazim
    How to access a list sent in form of json object using django to the template received in ajax callback function . The code is as follows : views.py def showfiledata(request): with open("/home/tazim/webexample/test.txt") as f: list = f.readlines() f.closed return_dict = {'filedata':list} json = simplejson.dumps(return_dict) HttpResponse(json,mimetype="application/json") in template showfile.html: < html> < head> < script type="text/javascript" src="/jquerycall/">< /script> < script type="text/javascript"> $(document).ready(function() { $("button").click(function() { $.ajax({ type:"POST", url:"/showfiledata/", datatype:"json", success:function(data) { var s = data.filedata; $("#someid").html(s); } }); }); }); < /script> < /head> < body> < form method="post"> < button type="button">Click Me< /button> < div id="someid">< /div> < /form> < /body> < /html>

    Read the article

  • JSF Form is not showing up

    - by AnAmuser
    My server is glassfish v3, my browser is firefox 3.6.3 and i am using Netbeans 6.8 My question is why the textfield is not showing up in my browser. I only see the label. <?xml version='1.0' encoding='UTF-8' ?> <!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" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"> <h:head> <title>Lookup</title> </h:head> <h:body> <fieldset> <legend>Enter Your Customer ID</legend> <p>Legal ids are id001, id002, and id003.</p> <f:view> <h:form> Customer ID: <h:inputText value="#{bankForm.customerId}" /> <h:commandButton value="Show Current Balance" action="#{bankForm.findBalance}" /> </h:form> </f:view> </fieldset> </h:body> </html>

    Read the article

  • Same jQuery code returns two different results – Submit Button Text

    - by Lijo
    I have two jQuery codes - http://jsfiddle.net/Lijo/CXGX7/7/ and http://jsfiddle.net/Lijo/CXGX7/8/ . The first code returns undefined whereas the second code returns text of button. QUESTIONS What is the reason for this difference in result? Why is the first code not returning expected text of button? Note: I verified that both are using same version of jQuery (by an alert of jQuery) alert($.fn.jquery); CODE <html xmlns="http://www.w3.org/1999/xhtml"> <head><title> </title> <script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jquery/jquery-1.8.1.js"></script> <script type="text/javascript"> alert($('.myButton').attr("value")); </script> </head> <body> <form method="post" action="Test.aspx" id="form1"> <div class="aspNetHidden"> <input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwULLTE0MDM4MzYxMjNkZMycQvsYQ+GPFsQHoQ8j/8vEo2vQbqkhfgPc60kxXaQO" /> </div> <div class="aspNetHidden"> <input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="/wEWAwKqxqqrCgLi/JazDQKM54rGBqgaroRQTXJkD1LyUlVxAmLRCNfTGVe73swQBMemBtvN" /> </div> <div> <input name="txtEmpName" type="text" id="txtEmpName" /> <input type="submit" name="Button1" value="Submit" id="Button1" class="myButton" /> </div> </form> </body> </html> REFERENCES Retrieve Button value with jQuery How to determine and print jQuery version?

    Read the article

  • Forum achievements on a phpBB3 board?

    - by VIVA LA NWO
    I recently started a new community. The forum software is phpBB3, and so far so good. In an attempt to make my community more unique and interesting, I had to idea of having user achievements. Let me give you a quick run-down. Each user has achievements that they can earn (these will probably be across all users), for example an achievement for when a user hits 1,000 posts, when they upload an avatar, when one of their topics gets 1,000 views and so on. Each achievement has points, for example an achievement like uploading an avatar will be 10 points and reaching 10,000 points will grant 50 achievement points. If anyone here plays World of Warcraft you may be seeing where I'm getting the ideas from. :) What I'm struggling to get my head around though is how exactly to code this... I could keep a record of all users activity and add it to a special database table possibly, and then check via cron every minute or so if any user has met achievement criteria... but then I also want it controllable through the ACP so I can easily add new achievements and change their points etc. My mind is pretty blank when it comes to anything but the most simple things. What I really posted here for was feedback on the idea and how you all think I should go about doing this. The coding part should be pretty simple for me once I get my head around how phpBBB MODs need to be written. Thanks for reading, and I look forward to your replies. :)

    Read the article

  • How do I include a frameset under CGI.pm?

    - by neversaint
    I want to have a cgi-script that does two things. Take the input from a form. Generate results base on the input values on a frame. I also want the frame to exist only after the result is generated/printed. Below is the simplified code of what I want to do. But somehow it doesn't work. What's the right way to do it? #!/usr/local/bin/perl use CGI ':standard'; print header; print start_html('A Simple Example'), h1('A Simple Example'), start_form, "What's your name? ",textfield('name'), p, "What's the combination?", p, checkbox_group(-name=>'words', -values=>['eenie','meenie','minie','moe'], -defaults=>['eenie','minie']), p, "What's your favorite color? ", popup_menu(-name=>'color', -values=>['red','green','blue','chartreuse']), p, submit, end_form, hr; if (param()) { # begin create the frame print <<EOF; <html><head><title>$TITLE</title></head> <frameset rows="10,90"> <frame src="$script_name/query" name="query"> <frame src="$script_name/response" name="response"> </frameset> EOF # Finish creating frame print "Your name is: ",em(param('name')), p, "The keywords are: ",em(join(", ",param('words'))), p, "Your favorite color is: ",em(param('color')), hr; } print end_html;

    Read the article

  • Rich Text Editor in Table view

    - by pubudu
    Im try to implement rich text editor in table view cell. before this i test rich text editor using web view.it work fine I want to put this web view inside my costume cell. i did it, but it not working (bold , italic ... styles) how can i pass stringByEvaluatingJavaScriptFromString:@"document.execCommand(\"Bold\") this command to webview in cell i did like this in viewContoller - (IBAction)clickbold:(id)sender { static NSString *CellIdentifier = @"Cell1"; Cell *cell = [_tableview dequeueReusableCellWithIdentifier:CellIdentifier]; cell = [_tableview cellForRowAtIndexPath:0]; [cell.webView stringByEvaluatingJavaScriptFromString:@"document.execCommand(\"Bold\")"]; [_tableview beginUpdates]; [_tableview endUpdates]; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell1"; Cell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; { NSBundle *bundle = [NSBundle mainBundle]; NSURL *indexFileURL = [bundle URLForResource:@"index" withExtension:@"html"]; [cell.tableview loadRequest:[NSURLRequest requestWithURL:indexFileURL]]; cell.webView.delegate = self; [cell.webView stringByEvaluatingJavaScriptFromString:@"document.execCommand(\"Italic\")"]; return cell; } return cell; } my html file like this <html> <head> <script> function myFunction() { window.location.href = "myclick://buttonClicked"; } function onKEYPRESS() { window.location.href = "onkeypress://buttonClicked"; } </script> </head> <body> <body> <div id="content" contenteditable="true" style="font-family:Arial" onfocus="myFunction()" onkeypress="onKEYPRESS()">TEXT TEXT </div> </body> </html>

    Read the article

  • Validating Time & Date To Be At Least A Certain Amount Of Time In The Future

    - by MJH
    I've built a reservation form for a taxi company which works fine, but I'm having an issue with users making reservations that are due too soon in the future. Since the entire form is kind of long, I first want to make sure the user is not trying to make a reservation for less than an hour ahead of time, without them having to fill out the whole form. This is what I have come up with so far, but it's just not working: <?php //Set local time zone. date_default_timezone_set('America/New_York'); //Get current date and time. $current_time = date('Y-m-d H:i:s'); //Set reservation time variable $res_datetime = $_POST['res_datetime']; //Set event time. $event_time = strtotime($res_datetime); ?> <!doctype html> <html> <head> <meta charset="utf-8"> <title>Check Date and Time</title> </head> <?php //Check to be sure reservation time is at least one hour in the future. if (($current_time - $event_time) <= (3600)) { echo "You must make a reservation at least one hour ahead of time."; } ?> <form name="datetime" action="" method="post"> <input name="res_datetime" type="datetime-local" id="res_datetime"> <input type="submit"> </form> <body> </body> </html> How can I create a validation check to make sure the date and time of the reservation is at least one hour ahead of time?

    Read the article

  • CSS: how to set the width of form control so they all have the same width?

    - by Alessandro Vernet
    Consider the following example: <!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" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <style type="text/css"> div { width: 15em } input, textarea, select { width: 100%; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box } </style> </head> <body> <form> <div> <input value="Input"> </div> <div> <textarea>Text area</textarea> </div> <div> <select> <option>One</option> <option>Two</option> <option>Three</option> </select> </div> </form> </body> </html> On browser that support the border-box box sizing, this is rendered as I want: On IE 6/7, however, this is rendered as: How can I get the same rendering in IE 6/7 that I get in other browsers, without resorting to setting sizes in pixels?

    Read the article

< Previous Page | 58 59 60 61 62 63 64 65 66 67 68 69  | Next Page >