Search Results

Search found 30326 results on 1214 pages for 'html encode'.

Page 111/1214 | < Previous Page | 107 108 109 110 111 112 113 114 115 116 117 118  | Next Page >

  • jQuery class selector and click()

    - by Anonymous
    I'm currently trying to get an alert to happen when something is clicked. I can get it working in jsFiddle, but not in production code: jsFiddle example that works (jQuery 1.5 loaded) HTML (in case jsFiddle is inaccessible): <!DOCTYPE HTML><html><head><title>Test</title></head> <body> <h1>25 Feb 2011</h1><h3>ABC</h3><ul> <li class="todoitem">Test&mdash;5 minutes</li> </ul> </body></html> Javascript: $(".todoitem").click(function() { alert('Item selected'); }); Non-working production example: <!DOCTYPE HTML><html><head><title>Test</title> <script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.5.1.min.js" type="text/javascript"></script> <script type="text/javascript"> $(".todoitem").click(function() { alert('Item selected'); }); </script> </head> <body> <h1>25 Feb 2011</h1><h3>ABC</h3><ul><li class="todoitem">Test&mdash;5 minutes</li></ul> </body> </html> Safari's Inspector indicate that jQuery is being loaded correctly, so that's not the issue. As far as I can tell, these two pieces of code are essentially identical, but the latter isn't working. Can anyone see what I've done wrong?

    Read the article

  • Add a banner at the top on unknown HTML page on the fly; Send a note to network user

    - by Vi
    I want to be able to send messages to users of network that my computer routes to. Modifying requested pages, by adding messages like Warning: this access point is going down soon" or Network quota exhausted or You are overusing the network connection and may be banned or Security notice: this is unencrypted network, so everybody around can see this page too It seems the only good solution (as there is no general "Send notice to users of my access point" thing). All traffic is already routed through -j REDIRECT, socat and remote SOCSK5 server, so intercepting unencrypted content should be easy. How it's better to add a message? Just inserting <div style="color:white; background-color:red">Sorry, connect_me access point is going down soon...</div> as the first element of <body> breaks design of some pages (f.e. Wikipedia). Should I also add some "Cache-control" directive to prevent persisting such messages? /* smdclient messages are poor solution, as them are Windows-only and can disturb users not using the network */

    Read the article

  • jQuery .load() call doesn't execute javascript in loaded html file

    - by Mike
    This seems to be a problem related to Safari only. I've tried 4 on mac and 3 on windows and am still having no luck. What I'm trying to do is load an external html file and have the Javascript that is embedded execute. The code I'm trying to use is this: $("#myBtn").click(function() { $("#myDiv").load("trackingCode.html"); }); trackingCode.html looks like this (simple now, but will expand once/if I get this working): <html> <head> <title>Tracking HTML File</title> <script language="javascript" type="text/javascript"> alert("outside the jQuery ready"); $(function() { alert("inside the jQuery ready"); }); </script> </head> <body> </body> </html> I'm seeing both alert messages in IE (6 & 7) and Firefox (2 & 3). However, I am not able to see the messages in Safari (the last browser that I need to be concerned with - project requirements - please no flame wars). Any thoughts on why Safari is ignoring the Javascript in the trackingCode.html file? Eventually I'd like to be able to pass Javascript objects to this trackingCode.html file to be used within the jQuery ready call, but I'd like to make sure this is possible in all browsers before I go down that road. Thanks for your help!

    Read the article

  • Need url's to be non secure when moving away from a secured link (without hardcoded url's in html)?

    - by Tony_Henrich
    I have an asp.net site. It has an order form which is accessible at https://secure.example.com/order.aspx. The links on the site do not include the domain name. So for example the home page is 'default.aspx'. The issue is that if I click on a link like the home page from the secure page, the url becomes https://secure.example.com/default.aspx instead of http://www.example.com/default.aspx. What's a good way to handle this? The scheme should automatically work using any domain name based on where it's launched from. So if the site is launched from 'localhost', moving away from the secured page, the url's should be http://localhost/... The navigation links are in a master page.

    Read the article

  • how to send the value of "text box" even if it is grayed out/disabled in HTML?

    - by mujahid
    I m doing like this in java script : document.getElementById(XYZ).value = '32768'; document.getElementById(ABC).value = '32768 '; document.getElementById(XYZ).disabled = true; document.getElementById(ABC).disabled = true; when i m pressing submit it gives "0" as value. BUT i want to retrieve above values. @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ readOnly is an option but it changes the FONT COLOUR from gray to black, but i want gray colored text in readOnly textbox any help!!!! thanx !!!

    Read the article

  • How to update a number in html via javascript?

    - by Will Merydith
    After a voter votes, I want to update the count. <form class="vote-form" action=""> <div id="{{key}}" class="vote-count">{{votes}}</div> <input class="vote-button" type="submit" class="text-button" value="vote+"/> <input type="hidden" class="brag" name="brag" value="{{key}}"> <input type="hidden" class="voter" name="voter" value="{{current_user.fb_id}}"> </form> <script type="text/javascript"> $(function() { $('.error').hide(); $(".vote-form").submit(function() { var inputs = $(this).find('input:hidden'); var key = $('input.brag', this).val(); $.ajax({ type: "POST", url: "/bean", data: inputs, success: function() { //not sure how to do this, I want to increment {{votes}} $('#' + key).innerHTML = "foo"; } }); return false; }); }); </script>

    Read the article

  • How to fix the size of the <html:select> combo box (contents may be larger but the combo size should

    - by DSB
    Hello all , How to fix the size of the combo box (contents may be larger but the combo size should be fixed).Now my combo size is changed based on the items in the combo. I'm trying to get something similar to the yahoo sign up page security Question combo: https://edit.yahoo.com/registration?.src=fpctx&.intl=in&.done=http://in.yahoo.com/ my code: Text which decides the size of the combo

    Read the article

  • Why ajax doesn't work unless I refresh or use location.href?

    - by Connor Tang
    I am working on a html project, which will eventually package by Phonegap. So I am trying to encode the data from html form to JSON format, then use ajax send to a php file resides on server, and receive the response to do something else. Now I use <a href='login.html'> in my index.html to open the login page. In my login page, I have this <script> $(document).ready(function(e) { $('#loginform').submit(function(){ var jData = { "email": $('#emailLogin').val(), "password": $('#Password').val()}; $.ajax({ url: 'PHP/login.php', type:'POST', data: jData, dataType: 'json', async: false, error: function(xhr,status){ //reload(); location.href='index.html'; alert('Wrong email and password'); }, success: function(data){ if(data[1] == 1){ var Id_user = data[0]; location.href='loginSuccess.html'; } } }); }); }); </script> to send my data to server. But I found that it won't work, it's still in the login page. I tried to enter data and submit again, it's still nothing happen. Until I refresh the login page and enter data again, it can give an error message or go to the loginsuccess page. However, when I use <script> function loadLogin(){ location.href='login.html'; } </script> to open the login page, everything works well. So what cause this? How can I modify this piece of code to make it better?

    Read the article

  • Can i rename a file when the user does save as? HTML

    - by acidzombie24
    I use url rewriting and one of my urls is /blah/file ILLEGAL CHARS.jpg ILLEGAL CHARS are names not valid on windows such as * and may confuse servers even after escaping such as ? and /. I know i still cant save filenames as / and ? but certain characters i would like to let through. How can i give a new filename when the user right clicks and selects save as? i'm using asp.net

    Read the article

  • Most effecient way to create a "slider" timeline in HTML, CSS, and JavaScript?

    - by ZapChance
    Alright, so here's my dilemma. I've got these two "slides" lined up, one ready to be passed into view. I have it working and all, but I can scroll over to the right to see the second slide! How could I have it you can only view the one slide? JavaScript used: function validate(form) { var user = form.username.value; var pass = form.password.value; if(user === "test") { if(pass === "pass") { var hideoptions = {"direction" : "left", "mode" : "hide"}; var showoptions = {"direction" : "left", "mode" : "show"}; /*$("#loginView").toggle("slide", hideoptions, 1000, function() { $("#loginView").css("margin-left", "100%"); }); $("#mainView").toggle("slide", showoptions, 1000, function() { $("#mainView").css("margin-left", 0); });*/ $("#loginView").animate({ marginLeft: "-100%" }, 1000); $("#mainView").animate({ marginLeft: "0" }, 1000); } else { alert("nope"); } } else { alert("nope 2"); } } As you can see here @ http://jsfiddle.net/D7Va3/1/ (JSFiddle), once you enter "test" and "pass", then click enter, the tiles slide. But. If you reload, you can see that you can scroll to the right of the screen and view the second slide prematurely, which is just not going to work for me. I still need to achieve the same seamless transition, but you must only be able to view one slide at a time. Also, I plan to expand with more slides, so if you're feeling lucky today, I'd really love to see an example of how I could support multiple frames. I'm very new to JavaScript (yet I know syntax rules, and general coding knowledge from other languages), so the better you explain, the more knowledgeable I can be, and I'd be very grateful for that. Thanks in advance!

    Read the article

  • How do I line up my textboxes without using a table? html/css

    - by SLC
    I want to display Name [Textbox] Age: [Textbox] BlahBlahCatfish: [Textbox] but if I simply plonk the code in, it gets lined up exactly as its lined up above. What I want is for it to be lined up like this: Name: [Textbox] Age: [Textbox] BlahBlahCatfish: [Textbox] Ordinarly I would use a Table but I am trying to get out of that habit and use lovely CSS. Ideas of how to do this without billions of divs and stuff?

    Read the article

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