Search Results

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

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

  • Make Div overlay ENTIRE page (not just viewport)??

    - by Polaris878
    Hello, So I have a problem that I think is quite common but I have yet to find a good solution for. I want to make an overlay div cover the ENTIRE page... NOT just the viewport. I don't understand why this is so hard to do... I've tried setting body, html heights to 100% etc but that isn't working. Here is what I have so far: <html> <head> <style type="text/css"> .OverLay { position: absolute; z-index: 3; opacity: 0.5; filter: alpha(opacity = 50); top: 0; bottom: 0; left: 0; right: 0; width: 100%; height: 100%; background-color: Black; color: White;} body { height: 100%; } html { height: 100%; } </style> </head> <body> <div style="height: 100%; width: 100%; position: relative;"> <div style="height: 100px; width: 300px; background-color: Red;"> </div> <div style="height: 230px; width: 9000px; background-color: Green;"> </div> <div style="height: 900px; width: 200px; background-color: Blue;"></div> <div class="OverLay">TestTest!</div> </div> </body> </html> I'd also be open to a solution in JavaScript if one exists, but I'd much rather just be using some simple CSS.

    Read the article

  • RegEx for Dynamic URL Goals settings in Google Analytics

    - by gaaustralia
    Hi, I have tried to work this regex to set up a goal in GA for 2 days, but I cannot get my head around it... The url format is like this: /purchase.php?cDd=1&transaction_id=xxxxxxx&verify=xxxxxxxxxxxxxxxx=&method=creditcard&type=purchase transaction_id= is populated with a sept of numbers verify= is populated by a string of numbers, letters in both caps and lower case Basically I would like to only match URLs which finish by "&method=creditcard&type=purchase" I have tried to just put &method=creditcard&type=purchase but it does retrieve other URLs too Would anyone has any ideas

    Read the article

  • php MySQL snytax error

    - by Jacksta
    my scrip is supposed to look up contacts in a table and present thm on the screen to then be edited. however this is not this case. I am getting the error Parse error: syntax error, unexpected $end in /home/admin/domains/domain.com.au/public_html/pick_modcontact.php on line 50 NOTE: this is the last line in this script. <? session_start(); if ($_SESSION[valid] != "yes") { header( "Location: contact_menu.php"); exit; } $db_name = "testDB"; $table_name = "my_contacts"; $connection = @mysql_connect("localhost", "user", "pass") or die(mysql_error()); $db = @mysql_select_db($db_name, $connection) or die(mysql_error()); $sql = "SELECT id, f_name, l_name FROM $table_name ORDER BY f_name"; $result = @mysql_query($sql, $connection) or die(mysql_error()); $num = @mysql_num_rows($result); if ($num < 1) { $display_block = "<p><em>Sorry No Results!</em></p>"; } else { while ($row = mysql_fetch_array($result)) { $id = $row['id']; $f_name = $row['f_name']; $l_name = $row['l_name']; $option_block .= "<option value\"$id\">$l_name, $f_name</option>"; } $display_block = "<form method=\"POST\" action=\"show_modcontact.php\"> <p><strong>Contact:</strong> <select name=\"id\">$option_block</select> <input type=\"submit\" name=\"submit\" value=\"Select This Contact\"></p> </form>"; ?> <!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>Modify A Contact</title> </head> <body> <h1>My Contact Management System</h1> <h2><em>Modify a Contact</em></h2> <p>Select a contact from the list below, to modify the contact's record.</p> <? echo "$display_block"; ?> <br> <p><a href="contact_menu.php">Return to Main Menu</a></p> </body> </html>

    Read the article

  • jQuery: Can't get tooltip plugin to work

    - by Rosarch
    I'm trying to use this tooltip plugin: http://bassistance.de/jquery-plugins/jquery-plugin-tooltip/. I can't seem to get it to work. <head> <script type="text/javascript" src="/static/JQuery.js"></script> <script type="text/javascript" src="/static/jquery-ui-1.8.1.custom.min.js"></script> <script type="text/javascript" src="/static/jquery.json-2.2.min.js"></script> <script type="text/javascript" src="/static/jquery.form.js"></script> <script type="text/javascript" src="/static/js-lib/jquery.bgiframe.js"></script> <script type="text/javascript" src="/static/js-lib/jquery.delegate.js"></script> <script type="text/javascript" src="/static/js-lib/jquery.dimensions.js"></script> <script type="text/javascript" src="/static/jquery.tooltip.js"></script> <script type="text/javascript" src="/static/sprintf.js"></script> <script type="text/javascript" src="/static/clientside.js"></script> </head> I try it out in a simple example: clientside.js: $(document).ready(function () { $("#set1 *").tooltip(); }); The target html: <div id="set1"> <p id="welcome">Welcome. What is your email?</p> <form id="form-username-form" action="api/user_of_email" method="get"> <p> <label for="form-username">Email:</label> <input type="text" name="email" id="form-username" /> <input type="submit" value="Submit" id="form-submit" /> </p> </form> <p id="msg-user-accepted"></p> </div> Unfortunately, nothing happens. What am I doing wrong?

    Read the article

  • Why is this simple file upload not working? JSF

    - by Nitesh Panchal
    Hello, Why is this code not working? I always get size() = 0, whenever i upload file. xhtml file :- <?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"> <h:head> <title>Abc</title> </h:head> <h:body> <center> <form method="post" enctype="multipart/form-data" id="form" action="/upload/uploadFile"> <input type="file"/> <br/> <input type="Submit" value="upload"/> </form> </center> </h:body> </html> This is my servlet :- package servlets; import java.io.IOException; import java.util.List; import java.util.logging.Level; import java.util.logging.Logger; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.commons.fileupload.FileItem; import org.apache.commons.fileupload.FileUploadException; import org.apache.commons.fileupload.disk.DiskFileItemFactory; import org.apache.commons.fileupload.servlet.ServletFileUpload; @WebServlet(name="uploadFile", urlPatterns={"/uploadFile"}) public class uploadFile extends HttpServlet { protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException, FileUploadException { System.out.println("executed!"); List<FileItem> items = new ServletFileUpload(new DiskFileItemFactory()).parseRequest(request); System.out.println(items.size()); for (FileItem item : items) { if (!item.isFormField()) { System.out.println("Name: " + item.getName()); System.out.println("Size: " + item.getSize()); System.out.println("Type: " + item.getContentType()); } } } @Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { try { processRequest(request, response); } catch (FileUploadException ex) { ex.printStackTrace(); } } @Override protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { try { processRequest(request, response); } catch (FileUploadException ex) { ex.printStackTrace(); } } @Override public String getServletInfo() { return "Short description"; } }

    Read the article

  • How do I... truncate string in an array

    - by ander163
    In a ruby on rails app, I build an array of Project Names and project id values, but want to truncate the length of the names. Current code is: names = active_projects.collect {|proj| [proj.name, proj.id]} I have tried to add a truncate function to the block, but am getting undefined method for class error. Thanks in advance - I just cannot wrap my head around this yet.

    Read the article

  • jQuery - count number of rows in a table

    - by danjan
    How do I count the number of tr elements within a table using jquery. Sorry, I sense this might be basic but i've been banging my head against it. I know there is a similar thread, but I just want the total rows. http://stackoverflow.com/questions/613024/count-number-of-table-rows-between-two-specific-rows-with-jquery

    Read the article

  • subdomain rewriting in ASP.NET?

    - by acidzombie24
    How do i do this in .NET? http://why.does.my.head.asplode.net/ I want to do something like ytmnd where each url is a different user generated page. I might need something as simple as pointing to a directory so dirname.mysite.com will redirect to http_public/userGenContent/dirname/

    Read the article

  • using php and java script in a form

    - by Gal Miller
    I am a little bit lost. What I want to achieve is: my own custom button change onMouseOver etc' keep it's size post the information to a php server side code What I'm missing is: The post - I couldn't figure out how to combine js & php The Button size - my code sets a size for the original button but after the rollover it changes The code: <html> <head> </head> <body> <script> function form_on_click(frm) { document.buttonMore.src='bottom_more_click.JPG'; frm.submit(); } </script> <div style="position: absolute; left: 120px; top: 90px; background-image: url(myBackgroundPicture.jpg); background-repeat:no-repeat; width: 800px; height: 280px; padding: 15px;"> <form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>"> <input type="text" name="whatever" size= "55" height="100" lang="en" dir="ltr" style="margin-top: 188px; margin-left: 95px; height: 20px; background-color: transparent; border:none; color: #FFFFFF; font-family: Verdana; font-weight: none; font-size: 18px;"> <a onmouseover="document.buttonMore.src='bottom_more_hover.JPG'" onmouseout="document.buttonMore.src='bottom_more_reg.JPG'" onmousedown= "form_on_click(this.form) this.form.submit()" onmouseup="document.buttonMore.src='bottom_more_hover.JPG'"> <img src="bottom_more_reg.jpg" name="buttonMore" height="30" width="173" border="0" alt="MORE!" style="margin-bottom:-10px; margin-left: 15px; height: 30px; width: 100px;"> </a> </form> </div> </body>

    Read the article

  • Javascript - dynamically add input fields

    - by Neeraj
    Hi Guys, I have a code to add input fields dynamically in js. But the problem is if i add 3 fields or more and then browse a file(if the input field is file), the value of the field selected disappears. Can any one help Heres my code Thanks in advance. :) <!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=iso-8859-1" /> <title>Untitled Document</title> <script type="text/javascript"> <!-- Begin /* This script and many more are available free online at The JavaScript Source!! http://javascript.internet.com Created by: Husay :: http://www.communitxt.net */ var arrInput = new Array(0); var arrInputValue = new Array(0); fields = 1; maxInput = 4; function addInput() { //arrInput.push(createInput(arrInput.length)); if(fields <= maxInput){ fields +=1; arrInput.push(arrInput.length); //arrInputValue.push(arrInputValue.length); arrInputValue.push(""); display(); } } function display() { document.getElementById('parah').innerHTML=""; for (intI=0;intI<arrInput.length;intI++) { document.getElementById('parah').innerHTML+=createInput(arrInput[intI], arrInputValue[intI]); } } function saveValue(intId,strValue) { arrInputValue[intId]=strValue; } function createInput(id,value) { return "<input type='file' id='test "+ id +"' onChange='javascript:saveValue("+ id +",this.value)' value='"+ value +"'><br>"; } function deleteInput() { if (arrInput.length > 0) { fields -=1; arrInput.pop(); arrInputValue.pop(); } display(); } // End --> </script> </head> <body> <a href="javascript:addInput()">Add more input field(s)</a><br> <a href="javascript:deleteInput()">Remove field(s)</a><br> <input type="file" /><br> <input type="file" /><br> <input type="file" /><br> <p id="parah"></p> </body> </html>

    Read the article

  • html transparent background

    - by amarsh-anand
    I want to create a webpage with transparent background, a table and some text. I have seen posts related to this, but due to my lack of familiarity with css, I somehow cant get my code to work. I just want a transparent background, while this code is making everything transparent. Can someone kindly help. <html> <head><style type="text/css"> div.transbg {background-color:#4a6c9b; opacity:0.6;} </style></head> <div class="transbg"> <body><Center><font color="#FFFFFF"> <b>Toll Charges</b> <table bgcolor="#000000" cellspacing=3> <tr> <td bgcolor="#009900"><font color="#FFFFFF" align="left"> &nbsp; &nbsp;Class 2 inc Private&nbsp;</font></td> <td bgcolor="#009900"><font color="#FFFFFF" align="right"> &nbsp;A$ 4.95 &nbsp;</font></td> </tr> <tr> <td bgcolor="#009900"><font color="#FFFFFF" align="left"> &nbsp; &nbsp;Class 2 inc Commercial&nbsp;</font></td> <td bgcolor="#009900"><font color="#FFFFFF" align="right"> &nbsp;A$ 13.95 &nbsp;</font></td> </tr> </table> <br> Toll has to be paid within 48 hrs of passage, else an additional A$ 13.95 of administration charges would be added </font></Center> </div> </body> </html>

    Read the article

  • Script to dynamically change the source of an iframe tag

    - by Ukavi
    I want a code that will dynamically change the source of an iframe tag when a hyperlink is clicked for example I have one master page that should load content from other web pages using the iframe tag when a hyperlink is clicked but I don't know how to do it. Here is my code <html> <head> <title> </title> <style type="text/css"> #content{ margin-right:30%; margin-bottom: 10px; padding: 10px; border: 1px solid #000; margin-left:17%; background-repeat:no-repeat; width:686; height:640; } </style> <script type="text/javascript"> function hyperlinkChanger(hyperLink) { switch (hyperLink) { case "home": var url="home.html"; return url; break; case "about_Us": var url="about_us.html"; return url; break; case "contact_Us: var url="contact_us.html"; return url; break; } } </script> </head> <body> <a href="home.html" name="home" onClick="hyperlinkChanger('home')">Home</a> <br /> <a href="about_us.html" name="about_Us" onClick="hyperlinkChanger('about_Us')">About Us</a> <br /> <a href="contact_us.html" name="contact_Us" onClick="hyperlinkChanger('contact_Us')">Contact us</a> <br /> <div name="content"> <!--please help me write a method to call the output of the funcion hyperlinkChanger--> <iframe src="hyprlink function" width="600" height="300"> </iframe> </div> </body> </html>

    Read the article

  • Error in Print Function in Bubble Sort MIPS?

    - by m00nbeam360
    Sorry that this is such a long block of code, but do you see any obvious syntax errors in this? I feel like the problem is that the code isn't printing correctly since the sort and swap methods were from my textbook. Please help if you can! .data save: .word 1,2,4,2,5,6 size: .word 6 .text swap: sll $t1, $a1, 2 #shift bits by 2 add $t1, $a1, $t1 #set $t1 address to v[k] lw $t0, 0($t1) #load v[k] into t1 lw $t2, 4($t1) #load v[k+1] into t1 sw $t2, 0($t1) #swap addresses sw $t0, 4($t1) #swap addresses jr $ra #return sort: addi $sp, $sp, -20 #make enough room on the stack for five registers sw $ra, 16($sp) #save the return address on the stack sw $s3, 12($sp) #save $s3 on the stack sw $s2, 8($sp) #save Ss2 on the stack sw $s1, 4($sp) #save $s1 on the stack sw $s0, 0($sp) #save $s0 on the stack move $s2, $a0 #copy the parameter $a0 into $s2 (save $a0) move $s3, $a1 #copy the parameter $a1 into $s3 (save $a1) move $s0, $zero #start of for loop, i = 0 for1tst: slt $t0, $s0, $s3 #$t0 = 0 if $s0 S $s3 (i S n) beq $t0, $zero, exit1 #go to exit1 if $s0 S $s3 (i S n) addi $s1, $s0, -1 #j - i - 1 for2tst: slti $t0, $s1, 0 #$t0 = 1 if $s1 < 0 (j < 0) bne $t0, $zero, exit2 #$t0 = 1 if $s1 < 0 (j < 0) sll $t1, $s1, 2 #$t1 = j * 4 (shift by 2 bits) add $t2, $s2, $t1 #$t2 = v + (j*4) lw $t3, 0($t2) #$t3 = v[j] lw $t4, 4($t2) #$t4 = v[j+1] slt $t0, $t4, $t3 #$t0 = 0 if $t4 S $t3 beq $t0, $zero, exit2 #go to exit2 if $t4 S $t3 move $a0, $s2 #1st parameter of swap is v(old $a0) move $a1, $s1 #2nd parameter of swap is j jal swap #swap addi $s1, $s1, -1 j for2tst #jump to test of inner loop j print exit2: addi $s0, $s0, 1 #i = i + 1 j for1tst #jump to test of outer loop exit1: lw $s0, 0($sp) #restore $s0 from stack lw $s1, 4($sp) #resture $s1 from stack lw $s2, 8($sp) #restore $s2 from stack lw $s3, 12($sp) #restore $s3 from stack lw $ra, 16($sp) #restore $ra from stack addi $sp, $sp, 20 #restore stack pointer jr $ra #return to calling routine .data space:.asciiz " " # space to insert between numbers head: .asciiz "The sorted numbers are:\n" .text print:add $t0, $zero, $a0 # starting address of array add $t1, $zero, $a1 # initialize loop counter to array size la $a0, head # load address of print heading li $v0, 4 # specify Print String service syscall # print heading out: lw $a0, 0($t0) # load fibonacci number for syscall li $v0, 1 # specify Print Integer service syscall # print fibonacci number la $a0, space # load address of spacer for syscall li $v0, 4 # specify Print String service syscall # output string addi $t0, $t0, 4 # increment address addi $t1, $t1, -1 # decrement loop counter bgtz $t1, out # repeat if not finished jr $ra # return

    Read the article

  • Client side validation of multiple radio buttons groups

    - by absolutely-free
    This is my code: <html> <head> <title>scoreboard</title> <script> function calculate() { var sum=0; var total=0; for (var i=0; i < document.questions.group1.length; i++){ if (document.questions.group1[i].checked){ sum = parseInt(document.questions.group1[i].value) total = parseInt(total + sum);}} for (var i=0; i < document.questions.group2.length; i++){ if (document.questions.group2[i].checked){ sum = parseInt(document.questions.group2[i].value) total = parseInt(total + sum);}} for (var i=0; i < document.questions.group3.length; i++){ if (document.questions.group3[i].checked){ sum = parseInt(document.questions.group3[i].value) total = parseInt(total + sum);}} alert(total) } </script> </head> <body> <form name="questions"> A:<br> answer a1: <input type="radio" name="group1" value="0"> answer a2: <input type="radio" name="group1" value="1"> answer a3: <input type="radio" name="group1" value="2"> answer a4: <input type="radio" name="group1" value="3"><br> B:<br> answer b1: <input type="radio" name="group2" value="0"> answer b2: <input type="radio" name="group2" value="1"> answer b3: <input type="radio" name="group2" value="2"> answer b4: <input type="radio" name="group2" value="3"><br> C:<br> answer c1: <input type="radio" name="group3" value="0"> answer c2: <input type="radio" name="group3" value="1"> answer c3: <input type="radio" name="group3" value="2"> answer c4: <input type="radio" name="group3" value="3"><br><br> <input type="button" value="total" onclick="calculate()"> </form> </body> </html> How can I replace 'group[x]' in my code by a variable, so the three for-loops are replaced by one (because in reality there are a lot more questions and answers) ?

    Read the article

  • Writing to a comet stream using tomcat 6.0

    - by user301247
    Hey I'm new to java servlets and I am trying to write one that uses comet so that I can create a long polling Ajax request. I can successfully start the stream and perform operations but I can't write anything out. Here is my code: public class CometTestServlet extends HttpServlet implements CometProcessor { /** * */ private static final long serialVersionUID = 1070949541963627977L; private MessageSender messageSender = null; protected ArrayList<HttpServletResponse> connections = new ArrayList<HttpServletResponse>(); public void event(CometEvent cometEvent) throws IOException, ServletException { HttpServletRequest request = cometEvent.getHttpServletRequest(); HttpServletResponse response = cometEvent.getHttpServletResponse(); //final PrintWriter out = response.getWriter(); if (cometEvent.getEventType() == CometEvent.EventType.BEGIN) { PrintWriter writer = response.getWriter(); writer.println("<!doctype html public \"-//w3c//dtd html 4.0 transitional//en\">"); writer.println("<head><title>JSP Chat</title></head><body bgcolor=\"#FFFFFF\">"); writer.println("</body></html>"); writer.flush(); cometEvent.setTimeout(10 * 1000); //cometEvent.close(); } else if (cometEvent.getEventType() == CometEvent.EventType.ERROR) { log("Error for session: " + request.getSession(true).getId()); synchronized(connections) { connections.remove(response); } cometEvent.close(); } else if (cometEvent.getEventType() == CometEvent.EventType.END) { log("End for session: " + request.getSession(true).getId()); synchronized(connections) { connections.remove(response); } PrintWriter writer = response.getWriter(); writer.println("</body></html>"); cometEvent.close(); } else if (cometEvent.getEventType() == CometEvent.EventType.READ) { //handleReadEvent(cometEvent); InputStream is = request.getInputStream(); byte[] buf = new byte[512]; do { int n = is.read(buf); //can throw an IOException if (n > 0) { log("Read " + n + " bytes: " + new String(buf, 0, n) + " for session: " + request.getSession(true).getId()); } else if (n < 0) { //error(cometEvent, request, response); return; } } while (is.available() > 0); } } Any help would be appreciated.

    Read the article

  • IE8 isn't resizing tbody or thead when a column is hidden in a table with table-layout:fixed

    - by tom
    IE 8 is doing something very strange when I hide a column in a table with table-layout:fixed. The column is hidden, the table element stays the same width, but the tbody and thead elements are not resized to fill the remaining width. It works in IE7 mode (and FF, Chrome, etc. of course). Has anyone seen this before or know of a workaround? Here is my test page - toggle the first column and use the dev console to check out the table, tbody and thead width: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <title>bug</title> <style type="text/css"> table { table-layout:fixed; width:100%; border-collapse:collapse; } td, th { border:1px solid #000; } </style> </head> <body> <table> <thead> <tr> <th id="target1">1</th> <th>2</th> <th>3</th> <th>4</th> </tr> </thead> <tbody> <tr> <td id="target2">1</td> <td>2</td> <td>3</td> <td>4</td> </tr> </tbody> </table> <a href="#" id="toggle">toggle first column</a> <script type="text/javascript"> function toggleFirstColumn() { if (document.getElementById('target1').style.display=='' || document.getElementById('target1').style.display=='table-cell') { document.getElementById('target1').style.display='none'; document.getElementById('target2').style.display='none'; } else { document.getElementById('target1').style.display='table-cell'; document.getElementById('target2').style.display='table-cell'; } } document.getElementById('toggle').onclick = function(){ toggleFirstColumn(); return false; }; </script> </body> </html>

    Read the article

  • What are the benefits of prototypal inheritance over classical?

    - by Pierreten
    So I finally stopped dragging my feet all these years and decided to learn JavaScript "properly". One of the most head-scratching elements of the languages design is it's implementation of inheritance. Having experience in Ruby, I was really happy to see closures and dynamic typing; but for the life of me can't figure out what benefits are to be had from object instances using other instances for inheritance.

    Read the article

  • Popup browser incompability

    - by Cornelis
    I have a popup with drop down menus on it. I've scaled it down and simplified it for test purposes, but it still doesn't work the way I want/it should. <!DOCTYPE html> <html> <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script> <script type="text/javascript"> jQuery(document).ready(function(){ jQuery('.trigger').click(function(){ var picker = jQuery('.popup'); jQuery('<div></div>').css({ height: screen.height, width: screen.width, position: 'absolute', 'z-index': -1, top: picker.offset().top*-1, left: picker.offset().left*-1, border: '1px solid red' }).click(function(){ picker.trigger('focusout'); jQuery(this).hide(); }).prependTo(picker); picker.css('visibility', 'visible'); }); jQuery('.popup').live("focusout", function() { jQuery('.popup').fadeTo(500, 0.0, function() { jQuery('.popup').css('visibility', 'hidden'); jQuery('.popup').css('opacity', '1.0'); }); }); }); </script> </head> <body> <p> <input type=text class=trigger /> <div id=popup-div class=popup style="visibility: hidden; border: 1px solid red"> <select> <option>option1</option> </select> <p>Popup text</p> </div> </p> </body> When you click on the input field, a 'popup' appears, if you click outside the red border it fades away. If you click on the select option it shouldn't dissappear! However on this point, Chrome doesn't work the same as IE/FF/Opera/Safari, and makes the div dissappear. (Using Chrome 4.0.295.0) Does anybody knows a work-around for Chrome? Calling event.stopPropagation() on select elements did not work so far

    Read the article

  • Correct table layout generation with CSS: unexpected cells shift

    - by MrG
    I'm trying to generate a dynamic table using CSS: <html> <head> <style> div.el1, div.el2 { color:white; width:70px;height:70px; border:0px; padding:0px; font-size: 10px; font-family: "Courier"; } div.el1 { background-color: green; } div.el2 { background-color: orange; } div.tablediv { display: table; border:0px; border-spacing:0px; border-collapse:separate; } div.celldiv { display: table-cell; } div.rowdiv { display: table-row; width:auto; } </style> </head> <body> <div class="tablediv"> <div class="rowdiv"> <div class="celldiv"> <div class="el1" id="x1y1">ABC</div> </div> <div class="celldiv"> <div class="el2" id="x1y2"></div> </div> </div> <div class="rowdiv"> <div class="celldiv"> <div class="el1" id="x2y1"></div> </div> <div class="celldiv"> <div class="el1" id="x2y2"></div> </div> </div> </div> </body> </html> The content of body is dynamically generated and should be displayed as a table. Unfortunately, each cell shifts down if it contains data: expected reality --- --- --- --- | | | | | | --- --- |ABC|--- | | | | | | --- --- --- --- | | | --- --- I'm grateful for any help. Many thanks!

    Read the article

  • did you know some good web site about 'iphone css layouts' ,and can you help me to improve my code..

    - by zjm1126
    i want to create a webpage on iphone , but i can't complete it in a simple way, this is my code: <!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=5.0,user-scalable=yes"> </head> <body onorientationchange="updateOrientation();" onload=updateOrientation()> <div id="a"> <input id='ab' type="button" value="button" /> </div> <div id=b style="display: none">sssadwq dwqdqw</div> <style type="text/css"> *{ margin:0; padding:0; } /* Reposition on orientation change */ body.landscape{ height: 268px; } body.landscape #a{ height:134px; line-height:134px; } body.landscape #b{ height:114px; width:470px; } body{ height: 416px; } #a{ line-height:208px; height:208px; text-align:center; } #b{ height:198px; width:310px; background:red; border:5px solid black; } </style> <script src="jquery-1.4.2.js" type="text/javascript"></script> <script type="text/javascript"> function updateOrientation() { var orientation = window.orientation; switch (orientation) { // If we're horizontal case 90: case -90: // Set orient to landscape $(document.body).addClass("landscape"); break; // If we're vertical default: // Set orient to portrait $(document.body).removeClass("landscape"); break; } } $('#ab').click(function(){ if($('#b').css('display')=='none')$('#b').css('display','block') else $('#b').css('display','none') }) </script> </body> </html> it use much more fixed number,this is not the best way ,i think the best way is to use the percentage more and more, can you do it fo me ,, thanks

    Read the article

  • javascript simple object creation test: opera leaks?

    - by joe
    Hi, I am trying to figure out certain memory leak conditions in javascript on a few browsers. Currently I'm only testing FF 3.6, Opera 10.10, and Safari 4.0.3. I've started with a fairly simple test, and can confirm no memory leaks in Firefox and Safari. But Opera just takes memory and never gives it back. What gives? Here's the test: <html> <head> <script type="text/javascript"> window.onload = init; //window.onunload = cleanup; var a=[]; function init() { var d = document.createElement('div'); d.innerHTML = "page loading..."; document.body.appendChild(d); for (var i=0; i<400000; i++) { a[i] = new Obj("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"); } d.innerHTML = "PAGE LOADED"; } function cleanup() { for (var i=0; i<400000; i++) { a[i] = null; } } function Obj(msg) { this.msg=msg; } </script> </head> <body> </body> </html> I shouldn't need the cleanup() call on window.unload, but tried that also. No luck. As you can see this is simple JS, no circular DOM links, no closures. I monitor the memory usage using 'top' on Mac 10.4.11. Memory usage spikes up on page load, as expected. In FF and Safari reloading the page does not use any further memory, and all memory is returned when the window (tab) is closed. In Opera, memory spikes on load, and seems to also spike further on each reload (but not always...). But regardless of reload, memory never goes back down below the initial load spike. I had hoped this was a no-brainer test that all browsers would pass, so I could move on to more "interesting" conditions. Am I doing something wrong here? Or is this a known Opera issue? Thanks! -joe

    Read the article

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