Search Results

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

Page 38/260 | < Previous Page | 34 35 36 37 38 39 40 41 42 43 44 45  | Next Page >

  • Can't access variables from dynamically loaded javascript

    - by Menno
    I'm using a fairly simple system to load javascript dynamically: include = function (url) { var e = document.createElement("script"); e.src = url; e.type="text/javascript"; document.getElementsByTagName("head")[0].appendChild(e); }; Let's say I have a file test.js which has the following contents: var foo = 4; Now, in my original script, I want to use include(test.js); console.log(foo); However, I get a 'foo has not been defined' error on this. I'm guessing it has to do with the dynamic script being included as the last child of the <head> tag. How can I get this to work?

    Read the article

  • The function client side is not working properly...

    - by jagdeep
    <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>Untitled Page</title> <script type="text/javascript"> function abc() { return confirm('are U sure?'); } </script> </head> <body> <form id="form1" runat="server"> <div> <asp:Button ID="Button1" runat="server" Text="Button" OnClientClick="abc()" onclick="Button1_Click" style="height: 26px" /> </div> </form> </body> </html> In the above page whether U click ok or cancel for confirmation box the processing transfer for server why?

    Read the article

  • Extract IP address from an html string (python)

    - by GoJian
    My Friends, I really want to extract a simple IP address from a string (actually an one-line html) using Python. But it turns out that 2 hours passed I still couldn't come up with a good solution. >>> s = "<html><head><title>Current IP Check</title></head><body>Current IP Address: 165.91.15.131</body></html>" -- '165.91.15.131' is what I want! I tried using regular expression, but so far I can only get to the first number. >>> import re >>> ip = re.findall( r'([0-9]+)(?:\.[0-9]+){3}', s ) >>> ip ['165'] In fact, I don't feel I have a firm grasp on reg-expression and the above code was found and modified from elsewhere on the web. Seek your input and ideas!

    Read the article

  • DOM Level 3 CustomEvents not bubbling on WebKit

    - by Edu Felipe
    I'm observing CustomEvents not bubbling, even though I set bubbling to true. The code below: var evt = document.createEvent("CustomEvent") evt.initCustomEvent("mycustomevent", true, false) var someh1 = document.getElementById("someh1") someh1.addEventListener("mycustomevent", function(){ alert("OMG!"); }) document.getElementsByTagName("body")[0].dispatchEvent(evt) With the HTML below: <html> <head></head> <body> <h1 id="someh1">content!</h1> </body> </html> Never shows the alert, demonstrating that the event is not bubbling down. Am I doing something wrong? Please note that if I do a getElementById("someh1") and run the dispatchEvent on it, the alert is displayed. Thanks!

    Read the article

  • Howto get iframe linking to internal document source using javascript/jQuery?

    - by Tom
    Hi there, I have an iframe with id "appframe", the source is page.html and it's on the same server. I want to get the source of the page using jQuery. alert($("#appframe").contents().find("html").html()); returns <head></head><body></body> even though the document does not contain those tags, it only contains "Default page", so that is exactly what it should return. Any idea how to get the right source script of the whole document using jQuery? Eg. if the document would be "test" then that is exactly what it should return. Please note: I did ask this before a few weeks ago. Unfortunately, I got no solving answer. Because of my lower reputation (~85), I can not request a bounty... This doesn't make much sense to me. Anyway, it forced me to repost this question.

    Read the article

  • Vertical positioning of text in table cell

    - by Robert
    When I place an image followed by text in a table cell, the vertical alignment of the text shifts down compared to text in adjacent cells. I tried using a line-height CSS property, but it didn't seem to have an affect. In the following example, I need "123 Description" to be flush with "cell one." Also, there is a space between the image and "123" by default. How can I adjust that - negative margins perhaps? <html <head <style type="text/css" table { border-collapse: collapse; } td { border: thin solid; width: 10em;} /* .adjust-text { line-height: 1.3em; } */ </style </head <body <table <tbody <tr <tdcell one</td <td <img src="small-star.png" / <span class="adjust-text"123 Description</span </td </tr </tbody </table </body </html

    Read the article

  • External Javascript file fails to receive variables from previous javascript block

    - by Franc
    I've been searching the net for several hours and can't find an answer in the whole "external js file"-jungle. I hope you guys can help! In short: My external javascript file doesn't seem to get the variables which I defined in the main.php file.. On main.php I define php variables and "transform" them into javascript variables <head>... <script type="text/javascript"> var phpmain_img = <?php echo json_encode($main_img); ?>; var phpvar1_large = <?php echo json_encode($var1_large); ?>; var phpvar2_large = <?php echo json_encode($var2_large); ?>; var phpvar3_large = <?php echo json_encode($var3_large); ?>; var phpvar4_large = <?php echo json_encode($var4_large); ?>; </script> ... <script language="javascript" type="text/javascript" src="/wshop/ext.js"></script> </head> In my ext.js file I want to process those variables. In the ext.js file I defined a the function swapImage() that will be used back in the main PHP: var imgArray = new Array( phpmain_img, phpvar1_large, phpvar2_large, phpvar3_large ); function swapImage(imgID) { var theImage = document.getElementById('theImage'); var newImg; newImg = imgArray[imgID]; theImage.src = newImg; } function preloadImages() { for(var i = 0; i < imgArray.length; i++) { var tmpImg = new Image; tmpImg.src = imgArray[i]; } } Result: The swapImage() in the main.php... doesnt work <div id="image"> <img id="theImage" src="<?=$main_img; ?>" alt="" /> </div> <div id="thumbs"> <?php echo "<img src=\"<$main_img_small\" alt=\"\" onmouseover=\"swapImage(0);\">"; echo "<img src=\"$var1_small\" alt=\"\" onmouseover=\"swapImage(1);\">"; echo "<img src=\"$var2_small\" alt=\"\" onmouseover=\"swapImage(2);\">"; echo "<img src=\"$var3_small\" alt=\"\" onmouseover=\"swapImage(3);\">"; ?> <br /> </div> Any help is greatly appreciated! UPDATE: I don't get a specific error, the swapImage functions doesn't work at mouseover. However, I tried to output the variables with e.g. document.write(phpimg_main) but nothing appears which makes me believe that there's something wrong with the handing over of the variables... here's the source code browser output `<html> <head> <link href="../demo.css" rel="stylesheet" type="text/css" /> <style type="text/css"> .... </style> <script type="text/javascript"> var phpmain_img = {"0":"http:\/\/path\/to\/main\/image.jpg"}; var phpvar1_large = {"0":"http:\/\/path\/to\/image1.jpg"}; var phpvar2_large = {"0":"http:\/\/path\/to\/image2.jpg"}; var phpvar3_large = null; var phpvar4_large = null; </script> <script language="javascript" type="text/javascript" src="/wshop/ext.js"></script> </head> <body onload="preloadImages()"> <div id="image"> <img id="theImage" src="http://path-to-main-image.jpg" alt="" /> </div> <div id="thumbs"> <img src="http://path-to-main-image.jpg" alt="" onmouseover="swapImage(0);"><img src="http://path-to-image1.jpg" alt="" onmouseover="swapImage(1);"><img src="http://path-to-image2.jpg" alt="" onmouseover="swapImage(2);"> <br /> </div> </body> `

    Read the article

  • Firefox is occasionally breaking the back button.

    - by Webjedi
    Having a really frustrating time with Firefox and the back button...given this simple ASP form: <head> <title>Form 1</title> </head> <body> <form action="form2.asp" method="post"> Enter some text:<input type="text" name="thetext" id="thetext"> <input type="submit" id="submit" name="submit"> </form> </body> </html> Firefox (3.6.3) will occasionally clear the value of the text box after hitting submit and then the back button. It's unpredictable when it will strike. And it will work for dozens to hundreds of times, and then all of a sudden it stops working. Any ideas where I should start?

    Read the article

  • Unable to fetch Json data from remote url

    - by user3772611
    I am cracking my head to solve this thing. I am unable to fetch the JSON data from remote REST API. I need to fetch the JSOn data nd display the "html_url" field from the JSON data on my website. I saw that you need the below charset and content type for fetching JSON. <html> <head> <meta charset="utf-8"> <meta http-equiv="content-type" content="application/json"> </head> <body> <p>My Instruments page</p> <ul></ul> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"></script> <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script> <script type="text/javascript" src="http://code.jquery.com/jquery-1.11.0.min.js"></script> <script type="text/javascript"> $(document).ready(function () { alert("Inside the script"); $.getJSON(" https://pki.zendesk.com/api/v2/help_center/sections/200268985/articles.json", function (obj) { alert("Inside the getJSON"); $.each(obj, function (key, value) { $("ul").append("<li>" + value.html_url + "</li>"); }); }); }); </script> </body> </html> I referred to following example on jsfiddle http://jsfiddle.net/2xTjf/29/ The "http://date.jsontest.com" given in this example also doesn't work in my code. The first alert is pops but not the other one. I am a novice at JSON/ Jquery. i used jsonlint.com to find if it has valid JSON, it came out valid. I tested using chrome REST client too. What am I missing here ? Help me please ! Thanks in anticipation.

    Read the article

  • Nginix upstream with socket seems filter some meta contents?

    - by Cheng
    I have a Rails3 app in the backend, served by ruby server Thin. If I run and map thin as a socket server unix:/tmp/thin.draft.sock; Some meta data in the HTML will be missing. <script src="/javascripts/application.js?1269808943" type="text/javascript"></script> </head> But it should be <script src="/javascripts/application.js?1269808943" type="text/javascript"></script> <meta name="csrf-param" content="authenticity_token"/> <meta name="csrf-token" content="TPEA0Xa92wnPWnRLf+iUTk..."/> </head> If I run and map Thin at some port, it's all correct. server 127.0.0.1:3000; Wired problem. I'm going to check with Thin and Nginx. Any ideas?

    Read the article

  • Does a servlet knows the encoding of the sent form that specified using http-equiv?

    - by Daziplqa
    Does a servlet knows the encoding of the sent form that specified using http-equiv? When I specify an encoding of a POSTed form using http-equiv like that: <HTML> <head> <meta http-equiv='Content-Type' content='text/html; charset=gb2312'/> </head> <BODY > <form name="form" method="post" > <input type="text" name="v_rcvname" value="????"> </form> </BODY> </HTML> And then at the servlet I use the method, request.getCharacterEncoding() I got null ! So, Is there a way that I can tell the server that I am encoding the data in some char encoding??

    Read the article

  • jQueryUI widgets

    - by cf_PhillipSenn
    How do I work with widgets? Here's what I've got so far: <html> <head> <script src="http://www.google.com/jsapi"></script> <script type="text/javascript"> google.load("jquery", "1"); google.load("jqueryui", "1"); </script> </head> <body> <div class="ui-widget"> <div class="ui-widget-header"> header </div> <div class="ui-widget-content"> content </div> </div> </body> </html> I'm trying to make a nice little div with a shaded header.

    Read the article

  • How to select parent object of a hyperlink whose href match the requested page/file name using jQuer

    - by ARS
    How to select parent object of a hyperlink whose href match the requested page/file name using jQuery? I have following code <div> <div class="menu-head"> <a href="empdet.aspx">employees</a> <a href="custdet.aspx">customers</a> </div> <div class="menu-head"> <a href="depdet.aspx">departments</a> </div> <div> I want a Jquery to change the color of the parent div corresponding a hyperlink. If the user is browsing custdet.aspx the respective parent div background should be changed to red. Edit: I have a method to retrieve the file name. I just need the right selector to select the parent.

    Read the article

  • How we can execute a javascript function and get a return value in our android application?

    - by JAC
    How we can execute a javascript function and get a return value in our android appplication ? We have a javascript file that stored in our sqlite db, We want to execute that script on a button press event, we need to pass parameters to the script and get return values, how we can implement this? sample script file stored in Db is, <html><head><title>ADV</title><script type="text/javascript"> function checkName(pname) if( pname == 'android') { return false; }else { return true; } } </script></head><body></Body></html>

    Read the article

  • How can I send an html email with perl?

    - by alexBrand
    I am trying to send an HTML email using perl. open(MAIL,"|/usr/sbin/sendmail -t"); ## Mail Header print MAIL "To: $to\n"; print MAIL "From: $from\n"; print MAIL "Subject: $subject\n\n"; ## Mail Body print MAIL "Content-Type: text/html; charset=ISO-8859-1\n\n<html><head></head><body>@emailBody"; close(MAIL) Is that the correct way of doing it? It is not working for some reason. Thanks for your help.

    Read the article

  • html embeded php code not executing when hosted on iis

    - by Jack
    <HTML> <HEAD> <META NAME="GENERATOR" Content="Microsoft Visual Studio .NET 7.1"> <TITLE></TITLE> </HEAD> <BODY> <?php echo '<p>Hello World</p>'; ?> </BODY> When I run the above code in browser, firefox render it like this Hello World '; ? I am doing my coding in Windows XP/IIS 5.1. I have PHP setup correctly because i have no problem running .php file. The problem seem to me that IIS can't render php code embedded inside html. Does anyone know how to fix this problem or should i switch to Apache?

    Read the article

  • .replace method in jquery

    - by amit
    i want to replace class me to old when user clicks on a tag, i want to do that only with .replace function. My purpose to learn how replace method work. But the function which i have made not working. <head> <script type="text/javascript" src="jquery-1.7.2.js"></script> <script type="text/javascript"> $(function(){ $('a').click(function(){ $(this).attr('class').replace('me','old') }) }) </script> </head> <body> <a href="#" class="me">click</a> </body>

    Read the article

  • Can someone help me understand why this is happening?

    - by Juan Manuel Formoso
    I just run into the weirdest thing I've ever encounter. Consider this test page: <html xmlns="http://www.w3.org/1999/xhtml" > <head> <title></title> <script language=javascript> function test(myParameter) { alert(myParameter); } </script> </head> <body> <input type="button" value="Strange" onclick="javascript: test(044024);" /> <input type="button" value="Ok" onclick="javascript: test('044024');" /> </body> </html> If I click the "strange" button, I get 18452, if I click the "ok" button I get 044024 Does anyone know what is happening and explain it to me?

    Read the article

  • Javascript: why I cannot load my external js page in Drupal ?

    - by Patrick
    hi, when I add the tag script to load an external javascript file, my page is not longer displayed. There are not error in Firebug, there are not errors such as "File not found" or "Not enough permissions", the browser just displays a blank page for some reason. <?php print $head; ?> <?php print $styles; ?> <?php print $scripts; ?> <script type="text/JavaScript" src="main.js" /> If I remove the last line everything works perfectly. The previous php lines are the standard Drupal head lines. This is the content of my js file: $(document).ready( function() { alert("hello"); }); thanks

    Read the article

  • Warning: session_start(): Cannot send session cache limiter - headers already sent

    - by shyam
    I am receiving this warning in a page while I try starting the session. <?php session_start(); ?> <!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> <title>Video</title> </head> -this is the part of the code. There are no characters (not even space) before the first line. This page is reached after logging in from another page, through redirection. Any help? (PHP version is 5.2)

    Read the article

  • I want to store a php $_SESSION variable and retrieve it on another page.

    - by CDeanMartin
    <?php session_start(); // store session data $_SESSION['count']=0; ?> <html><head></head> <body> <?php include ("getElement.php"); echo getLinkButton("myscript.php", "myscript.php"); echo $_SESSION['count']++; ?> </body> </html> The code above works, but when I click the link to navigate to myscript.php: <?php echo $_SESSION['count']; ?> I get this error: Undefined variable: _SESSION in /home/ubuntu/public_html/myscript.php on line 2

    Read the article

  • How to make IE and Firefox display hidden elements the same (IE shifts visible element)

    - by Dale
    Rendering the same html in IE and Firefox gives me a different result because in IE, the hidden checkbox is not ignored, from a layout perspective: <html><head> <style type="text/css"> <!-- #checkboxhide { position: relative; visibility: hidden; font-size: 8.5pt; font-weight: font-family: verdana;} //--> </style> </head><body> <table><tr> <td>|</td> <td><span id="checkboxhide"><input type="checkbox" hidden="" name="blah"></span>|Greetings Earthings</td> </tr></table> </body></html> How can I get the two (or more) browsers to show the same thing?

    Read the article

  • html-embedded php code not executing when hosted on iis

    - by Jack
    <HTML> <HEAD> <META NAME="GENERATOR" Content="Microsoft Visual Studio .NET 7.1"> <TITLE></TITLE> </HEAD> <BODY> <?php echo '<p>Hello World</p>'; ?> </BODY> </HTML> When I run the above code in a browser, firefox renders it like this: Hello World '; ?> I am doing my coding in Windows XP/IIS 5.1. I have PHP set up correctly because I have no problem running .php files. The problem, it seems to me, is that IIS can't render php code embedded inside html. Does anyone know how to fix this problem or should i switch to Apache?

    Read the article

< Previous Page | 34 35 36 37 38 39 40 41 42 43 44 45  | Next Page >