Search Results

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

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

  • jQuery Lightbox Clone is not initialising properly

    - by Neurofluxation
    Hey, I have the following function on an onClick call: function addComment() { jQuery.noConflict() jQuery('head').append('<link rel="stylesheet" media="screen" type="text/css" href="colorbox/colorbox-images.css" />'); //this doesn't add correctly. jQuery.fn.colorbox({inline:false, href:'boxes/add-comment.html'}); return false; }; However, the STYLESHEET append line doesn't seem to initialise properly. Screenshots below:

    Read the article

  • Element to string in HTMLDocument

    - by kalpesh
    i have a Element object its a HTMLDocument object and i want to string value of this element. i want this result Christina Toth, Pharm. D. ======================= plz see below code. public static void main(String args[]) throws Exception { InputStream is = Nullsoft.getInputStream(); InputStreamReader isr = new InputStreamReader(is); BufferedReader br = new BufferedReader(isr); HTMLEditorKit htmlKit = new HTMLEditorKit(); HTMLDocument htmlDoc = (HTMLDocument) htmlKit.createDefaultDocument(); HTMLEditorKit.Parser parser = new ParserDelegator(); HTMLEditorKit.ParserCallback callback = htmlDoc.getReader(0); parser.parse(br, callback, true); // Parse ElementIterator iterator = new ElementIterator(htmlDoc); Element element; while ((element = iterator.next()) != null) { AttributeSet attributes = element.getAttributes(); Object name = attributes.getAttribute(StyleConstants.NameAttribute); if ((name instanceof HTML.Tag) && ((name == HTML.Tag.DIV) || (name == HTML.Tag.H2) || (name == HTML.Tag.H3))) { StringBuffer text = new StringBuffer(); int count = element.getElementCount(); for (int i = 0; i < count; i++) { Element child = element.getElement(i); AttributeSet childAttributes = child.getAttributes(); // if (childAttributes.getAttribute(StyleConstants.NameAttribute) == HTML.Tag.CONTENT) { int startOffset = child.getStartOffset(); int endOffset = child.getEndOffset(); int length = endOffset - startOffset; text.append(htmlDoc.getText(startOffset, length)); } } System.out.println(name + ": " + text.toString()); } } System.exit(0); } public static InputStream getInputStream() { String text = "<html>\n" + "<head>\n" + "<title>pg_0001</title>\n" + "\n" + "<style type=\"text/css\">\n" + ".ft3{font-style:normal;font-weight:bold;font-size:11px;font-family:Helvetica;color:#000000;}\n" + "</style>\n" + "</head>\n" + "<body vlink=\"#FFFFFF\" link=\"#FFFFFF\" bgcolor=\"#ffffff\">\n" + "\n" + "\n" + "<div style=\"position:absolute;top:597;left:252\"><nobr><span class=\"ft3\">Christina Toth, Pharm. D.</span></nobr></div>\n" + "\n" + "\n" + "</body>\n" + "</html>"; InputStream is = null; try { is = new ByteArrayInputStream(text.getBytes("UTF-8")); } catch (UnsupportedEncodingException e) { e.printStackTrace(); } return is; }

    Read the article

  • Why does my JSF + Spring web application output JSF source code instead of interpreted HTML page?

    - by Corvus
    I'm new to both JSF and Spring Framework and I'm trying to figure out how to make them work together. My current problem is that application outputs my JSF files without interpreting them. Here are some snippets of my code which I believe might be relevant: dispatcher-servlet.xml <bean id="urlMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping"> <property name="mappings"> <props> <prop key="login.htm">loginController</prop> </props> </property> </bean> <bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver" p:prefix="/WEB-INF/pages/" p:suffix=".xhtml" /> <bean name="loginController" class="controller.LoginController" /> loginController public class LoginController extends MultiActionController { public ModelAndView login(HttpServletRequest request, HttpServletResponse response) throws Exception { System.out.println("LOGIN"); return new ModelAndView("login"); } WEB-INF/pages/login.xhtml <?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>#{message.log}</title> </h:head> <h:body> <h:form> <h:outputLabel value="#{message.username}" for="userName"> <h:inputText id="userName" value="#{User.name}" /> </h:outputLabel> <h:commandButton value="#{message.loggin}" action="#{User.login}" /> </h:form> </h:body> </html> Any ideas where the problem might be? Does this code make any sense at all? I'm well aware of fact, that probably completely sucks and I'll be glad to here WHY it sucks and how to make it better. Thanks :)

    Read the article

  • git filter-branch chmod

    - by Evan Purkhiser
    I accidental had my umask set incorrectly for the past few months and somehow didn't notice. One of my git repositories has many files marked as executable that should be just 644. This repo has one main master branch, and about 4 private feature branches (that I keep rebased on top of the master). I've corrected the files in my master branch by running find -type f -exec chmod 644 {} \; and committing the changes. I then rebased my feature branches onto master. The problem is there are newly created files in the feature branches that are only in that branch, so they weren't corrected by my massive chmod commit. I didn't want to create a new commit for each feature branch that does the same thing as the commit I made on master. So I decided it would be best to go back through to each commit where a file was made and set the permissions. This is what I tried: git filter-branch -f --tree-filter 'chmod 644 `git show --diff-filter=ACR --pretty="format:" --name-only $GIT_COMMIT`; git add .' master.. It looked like this worked, but upon further inspection I noticed that the every commit after a commit containing a new file with the proper permissions of 644 would actually revert the change with something like: diff --git a b old mode 100644 new mode 100755 I can't for the life of me figure out why this is happening. I think I must be mis-understanding how git filter-branch works. My Solution I've managed to fix my problem using this command: git filter-branch -f --tree-filter 'FILES="$FILES "`git show --diff-filter=ACMR --pretty="format:" --name-only $GIT_COMMIT`; chmod 644 $FILES; true' development.. I keep adding onto the FILES variable to ensure that in each commit any file created at some point has the proper mode. However, I'm still not sure I really understand why git tracks the file mode for each commit. I had though that since I had fixed the mode of the file when it was first created that it would stay that mode unless one of my other commits explicit changed it to something else. That did not appear to the be the case. The reason I thought that this would work is from my understanding of rebase. If I go back to HEAD~5 and change a line of code, that change is propagated through, it doesn't just get changed back in HEAD~4.

    Read the article

  • strange error in haskell about indentation of if-then-else

    - by Drakosha
    I have the following code: foo :: Int -> [String] -> [(FilePath, Integer)] -> IO Int foo _ [] _ = return 4 foo _ _ [] = return 5 foo n nameREs pretendentFilesWithSizes = do result <- (bar n (head nameREs) pretendentFilesWithSizes) if result == 0 then return 0 -- <========================================== here is the error else foo n (tail nameREs) pretendentFilesWithSizes I get an error on the line with the comment above, the error is: aaa.hs:56:2: parse error (possibly incorrect indentation) I'm working with emacs, there's no spaces, and i do not understand what did i do wrong.

    Read the article

  • Access <script> tag from codebehind

    - by Hoque
    I was trying to access existing within Head tag. What I was doing to achieve that, foreach (Control ctrl in Header.Controls) { Response.Write(lc.GetType() + "<br/>"); } It gives me the reference of "title", "meta" and "literal" control. How can I get the control and get the "src" attribute of that tag.

    Read the article

  • How do I display a jquery dialog box before the entire page is loaded?

    - by obarshay
    On my site a number of operations can take a long time to complete. When I know a page will take a while to load, I would like to display a progress indicator while the page is loading. Ideally I would like to say something along the lines of: $("#dialog").show("progress.php"); and have that overlay on top of the page that is being loaded (disappearing after the operation is completed). Coding the progress bar and displaying progress is not an issue, the issue is getting a progress indicator to pop up WHILE the page is being loaded. I have been trying to use JQuery's dialogs for this but they only appear after the page is already loaded. This has to be a common problem but I am not familiar enough with JavaScript to know the best way to do this. Here's simple example to illustrate the problem. The code below fails to display the dialog box before the 20 second pause is up. I have tried in Chrome and Firefox. In fact I don't even see the "Please Wait..." text. Here's the code I am using: <html> <head> <link type="text/css" href="http://jqueryui.com/latest/themes/base/ui.all.css" rel="stylesheet" /> <script type="text/javascript" src="http://jqueryui.com/latest/jquery-1.3.2.js"></script> <script type="text/javascript" src="http://jqueryui.com/latest/ui/ui.core.js"></script> <script type="text/javascript" src="http://jqueryui.com/latest/ui/ui.dialog.js"></script> </head> <body> <div id="please-wait">My Dialog</div> <script type="text/javascript"> $("#please-wait").dialog(); </script> <?php flush(); echo "Waiting..."; sleep(20); ?> </body> </html>

    Read the article

  • Space in DIV ??

    - by alex
    Hello all, Is it possible to avoid the spaces X & Y (see image)? There is no padding in CSS! <html> <head> <title>Prova WIDGET</title> <link rel="stylesheet" href="jquery-ui-1.8.1.custom/css/ui-lightness/jquery-ui-1.8.1.custom.css" type="text/css"> <script src="jquery-ui-1.8.1.custom/development-bundle/jquery-1.4.2.js" type="text/javascript"></script> <script src="jquery-ui-1.8.1.custom/js/jquery-ui-1.8.1.custom.min.js" type="text/javascript"></script> <script type="text/javascript"> $(themify); function themify(){ $("#pulsante").addClass("ui-button ui-button-text-only ui-widget ui-state-default ui-corner-all"); //ui-button-text } </script> <style>#test{display:none}</style> <script type="text/javascript"> function rendiVisibile(){ if(document.getElementById("test").style.display = "none"){ $("#test").css({"width":"100px","float":"right","text-align":"center"}); $("#test").show("slide",{},1000); } } </script> </head> <body> <h2 class="ui-widget-header">Tentativo widget con DIV</h2> <form action=""> <input type="button" value="Submit" id="pulsante" onclick="rendiVisibile()";><br/></br> <div id="test" class="ui-widget ui-widget-content ui-corner-all"> <h3 class="ui-widget-header ui-corner-all">CIAO</h3> <p class="ui-widget-content ui-corner-all">Un saluto</p> </div> </form> </body> </html>

    Read the article

  • ASP.NET MVC - Do stylesheets have to go in the Site.Master file?

    - by Darcy
    Hi all, I noticed that I cannot add stylesheets on any page. They must be added to the master page. I already have about 15 stylesheets in the master view, which seems like overkill, since only some of the pages use a certain stylesheet. I imagine I could reference the file via javascript (although, I can't think of how off the top of my head), but it would be really nice to not have to use any.

    Read the article

  • (Rails) Assert_Select's Annoying Warnings

    - by CalebHC
    Does anyone know how to make assert_select not output all those nasty html warnings during a rake test? You know, like this stuff: .ignoring attempt to close body with div opened at byte 1036, line 5 closed at byte 5342, line 42 attributes at open: {"class"=>"inner02"} text around open: "</script>\r\t</head>\r\t<body class=\"inner02" text around close: "\t</div>\r\t\t\t</div>\r\t\t</div>\r\t</body>\r</ht" Thanks

    Read the article

  • How can I get jquery to toggle-fade a flashcard div open and closed on click?

    - by Edward Tanguay
    What do I have to change to the code below in order for the user to click on a flashcard header to open and close the flashcard answer? I couldn't get toggle() to work with fadein/fadeout the version below doesn't respond to the click code: <!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"> <head> <script type="text/javascript" src="http://www.google.com/jsapi"></script> <script type="text/javascript"> google.load("jquery", "1.4.1"); google.setOnLoadCallback(function() { $("div > div.question").click(function() { if($(this).next().is(":hidden") { $(this).next().fadeIn("slow"); } else { $(this).next().fadeOut("slow"); } }); }); </script> <style> div.flashcard { margin: 0 10px 10px 0; } div.flashcard div.question { background-color:#ddd; width: 400px; padding: 5px; cursor: hand; cursor: pointer; } div.flashcard div.answer { background-color:#eee; width: 400px; padding: 5px; display: none; } </style> </head> <body> <div id="1" class="flashcard"> <div class="question">Who was Wagner?</div> <div class="answer">German composer, conductor, theatre director and essayist, primarily known for his operas (or "music dramas", as they were later called). Unlike most other opera composers, Wagner wrote both the music and libretto for every one of his works.</div> </div> <div id="2" class="flashcard"> <div class="question">Who was Thalberg?</div> <div class="answer">a composer and one of the most distinguished virtuoso pianists of the 19th century.</div> </div> </body> </html>

    Read the article

  • How to create 2 different scripts for 2 browsers (IE+all the rest)

    - by Barnabas Nagy
    I'm trying to solve an IE CSS issue by using conditional tags. My jQuery that does the job of tabbed box effect calls an id that is inside the conditional tags. I've given new ids to IE so on IE the jQuery is not working. I tried to duplicate the script with the new id in one of the script but the 2 scripts seems to get in conflict. My jQuery (in between the head tags) is (for all all browsers except IE): <script> var currentTab = 0; // Set to a different number to start on a different tab. function openTab(clickedTab) { var thisTab = $(".tabbed-box .tabs a").index(clickedTab); $(".tabbed-box .tabs li a").removeClass("active"); $(".tabbed-box .tabs li a:eq("+thisTab+")").addClass("active"); $(".tabbed-box .tabbed-content").hide(); $(".tabbed-box .tabbed-content:eq("+thisTab+")").show(); currentTab = thisTab; } $(document).ready(function() { $(".tabs li:eq(0) a").css("border-left", "none"); $(".tabbed-box .tabs li a").click(function() { openTab($(this)); return false; }); $(".tabbed-box .tabs li a:eq("+currentTab+")").click() }); </script> And I would need this for IE: <script> var currentTab = 0; // Set to a different number to start on a different tab. function openTab(clickedTab) { var thisTab = $(".tabbed-box .tabs a").index(clickedTab); $(".tabbed-box ie-.tabs li a").removeClass("active"); $(".tabbed-box ie-.tabs li a:eq("+thisTab+")").addClass("active"); $(".tabbed-box .tabbed-content").hide(); $(".tabbed-box .tabbed-content:eq("+thisTab+")").show(); currentTab = thisTab; } $(document).ready(function() { $(".ie-tabs li:eq(0) a").css("border-left", "none"); $(".tabbed-box .ie-tabs li a").click(function() { openTab($(this)); return false; }); $(".tabbed-box .ie-tabs li a:eq("+currentTab+")").click() }); </script> Having the 2 scripts in the head conflicts with each other. Maybe there is a way to combine them?

    Read the article

  • Javascript not getting keyDown input

    - by William
    For some reason my code just isn't wanting to fire off any kind of OnKeyDown event. I don't know why. Can anyone tell me what I'm doing wrong? <!DOCTYPE html> <html lang="en"> <head> <title>Canvas test</title> <meta charset="utf-8" /> <link href="/bms/style.css" rel="stylesheet" /> <style> body { text-align: center; background-color: #000000;} canvas{ background-color: #ffffff;} </style> <script type="text/javascript"> var x = 50; var y = 250; var speed = 5; function controls(event){ if(!e){ //for IE e = window.event; } if(e.keyCode==37){//keyCode 37 is left arrow x -= speed; } if(e.keyCode==39){ //keyCode 39 is right arrow x += speed; } if(e.keyCode==38){//keyCode 37 is up arrow y -= speed; } if(e.keyCode==40){ //keyCode 39 is down arrow y += speed; } } function update(){ document.onkeydown="controls(event);"; draw(); } function draw(){ var canvas = document.getElementById('screen1'); if (canvas.getContext){ var ctx = canvas.getContext('2d'); ctx.fillStyle = 'rgba(255,255,255,0.5)'; ctx.fillRect(0,0,500,500); ctx.fillStyle = 'rgb(236,138,68)'; ctx.fillRect(x,y,25,25); } } setInterval('update();', 1000/60); </script> </head> <body> <canvas id="screen1" width="500" height="500"></canvas> </body> </html>

    Read the article

  • Phonegap web view thinks device screen taller than it is - results in offscreen tabbar

    - by Stin
    I have a jQTouch application loaded via server, so all I need to do is display the webpage full screen in PhoneGap for a faux-Native app. Unfortunatley each solution I've tried in PhoneGap has an issue: it thinks the screen size is taller than it is. This resuls in the tabbar that is pinned to the bottom being permantly offscreen and there fore unusable. You should be able to recreate this with my code below and going to the iTabbar online demo. Any thoughts on how to correct this issue? For background, going to the app page in iOS safari works fine, as well as saving the page to the home screen. In both cases the webview stops at the bottom of the screen and the tabbar is therefore viewable. Also, I'm using build.phonegap.com to compile (I'm not compiling locally) I've tried two methods: load the childBrowser plugin and call up the page (with navbar hidden via options) set the following config.xml parameter to prevent phonegap from switching to Safari, and then just load the link (preferable as it's cleaner in my mind. I've pasted my index.html and config.xml below) Details on the config.xml paramater: Open all links in WebView stay-in-webview with values true or false example: <preference name="stay-in-webview" value="true" /> if set to true, all links (even with target set to blank) will open in the app's webview only use this preference if you want pages from your server to take over your entire app default is false (Source: https://build.phonegap.com/docs/config-xml) my index.html: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta http-equiv="Content-type" content="text/html;charset=utf-8"> <title>MyApp</title> <script src="phonegap.js"></script> </head> <body> <p><a href="http://www.itabbar.com/itabbar/demo.html#home">Launch iTabbar</a></p> </body> </html> my config.xml: <?xml version="1.0" encoding="UTF-8" ?> <widget xmlns = "http://www.w3.org/ns/widgets" xmlns:gap = "http://phonegap.com/ns/1.0" id = "com.phonegap.myapp" versionCode="10" version = "1.0.0"> <!-- versionCode is optional and Android only --> <name>MyApp</name> <description> My app is... </description> <author href="https://myurl.com" email="[email protected]"> me </author> <preference name="stay-in-webview" value="true" /> </widget>

    Read the article

  • jQuery Validation plugin, IE7 "SCRIPT3: Member not found"

    - by jkinz
    I have the following: <html> <head> </head> <body> <div> <form method="post"> <div id="questions"> <label for="question-6">Name of Course:</label> <input type="text" name="name_of_course[response]" value="" id="question-6" class="required"> <label class="control-label" for="reporting-year">Reporting Year: </label> <select name="reporting_year" id="reporting-year"> <option value="-1" selected="selected">Select option...</option> <option value="4">2013-2014</option> <option value="1">2012-2013</option> <option value="2">2011-2012</option> <option value="3">2010-2011</option> </select> </div> <input type="submit" name="submit" value="Save Entry" class="btn"> </form> </div> <script src="//code.jquery.com/jquery.js"></script> <script src="//ajax.aspnetcdn.com/ajax/jquery.validate/1.10.0/jquery.validate.min.js"></script> <script> $(function(){ jQuery.validator.addMethod("notEqual", function(value, element, param) { return this.optional(element) || value !== param; }, "Please select an option"); $('form').validate({ rules:{ 'reporting_year': { notEqual: "-1" } } }); }); </script> </body> </html> Everyone's favorite browser, IE7 (IE10 w/compatibility really) is reporting the following error in the console: SCRIPT3: Member not found. jquery.js, line 2525 character 4 Of course IE8 and above work fine, but my client is using IE7.

    Read the article

  • JQuery Cycle, how can I change from image to div?

    - by vick
    <!doctype html> <html> <head> <title>JQuery Cycle Plugin - Example Slideshow</title> <style type="text/css"> .slideshow { height: 232px; width: 232px; margin: auto } .slideshow img { padding: 15px; border: 1px solid #ccc; background-color: #eee; } </style> <!-- include jQuery library --> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script> <!-- include Cycle plugin --> <script type="text/javascript" src="http://cloud.github.com/downloads/malsup/cycle/jquery.cycle.all.2.74.js"></script> <!-- initialize the slideshow when the DOM is ready --> <script type="text/javascript"> $(document).ready(function() { $('.slideshow').cycle({ fx: 'shuffle' // choose your transition type, ex: fade, scrollUp, shuffle, etc... }); }); </script> </head> <body> <div class="slideshow"> <img src="http://cloud.github.com/downloads/malsup/cycle/beach1.jpg" width="200" height="200" /> <img src="http://cloud.github.com/downloads/malsup/cycle/beach2.jpg" width="200" height="200" /> <img src="http://cloud.github.com/downloads/malsup/cycle/beach3.jpg" width="200" height="200" /> </div> </body> </html> How can I make this exact scroller work with divs instead of img?? basically, I want to use <div> etc etc etc </div> instead of: <img src="http://cloud.github.com/downloads/malsup/cycle/beach3.jpg" width="200" height="200" />

    Read the article

  • Cannot export a fusionchart with 'Embedding Charts Using <OBJECT>/<EMBED> Tags'

    - by zoom_pat277
    I am trying to export a fusion chart created using 'Embedding Charts Using / Tags'. Export works just perfect with the right click (on the chart) and chose a pdf to export. But I am not able to make this work via javascript. I have a button outside the chart which upon clicking calls the function below function myexport() { var object = getChartFromId('myChartid'); if( object.hasRendered() ) object.exportChart({exportFormat: 'PDF'}); } the object above returned is null and this fails on the next line here is the full prototype <html> <head> <title>My Chart</title> <script type="text/javascript" src="fusionCharts.debug.js"></script> <script type="text/javascript" src="fusionChartsExportComponent.js"></script> <script type="text/javascript"> function ExportMyChart() { var cObject = getChartFromId('Column3D'); if( cObject.hasRendered() ) cObject.exportChart({exportFormat: 'PDF'}); } </script> </head> <body> <object width="400" height="400" id="Column3D" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" > <param name="testname" value="Column3D.swf" /> <param name="FlashVars" value="&dataURL=testData.xml&chartWidth=400&chartHeight=300&DOMId=myChart1&registerWithJS=1&debugMode=0"> <param name="quality" value="high" /> <embed src="Column3D.swf" flashVars="&dataURL=testData.xml&chartWidth=400&chartHeight=300&DOMId=myChart1&registerWithJS=1&debugMode=0" width="400" height="300" name="Column3D" quality="high" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /> </object> <!-- We also create a DIV to contain the FusionCharts client-side exporter component --> <div id="holderDiv" align="center">FusionCharts Export Handler Component</div> <script type="text/javascript"> var myExportComponent = new FusionChartsExportObject("testExporter1", "FCExporter.swf"); //Render the exporter SWF in our DIV fcexpDiv myExportComponent.Render("holderDiv"); </script> <input type="button" value="Export My Chart" onclick="ExportMyChart()" />

    Read the article

  • PHP - Cannot modify header information...

    - by Scott W.
    Hi, I am going crazy with this error: Cannot modify header information - headers already sent by... Please note that I know about the gazillion results on google and on stack overflow. My problem is the way I've constructed my pages. To keep html separate from php, I use include files. So, for example, my pages look something like this: <?php require_once('web.config.php'); ?> <!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>Login</title> <link rel="shortcut icon" href="images/favicon.gif"/> <link rel="shortcut icon" href="images/favicon.ico"/> <link rel="stylesheet" type="text/css" href="<?php echo SITE_STYLE; ?>"/> </head> <body> <div id="page_effect" style="display:none;"> <?php require_once('./controls/login/login.control.php'); ?> </div> </body> </html> So, by the time my php file is included, the header is already sent. Part of the include file looks like this: // redirect to destination if($user_redirect != 'default') { $destination_url = $row['DestinationUrl']; header('Location:'.$user_redirect); } elseif($user_redirect == 'default' && isset($_GET['ReturnURL'])) { $destination_url = $_GET['ReturnURL']; header('Location:'.$destination_url); } else { header('Location:'.SITE_URL.'login.php'); } But I can't figure out how to work around this. I can't have the header redirect before the output so having output buffering on is the only thing I can do. Naturally it works fine that way - but having to rely on that just stinks. It would be nice if PHP had an alternative way to redirect or had additional parameters to tell it to clear the buffer.

    Read the article

  • Meta tag og:title inside Facebook Application is ignored

    - by Militaru
    I have a Facebook Application with an iframe based canvas that contains a like button (also iframe), in the head of my iframe i've specified the standard meta tags (og:title, og:url, og:site_name) and they seem to work fine (the information is displayed correctly in the profile wall) except for the title. I've tested various links of the app with the Facebook URL Linter and the ug:title tag is ignored completly. Have any of you had any trouble with the open graph tags inside facebook applications? Any ideeas are apreciated, thanks.

    Read the article

  • JavaScript tags, performance and W3C

    - by Thomas
    Today I was looking for website optimization content and I found an article talking about move JavaScript scripts to the bottom of the HTML page. Is this valid with W3C's recommendations? I learned that all JavaScript must be inside of head tag... Thank you.

    Read the article

  • JQuery selfbuild plugin question - default value is overwritten.

    - by Bruno
    Hi jQuery ninjas. I need your help. I have made a really clean and simple example to illustrate my problem. I have build my own jquery plugin: (function($) { $.fn.setColorTest = function(options) { options = $.extend($.fn.setColorTest.defaults,options); return this.each(function() { $(this).css({ 'color': options.color}); }); } $.fn.setColorTest.defaults = { color: '#000' }; })(jQuery); As you can see I'm setting a default color and making it possible for the user to change it. My problem/question is: I have two paragraphs on the same page where I want to use the default color for the first and a different color for the second paragraph: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <title>Color Test</title> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> <script type="text/javascript"> $(document).ready(function() { $('a#click').click(function() { $('#test1').setColorTest(); }); $('a#click2').click(function() { $('#test2').setColorTest({color: '#fff666'}); }); }); </script> </head> <body> <a id="click">click here</a> <a id="click2">click here2</a> <p id="test1">Test 1</p> <p id="test2">Test 2</p> </body> </html> My problem is that if I click on the second paragraph (p) that overrides the default color and afterwards clicks on the first p it will use the overwritten color and not the default color for the first p. How can I ensure that the first p always will use the default color? I know I can just define the color for the first p as well but that is not an option here $('#test1').setColorTest('color': '#000'); So what to do?

    Read the article

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