Search Results

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

Page 59/260 | < Previous Page | 55 56 57 58 59 60 61 62 63 64 65 66  | Next Page >

  • Rails CSS not Loading using Heroku

    - by eWizardII
    I have the following site set up here on Heroku - http://www.peerinstruction.net/users/sign_up the issue is that I have updated the css yet it is not being actively reflected on the site, it just shows a textbox, with some edited/custom fonts. I have attached the css file in the following gist - https://gist.github.com/f74b626c54ecbb60bbde The signup page controller: !!! Strict %html %head %title= yield(:title) || "Untitled" = stylesheet_link_tag 'application', 'web-app-theme/base', 'web-app-theme/themes/activo/style', 'web-app-theme/override' = javascript_include_tag :defaults = csrf_meta_tag = yield(:head) %body #container #header %h1 %a{:href => "/"} Peer Instruction Network #user-navigation %ul.wat-cf %li .content.login .flash - flash.each do |type, message| %div{ :class => "message #{type}" } %p= message = form_for(resource, :as => resource_name, :url => session_path(resource_name), :html => { :class => "form login" }) do |f| .group.wat-cf .left= f.label :email, :class => "label right" .right= f.text_field :email, :class => "text_field" .group.wat-cf .left= f.label :password, :class => "label right" .right= f.password_field :password, :class => "text_field" .group.wat-cf .right %button.button{ :type => "submit" } Login /= link_to "Sign In", destroy_user_session_path #box = yield The signup pages haml file: %h2 .block .content.login .flash - flash.each do |type, message| %div{ :class => "message #{type}" } %p= message = form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f| = devise_error_messages! %div = f.label :firstname %br/ = f.text_field :firstname %div = f.label :middlename %br/ = f.text_field :middlename %div = f.label :lastname %br/ = f.text_field :lastname %div = f.label :email %br/ = f.email_field :email %div = f.label :password %br/ = f.password_field :password %div = f.label :academic %br/ = f.text_field :academic %div= f.submit "Continue" = render :partial => "devise/shared/links" I used web-app-theme to create an activo theme and then modify it.

    Read the article

  • Focus behavior in Applet-Javascript interaction

    - by Dan
    I have a web page with an applet that opens a popup window and also makes Javascript calls. When that Javascript call results in a focus() call on an HTML input, that causes the browser window to push itself in front of the applet window. But only on certain browsers, namely MSIE. On Firefox the applet window remains on top. How can I keep that behavior consistent in MSIE? Note that using the old Microsoft VM for Java also achieves the desired (applet window in front) result. HTML code: <html> <head> <script type="text/javascript"> function focusMe() { document.getElementById('mytext').focus(); } </script> </head> <body> <applet id="myapplet" mayscript code="Popup.class" ></applet> <form> <input type="text" id="mytext"> <input type="button" onclick="document.getElementById('myapplet').showPopup()" value="click"> </form> </body> </html> Java code: public class Popup extends Applet { Frame frame; public void start() { frame = new Frame("Test Frame"); frame.setLayout(new BorderLayout()); Button button = new Button("Push Me"); frame.add("Center", button); button.addActionListener(new ActionListener(){ public void actionPerformed(ActionEvent e) { frame.setVisible(false); } }); frame.pack(); } public void showPopup() { frame.setVisible(true); JSObject.getWindow(this).eval("focusMe()"); } }

    Read the article

  • ie7 preserve whitespace on dynamically injected text

    - by Rajat
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <script type="text/javascript"> function init(){ document.getElementById('test2').innerHTML = '1 2'; } </script> <style type="text/css"> #test{ white-space:pre; } #test2{ white-space:pre; } </style> <title></title> </head> <body onload="init();"> <div id="test"> 1 2 </div> <div id="test2"></div> </body> </html> Here is an example page showing my problem. I have two divs. Each has this text '1 2' with white-space. The only difference is that one is injected dynamically and one is in the html itself. If you open the above page in IE7, the text in div test2 doesn't respect white space. How can i get the same behavior for the text that is dynamically injected?? P.S. My doctype is triggering standards mode on IE7.

    Read the article

  • scrolling and css align with "right: 0px"

    - by Gabi
    Hello, In an HTML page, if I align some <div>s with "right: 0px", they all look very nice, as I expect. However, if I make the browser window smaller and the horizontal scroll bar appears, when I scroll the page to the right, I see an unexpected white space (instead of the background colors of my <div>s). It seems that my <div>s are aligned relative to the visible area of the page. See the sample code below: <html> <head> <style> <!-- #parent { position: absolute; left: 0px; right: 0px; top: 0px; bottom: 0px; background-color: yellow; } #child { position: absolute; left: 100px; top: 300px; width: 1000px; height: 400px; background-color: blue; } --> </style> </head> <body> <div id="parent"><div id="child">some text here</div></div> </body> </html> Is there any way to make the "right: 0px" property align the controls relative to the size of the entire page, not only the visible area? Thanks.

    Read the article

  • JW Player can not play m3u8 stream?

    - by why
    with check this example, http://developer.longtailvideo.com/player/branches/adaptive/test/provider.html , I tried the example myself, There is my code: <html> <head> <script type="text/javascript" src="jwplayer.js"></script> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> <title>Provider tests</title> <style> body { padding: 50px; font: 13px/20px Arial; background: #EEE; } form { margin-top: 20px; } #player { -webkit-box-shadow: 0 0 5px #999; background: #000; } ul { margin-top: 40px; padding: 0 0 0 20px; list-style-type: square; } </style> </head> <body> Test M3U8 <div id="player">You need Flash to play these tests</div> <script type="text/javascript"> jwplayer("player").setup({ file: '../m3u8/index.m3u8', flashplayer: 'player.swf', provider:'adaptiveProvider.swf', height: 360, width: 640 }); function loadStream(url) { jwplayer("player").load({file: url,provider: 'adaptiveProvider.swf'}); jwplayer("player").play(); return false; } $(document).ready(function() { loadStream('http://localhost/m3u8/index.m3u8'); }); </script> <ul id="streamlist"></ul> <div id="panel"></div> </body> </html> But the Jw Play can not work BTW: my vlc can play http://localhost/m3u8/index.m3u8 well

    Read the article

  • How to develop modular web UIs with Django?

    - by nh2
    When doing larger sites in "big business", you most probalbly work in a team with several developers. Let's say dev A makes a form to insert new user data, B creates a user list, C makes some privilege administration and D does crazy statistic graphs work with image generation and so on. Each dev begins to develop his own component, creates a view and a template and tests that independently, until each component works. Now, the client wants to have all those components on one bit HTML page. How to achieve this? How to assemble different views/templates in a form of composition so that they remain modular and can be developed and tested independently? It seems inheritance is not the way to go because all of those UI components are equal and there is no hierarchy. The idea of the assembling template is something like <html> <head> // include the css for the components and their assembly </head> <body> // include user data form here <some containers, images, and so on> // show user list // show privilege administration in this part // and finally, the nice statistic graphs // perhaps, we want to display some other components here in future </body> </html> I have not found an answer on the net yet. Most people come up with one big template which just implements all of the UI functionality, removing all modularity. Each component shall have its own template and view dealing only with that component developed by one person each, and they then shall be sticked together just like bricks. I would highly appreciate any hints!

    Read the article

  • Set value of hidden field in a form using jQuery's ".val()" doesn't work !

    - by texens
    I've been trying to set the value of a hidden field in a form using jQuery, but without success. Here is a sample code that explains the problem. If I keep the input type to "text", it works without any trouble. But, changing the input type to "hidden", doesn't work ! <html> <head> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript"> $(document).ready(function(){ $("button").click(function(){ $("input:text#texens").val("tinkumaster"); }); }); </script> </head> <body> <p>Name: <input type="hidden" id="texens" name="user" value="texens" /></p> <button>Change value for the text field</button> </body> </html> I also tried the following workaround, by setting the input type to "text" and then using a "display:none" style for the input box. But, this also fails ! It seems jQuery has some trouble setting hidden or invisible input fields. Any ideas? Is there a workaround for this that actually works? Thanking in anticipation

    Read the article

  • Site doesn't show up. Instead a bunch of weird characters?

    - by Richard Knop
    ‹?????혱jÃ0†w=Å=AÜ ÂЃ)ÅKGÅ:¢En%¹©ß¾²Ý 7xèpußøãŸ~ÝöÇ®Ömót¨•îŸû®©îao‚½‘Í:ºR†æk@´huõÃ(]­;z:¼•Íö¾þ{¥•‚¾ímwi£_±Ä1)–ÄÇ?‡‘,‰%Ž#YKF²Ä²Ä8ŒèKF²$–88ŒdI,qpÉ’Xâà0’%±Ä1Àaþe–TïÆOŒ@ 2^ßÇh"ù¦`Î!뜄yœ"Dü˜0e°Ó:ËË>e„ñʈfp.à(U®<œv¿ì;xñhRY3˜‹¡?ÞdŒ;Uºõ×R°WkÑ^Z÷¥¯Wß.Ò¤·?? That's exactly what shows up instead of my website in the web browser. Though on localhost the website works great. It's a Zend Framework based website, on localhost the output looks something like this (shortened version): <!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> <title>Title</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta http-equiv="Content-Style-Type" content="text/css" /> <meta http-equiv="Content-Language" content="en-US" /> </head> <body> <!-- LOTS OF HTML HERE --> </body> </html> What could cause this problem? It used to work before, this bug has only appeared today (or maybe already yesterday, I'm not sure).

    Read the article

  • Rails does not display error messages on a form in a custom method

    - by slythic
    Hi all, I've created a custom method called checkout in my app. I create an order (which is done my adding products to my "cart"), assign it to my client, and then I head to my checkout screen where I confirm the items and enter their customer order number and complete the order (submit). Everything works great except that it doesn't display error messages. I'm able to display a flash error notice (seen in complete_order method) when things go wrong but it doesn't specify the details like a normal form would. The error messages should appear if the customer order number is not unique for that client. Below is the custom method (checkout) related code. Order Model: validates_uniqueness_of :customer_order_number, :scope => :client_id Orders_controller: def checkout @order = current_order end def complete_order @order = current_order respond_to do |format| if @order.update_attributes(params[:order]) @order.complete #sets submitted datetime and state to 'complete' flash[:notice] = 'Thank you! Your order is being processed.' format.html { redirect_to( products_path ) } format.xml { head :ok } else flash[:error] = 'Please review your items' #added to confirm an error is present format.html { redirect_to( checkout_path ) } format.xml { render :xml => @order.errors, :status => :unprocessable_entity } end end end And the form in the checkout view: <% form_for @order, :url => { :controller => "orders", :action => "complete_order" } do |f| %> <%= f.error_messages %> <%= f.text_field :customer_order_number, :label => "Purchase Order Number" %> <p> <%= f.submit 'Complete Order', :confirm => 'Are you sure?' %> <small> or <%= link_to 'cancel', current_cart_path %></small> </p> <% end %> Any idea how I can display the specific error messages? Thank you in advance! -Tony

    Read the article

  • Change the content type of a pop up window.

    - by Oscar Reyes
    This question brought a new one: I have a html page and I need it to change the content type when the user press "save" button so the browser prompt to save the file to disk I've been doing this in the server side to offer "excel" versions of the page ( which is basically a html table ) <c:if test="${page.asExcelAction}"> <% response.setContentType("application/vnd.ms-excel"); %> What I'm trying to do now is to do the same, but in the client side with javacript but I can't manage to do it so. This is what I've got so far: <html> <head> <script> function saveAs(){ var sMarkup = document.getElementById('content').innerHTML; //var oNewDoc = document.open('application/vnd.ms-excel'); var oNewDoc = document.open('text/html'); oNewDoc.write( sMarkup ); oNewDoc.close(); } </script> </head> <body> <div id='content'> <table> <tr> <td>Stack</td> <td>Overflow</td> </tr> </table> </div> <input type="button" value="Save as" onClick="saveAs()"/> </body> </html>

    Read the article

  • MSIE8 compatibility mode not rendering dynamically created table

    - by KristoferA - Huagati.com
    A bit weird... ...if running in IE8 quirks mode, the table added by the following code doesn't render. Can anyone tell me why, because it is not obvious to me..? <html xmlns="http://www.w3.org/1999/xhtml"> <head> <script> function AddTable() { var table = document.createElement('table'); var row = document.createElement('tr'); table.appendChild(row); var cell = document.createElement('td'); cell.innerHTML='abc'; row.appendChild(cell); var divContainer = document.getElementById('divContainer'); divContainer.appendChild(table); } </script> </head> <body> <div id='divContainer'> </div> <input type='button' value='add table' onclick='javascript:AddTable()' /> </body> </html>

    Read the article

  • jQuery.clone() IE problem

    - by mofle
    I'm have some that uses jQuery.clone() to get the html of a page and then add it to a pre tag. It works correctly in Firefox and Chrome, but nothing happens in IE: <!DOCTYPE html> <html> <head> <script class="jsbin" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> <meta charset=utf-8 /> <title>JS Bin</title> <!--[if IE]> <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <script> $(function(){ $('button').click(function(){ var $clone = $('html').clone(); $('#output').text($clone.html()); }); }); </script> <style> article, aside, figure, footer, header, hgroup, menu, nav, section { display: block; } </style> </head> <body> <button>run test</button> <pre id="output"></pre> </body> </html> Is there any know bug with IE that prevents this, or am I doing something wrong? (I need to clone it because I'm doing some changes to it before outputting it)

    Read the article

  • JavaFX: JNLP file error

    - by jeff porter
    Hello everyone, I'm getting the following error when I upload a JavaFX app to a website, but I don't get it locally. I'm presuming that I'm missing something like the 'codebase' tag, but I'm not sure where it goes, can anyone help me out please? Java Console error: exception: JNLP file error: iShout_Foxpro_browser.jnlp. Please make sure the file exists and check if "codebase" and "href" in the JNLP file are correct.. java.io.FileNotFoundException: JNLP file error: iShout_Foxpro_browser.jnlp. Please make sure the file exists and check if "codebase" and "href" in the JNLP file are correct. at sun.plugin2.applet.JNLP2Manager.loadJarFiles(Unknown Source) at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Exception: java.io.FileNotFoundException: JNLP file error: iShout_Foxpro_browser.jnlp. Please make sure the file exists and check if "codebase" and "href" in the JNLP file are correct. HTML file source... <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>app_one</title> </head> <body> <script src="http://dl.javafx.com/1.3/dtfx.js"></script> <script> javafx( { archive: "app_one.jar", draggable: true, width: 480, height: 320, code: "app.Main", name: "app_one" } );

    Read the article

  • Cross browser's probelm to highlight option item as bold in form element "select".

    - by Vivek
    Hello All , I am facing one weird cross browsers problem i.e. I want to highlight some of the option items as bold by using CSS class in my form element "select". This all is working fine in firefox only but not in other browsers like safari , chrome and IE .Given below is the code. <html> <head> <title>MAke Heading Bold</title> <style type="text/css"> .mycss {font-weight:bold;} </style> </head> <body> <form name="myform"> <select name="myselect"> <option value="one">one</option> <option value="two" class="mycss">two</option> <option value="three" >Three </option> </select> </form> </body> </html> Please suggest me best possible solution for this . Thanks Vivek

    Read the article

  • User Control not loading based on location

    - by mwright
    I have an ASP.net MVC solution that uses nested master pages to load content. On the first Master page I load a header, then have the Content Placeholder, and then load a footer. This master page is referenced by another master page which adds some additional information based on the user being logged in or not. When I load a page that references these master pages, the header loads, but the footer does not. If I move the footer up above the Content Place Holder it loads into the page. Any ideas why this might be the case? The code for the master page that contains the footer is as follows: <%@ Master Language="C#" Inherits="System.Web.Mvc.ViewMasterPage" %> <!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> <asp:ContentPlaceHolder ID="TitleContent" runat="server" /> </title> </head> <body> <div class="header"> <% Html.RenderPartial("Header"); %> </div> <div> <asp:ContentPlaceHolder ID="MainContent" runat="server"> </asp:ContentPlaceHolder> </div> <div class="footer"> <% Html.RenderPartial("Footer"); %> </div> </body> </html>

    Read the article

  • Remove "Flash" between pages while using Internet Explorer modal boxes

    - by AaronS
    I have an internal web application, that is IE specific, and uses a lot of IE specific modal boxes: (window.showModalDialog). I recently received a request to remove the "flash" when navigating between pages of the site. To accomplish this, I just added a meta transition tag to my master page: <meta http-equiv="Page-Enter" content="blendTrans(duration=0.0)" /> This works perfectly except for the modal boxes. When you launch a modal box, and then move it around, the web page behind it keeps a trail of the modal box instead of re-drawing the web page content. This prevents the user from moving the modal box to read anything that was behind it. Is there a way to prevent the "flash" between pages in an IE specific site and have the site still work with modal boxes? Please note, this is a large and complex site, so re-architecting it to not use modal boxes isn't an option. This is an asp.net, c# web application, and all of my users are using IE 7 and IE 8 if it makes any difference. -Edit- To duplicate this, put the following into an html page, and open it in Internet Explorer: <html> <head> <title>Test</title> <meta content="blendTrans(duration=0.0)" http-equiv="Page-Exit"> </head> <body> <script language="javascript"> window.showModalDialog('modal.htm', window); </script> </body> </html>

    Read the article

  • Help with MySQL Query using CASE statement

    - by hairdresser-101
    I am trying to group a number of customers together based on their "Head Office" or "Parent" location. THis works ok except for a flaw which I didn't forsee when I was developing my system... For customers that did not have a "Parent" (standalone business) I defaulted the parent_id to 0. Therefore, my data would look like this: id parent_id customer 1 0 CustName#1 2 4 CustName#2 - Melbourne 3 4 CustName#2 - Sydney 4 0 CustName#2 (Head Office) What I want to do is Group my results together so that I have one row for CustName#1 and one row for CustName#2 BUT my problem is that there is no parent record for parent_id=0 and these rows are being excluded when using an inner join. I've tried using a case statement but that is not working either (parents are still being ignored) Any help would be greatly appreciated. Here is my query (My CASE is basically trying to get the business_name from the customer table based on the parent_id EXCEPT when the parent_id = 0, THEN just use the customer_name that is listed in the job_summary table): SELECT js.month_of_year, (CASE js.parent_id WHEN 0 THEN js.customer_name ELSE c.business_name END) as customer, SUM(js.jobs), SUM(js.total_cost), sum(js.total_sell) FROM JOB_SUMMARY js INNER JOIN customer c on js.parent_id=c.id group by js.month_of_year, (CASE c.parent_id WHEN 0 THEN js.customer_name ELSE c.business_name END) ORDER BY `customer` ASC

    Read the article

  • Javascript force GC collection? / Forcefully free object?

    - by plash
    I have a js function for playing any given sound using the Audio interface (creating a new instance for every call). This works quite well, until about the 32nd call (sometimes less). This issue is directly related to the release of the Audio instance. I know this because I've allowed time for the GC in Chromium to run and it will allow me to play another 32 or so sounds again. Here's an example of what I'm doing: <html><head> <script language="javascript"> function playSound(url) { snd = new Audio(url); snd.play(); delete snd; snd = null; } </script> </head> <body> <a href="#" onclick="playSound('blah.mp3');">Play sound</a> </body></html> I also have this, which works well for pages that have less than 32 playSound calls: var AudioPlayer = { cache: {}, play: function(url) { if (!AudioPlayer.cache[url]) AudioPlayer.cache[url] = new Audio(url); AudioPlayer.cache[url].play(); } }; But this will not work for what I want to do (dynamically replace a div with other content (from separate files), which have even more sounds on them - 1. memory usage would easily skyrocket, 2. many sounds will never play). I need a way to release the sound immediately. Is it possible to do this? I have found no free/close/unload method for the Audio interface. The pages will be viewed locally, so the constant loading of sounds is not a big factor at all (and most sounds are rather short).

    Read the article

  • Using layout view in Express with Consolidate and Mustache

    - by Raphael Caixeta
    I just started going through Node using Express and finally got Consolidate JS working properly to use Mustache as the templating view system per the instructions on the Consolidate JS Github page. Mustache is loading properly, but I'm now wondering how to include the layout file along in the rendering of the template. The default Jade system loads the content of the .render method inside of the layout.jade file. I'm just wondering how to do the same, but with Mustache. Any help is greatly appreciated! Code: index.js exports.index = function(req, res){ res.render('index', { title: "Work pl0x?" }); }); index.mustache Welcome to {{title}} I just want the index.mustache content to come in the "{{content}}" portion of the code below (layout.mustache). How can I do this? <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="UTF-8" /> <title>Project Name | {{title}}</title> <link href="/stylesheets/style.css" rel="stylesheet" /> </head> <body> {{content}} </body> </html>

    Read the article

  • Removing specific XML tags

    - by iTayb
    I'd like to make an application that removes duplicates from my wpl (Windows PlayList) files. The wpl struct is something like this: <?wpl version="1.0"?> <smil> <head> <meta name="Generator" content="Microsoft Windows Media Player -- 11.0.5721.5145"/> <meta name="AverageRating" content="55"/> <meta name="TotalDuration" content="229844"/> <meta name="ItemCount" content="978"/> <author/> <title>english</title> </head> <body> <seq> <media src="D:\Anime con 2006\Shits\30 Seconds to Mars - 30 Seconds to Mars\30 Seconds to Mars - Capricorn.mp3" tid="{BCC6E6B9-D0F3-449C-91A9-C6EEBD92FFAE}" cid="{D38701EF-1764-4331-A332-50B5CA690104}"/> <media src="E:\emule.incoming\Ke$ha - Coming Unglued.mp3" tid="{E2DB18E5-0449-4FE3-BA09-9DDE18B523B1}"/> <media src="E:\emule.incoming\Lady Gaga - Bad Romance.mp3" tid="{274BD12B-5E79-4165-9314-00DB045D4CD8}"/> <media src="E:\emule.incoming\David Guetta -Sexy Bitch Feat. Akon.mp3" tid="{46DA1363-3DFB-4030-A7A9-88E13DF30677}"/> </seq> </body> </smil> This looks like standard XML file. How can I load the file and get the src value of each media tag? How can I remove specific media, in case of duplicates? Thank you very much.

    Read the article

  • Web Deployment Project failed to map path for include virtual

    - by Duke
    I am building my site with a web deployment project but the build fails with a number of errors all relating to the "#include virtual" directives in my master page. The includes are necessary to import a set of centrally managed html template files. Here is an example of the include directive and associated error: <!-- #include virtual="/v3/sits/pdpdev/assets-templates/inc/head.html" --> /PDPRegistration.csproj/Pages/ContentPage.Master(15): error ASPPARSE: Failed to map the path '/v3/sits/pdpdev/assets-templates/inc/head.html'. The error for each included file actually appears multiple times. I'm not sure what is being mapped or why, but this was never a problem until I started using WDP (which I wanted to alter web.config depending on the build environment, among other things.) The project is built locally on my PC and then copied to the web server via a mapped drive. I found a few solutions on the 'net involving IIS metabase - they weren't quite clear to me, and I'm not sure if they apply given how I build and deploy the project (that is, would I have to build on the same system as IIS in order to make use of the metabase?) Can anyone suggest how I can get my project to build with WDP?

    Read the article

  • onclick event in dropdown

    - by raam
    <html> <head> </style> <script type="text/javascript"> function ram(){ document.write("Hello World!") alert("ok"); } </script> </head> <body> <select id="country"> <option value="India" id="101" onfocus="ram()">India</option> <option value="Autralia" id="102" onClick="ram();">Autralia</option> <option value="England" id="103" onfocus="ram();">England</option> <option value="Ameriaca" id="104" onfocus="ram();">Ameriaca</option> <option value="Pakistan" selected="selected" id="105" onfocus="ram();" >Pakistan</option> </select> </body> </html> In this above code the event will not fire for dropdown. I try by using focus and click event. I can I do this and I want 1 more thing if I select dropdown value as India, I want to create a dropdown with state (elements are TN, DL, etc) updation.

    Read the article

  • unable to compile a servlet in ubuntu

    - by codeomnitrix
    I am newbie to j2ee. I have download and installed j2eesdk-1_4_03-linux.bin in my ubuntu 10.04 distribution. and then i tried to code my first servlet in it as: import java.io.*; import javax.servelet.*; import javax.servelet.http.*; public class HowdyServelet extends HttpServelet{ public void doGet(HttpServeletRequest request, HttpServeletResponse response) throws IOException, ServeletException{ PrintWriter out = response.getWriter(); response.setContentType("text/html"); out.println("<html>"); out.println("<head><title>howdy</title></head>"); out.println("<body>"); out.println("<center><h1>Howdy</h1></center>"); out.println("</body>"); out.println("</html>"); } } and here are the environment variables i set after installation: 1. J2EE_HOME=/home/vinit/SUNWappserver 2. JAVA_HOME=/home/vinit/SUNWappserver/jdk 3. CLASSPATH=/home/vinit/SUNWappserver/lib and now i tried to compile the servlet using javac HowdyServelet.java But i got following errors: HowdyServelet.java:2: package javax.servelet does not exist import javax.servelet.*; ^ HowdyServelet.java:3: package javax.servelet.http does not exist import javax.servelet.http.*; ^ HowdyServelet.java:5: cannot find symbol symbol: class HttpServelet public class HowdyServelet extends HttpServelet{ ^ HowdyServelet.java:6: cannot find symbol symbol : class HttpServeletRequest location: class HowdyServelet public void doGet(HttpServeletRequest request, HttpServeletResponse response) throws IOException, ServeletException{ ^ HowdyServelet.java:6: cannot find symbol symbol : class HttpServeletResponse location: class HowdyServelet public void doGet(HttpServeletRequest request, HttpServeletResponse response) throws IOException, ServeletException{ ^ HowdyServelet.java:6: cannot find symbol symbol : class ServeletException location: class HowdyServelet public void doGet(HttpServeletRequest request, HttpServeletResponse response) throws IOException, ServeletException{ ^ 6 errors So how to compile this servlet. Thanks in advance.

    Read the article

  • Redeclared javascript global variable overrides old value in IE

    - by Yousuf Haider
    (creating a separate question after comments on this: http://stackoverflow.com/questions/2634410/javascript-redeclared-global-variable-overrides-old-value) I am creating a globally scoped variable using the square bracket notation and assigning it a value inside an external js file. In another js file I declare a var with the same name as the one I just created above. Note I am not assigning a value. Since this is a redeclaration of the same variable the old value should not be overriden as described here: http://www.w3schools.com/js/js_variables.asp Create 2 javascript files with the following content : Script1 //create global variable with square bracket notation window['y'] = 'old'; Script2 //redeclaration of the same variable var y; if (!y) y = 'new'; alert(y); //shows New instead of Old in IE Include these 2 files in your html file <html> <head></head> <body> <script type="text/javascript" src="my.js"></script> <script type="text/javascript" src="my2.js"></script> </body> </html> Opening this page in Firefox and Chrome alerts 'old' which is the expected behavior. However in IE 8 the page will actually alert 'new' Any ideas on why this happens on IE ?

    Read the article

  • How do I get the element after my horizontal css navigation bar to appear below it?

    - by Curyous
    I'm using a css unordered list to make a site navigation bar, using display: inline, display: block, and float: left. The next element that I put after the navigation bar is placed to the right of it. How can I align the next element so that it is displayed below? The html: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd"> <html> <head> <link type="text/css" rel="stylesheet" href="/stylesheets/test.css" /> </head> <body> <div> <ul class="nav"> <li class="nav"><a class="nav" href="#">One1</a></li> <li class="nav"><a class="nav" href="#">Two</a></li> <li class="nav"><a class="nav" href="#">Three</a></li> <li class="nav"><a class="nav" href="#">Four</a></li> </ul> </div> <div><h2>Heading</h2></div> </body> </html> The css: ul.nav, ul li.nav { display: inline; margin: 0px; padding: 0px; } ul.nav { list-style-type: none; } li.nav { display: block; float: left; background-color: red; } a.nav { background-color: green; padding: 10px; margin: 0px; } a:hover.nav { background-color: gray; }

    Read the article

< Previous Page | 55 56 57 58 59 60 61 62 63 64 65 66  | Next Page >