Search Results

Search found 4135 results on 166 pages for 'img'.

Page 17/166 | < Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >

  • Problem with thumbnails after newly added - PHP on-the-fly method

    - by Wayne
    Hey again... to those that may have read my previous question that got solved a couple minutes ago .< The on-the-fly php script works perfectly, but when I went to upload new images into a gallery which I made myself, the images are resized to 150 x 150 for what I wanted... however, when it comes to new images being added it is all black... As you can see the three black images that were uploaded to the folder and the directory added to the database. What is causing this? If I view the source, the code is fine... the while loop in the PHP generates an output like this: <div class="view-wrap" id="photo-10"> <div class="view-icon"> <div class="img-label"> <a href="#" id="10" class="delete"><img src="img/small-delete.png" /> Delete</a> </div> <a href="img/events/Paintballing/24251_1395408043148_1170626626_1204038_5382765_n.jpg"> <img src="image.php?dir=img/events/Paintballing/24251_1395408043148_1170626626_1204038_5382765_n.jpg" alt="" width="110" height="110" /> </a> </div> </div> An example of one block. If I view the source (in Firefox) and click on the image.php?dir=img/events/Paintballing/24251_1395408043148_1170626626_1204038_5382765_n.jpg by exmaple, I can see the thumbnail at it's 150 x 150 size but in the layout, it shows a black thumbnail... Does anyone know why this is happening?

    Read the article

  • Appending a function to an existing onclick event at page load

    - by tonsils
    Hi, I have the following html code that is pre written by the app I am using, which I do not have access to, i.e. <td align="center" class="shuttleControl"> <img src="/i/mydb/icons/shuttle_reload.png" onclick="g_Shuttlep_v61.reset();" alt="Reset" title="Reset"/> <img src="/i/mydb/icons/shuttle_last.png" onclick="g_Shuttlep_v61.move_all();" alt="Move All" title="Move All"/> <img src="/i/mydb/icons/shuttle_right.png" onclick="g_Shuttlep_v61.move();" alt="Move" title="Move" /> <img src="/i/mydb/icons/shuttle_left.png" onclick="g_Shuttlep_v61.remove();" alt="Remove" title="Remove" /> <img src="/i/mydb/icons/shuttle_first.png" onclick="g_Shuttlep_v61.remove_all();" alt="Remove All" title="Remove All" /> </td> Based on the above code, using jQuery, would it be possible that when the page finishes loading, search for the img src "shuttle_last.png" and append to it's onclick call, my own function get_Count(); ? That is, I would then see the following code when I do a view page source for this particular line, i.e.: <img src="/i/mydb/icons/shuttle_last.png" onclick="g_Shuttlep_v61.move_all();get_Count();" alt="Move All" title="Move All"/> Is this possible - if so, would really appreciate a code sample? Thanks.

    Read the article

  • Create a simple automatic image switcher using jQuery

    - by Kim Andersen
    Hi all. I need to create a very simple image switcher that changes my images automatically. I have the following code: <div class="imgCarousel"> <div class="imgC1 left"><img src="/media/1614/1_1.jpg" alt="img1" /></div> <div class="imgC2 left"><img src="/media/1615/2_1.jpg" alt="img2" /></div> <div class="imgC3 left"><img src="/media/1616/3_1.gif" alt="img3" /></div> <div class="imgC4 left"><img src="/media/1617/4_1.jpg" alt="img4" /></div> <div class="imgC5 left"><img src="/media/1618/5_1.jpg" alt="img5a" /></div> <div class="imgC6 left"><img src="/media/1620/6_1.jpg" alt="img6a" /></div> <div class="imgC7 left"><img src="/media/1622/7.jpg" alt="img7" /></div> </div> Two of the above images should be switched automatically after a certain amount of time (every 3-4 sec.). This means that after 4 seconds, I'd like to change the image called /media/1618/5_1.jpg with another image. And after another 4 seconds, I'd switch back again. The same shold be made for one of my other images. How can I acomplish this with some jQuery?

    Read the article

  • Cannot access objects in associative arrays using jQuery

    - by Sixfoot Studio
    I am trying to create and array of objects so that I can access them in a for loop in jQuery and I know that this works in Actionscript so what I am trying to do is convert my current knowledge to jQuery that will work. Please have a look at this and tell me why I cannot access divToShow Thanks guys var homeImages = new Array(); homeImages[0] = { hoverImage: ".leftColImage1", divToShow: ".image1", rollOverImg: "img-family-over.jpg" }; homeImages[1] = { hoverImage: ".leftColImage2", divToShow: ".image2", rollOverImg: "img-students-over.jpg" }; homeImages[2] = { hoverImage: ".leftColImage3", divToShow: ".image3", rollOverImg: "img-pros-over.jpg" }; homeImages[3] = { hoverImage: ".leftColImage4", divToShow: ".image4", rollOverImg: "img-retired-over.jpg" }; var hoverImage; var activeDiv; var mainContent = ".mainContent"; for (k = 0; k < homeImages.length; k++) { homeImages[k].id = k; $(homeImages[k].hoverImage).mouseover(function() { //alert("divToShow : " + homeImages[this.id].divToShow); alert("this : " + this.id); activeDiv = homeImages[k].divToShow; $(".leftColImage1 img").attr("src", "/App_Themes/MyChoice2010/Images/" + homeImages[k].rollOverImg); $(mainContent).hide(); $(homeImages[k].divToShow).slideDown("slow"); }).mouseout(function() { $(".leftColImage1 img").attr("src", "/App_Themes/MyChoice2010/Images/img-family.jpg"); $(".image1").hide(); $(mainContent).slideDown("slow"); }); }

    Read the article

  • Finding and displaying image src attributes

    - by MIF
    Hi I have a problem and an try to find in one week. I need help :( I have a script work with : <script type="text/javascript"> var list_images = 'image1.jpg|image2.jpg|image3.jpg|image4.jpg|image5.jpg|image6.jpg|image7.jpg'; var images = list_images.split('|'); </script> but know in blogger always give more tab in my script <script type="text/javascript"> var list_images = ' <div></div> <a href="anything"><img src="image1.jpg"><a/> <a href="anything"><img src="image2.jpg"><a/> <a href="anything"><img src="image3.jpg"><a/> <a href="anything"><img src="image4.jpg"><a/> <a href="anything"><img src="image5.jpg"><a/> <li><img src="image6.jpg"></li> <li><img src="image7.jpg"></li> <br/> '; var images = list_images.split('|'); </script> I want remove all tabs and convert them like var list_images = 'image1.jpg|image2.jpg|image3.jpg|image4.jpg|image5.jpg|image6.jpg|image7.jpg'; Finding and displaying image src attributes - Old question http://manhualayout.blogspot.com/2011/03/httpcomic.html - Work good http://manhualayout.blogspot.com/2011/02/blog-post.html - My problem make my crazy in one week :( I Can't just edit the variable of the block HTML ...I want find a way to search and replace to remove all and got the link with the | Please help me . Very very thanks .. Me so stupid :(

    Read the article

  • How can i add to dataGridView1 a data to the last row/column?

    - by user3681442
    In top of form1 i did: private System.Timers.Timer _refreshTimer; private int _thisProcess; Then in the Form1 Load event: _thisProcess = Process.GetCurrentProcess().Id; InitializeRefreshTimer(); PopulateApplications(); Then the timer init method: void InitializeRefreshTimer() { _refreshTimer = new System.Timers.Timer(5000); _refreshTimer.SynchronizingObject = this; _refreshTimer.Elapsed += new System.Timers.ElapsedEventHandler(TimerToUpdate_Elapsed); _refreshTimer.Start(); } Then the timer elapsed event: void TimerToUpdate_Elapsed(object sender, System.Timers.ElapsedEventArgs e) { PopulateApplications(); } In the end the Populate method: void PopulateApplications() { dataGridView1.Rows.Clear(); foreach (Process p in Process.GetProcesses(".")) { if (p.Id != _thisProcess) { try { if (p.MainWindowTitle.Length > 0) { String status = p.Responding ? "Running" : "Not Responding"; dataGridView1.Rows.Add( p.MainWindowTitle, status); } } catch { } } } } The variable status show in the column2 but let's say i want that status will be display for each process/app in column5 ? How can i move it ? EDIT** Tried this: void PopulateApplications() { dataGridView1.Rows.Clear(); foreach (Process p in Process.GetProcesses(".")) { if (p.Id != _thisProcess) { try { if (p.MainWindowTitle.Length > 0) { var icon = Icon.ExtractAssociatedIcon(p.MainModule.FileName); Image ima = icon.ToBitmap(); img.Image = ima; img.HeaderText = "Image"; img.Name = "img"; String status = p.Responding ? "Running" : "Not Responding"; dataGridView1.Rows.Add(img, p.MainWindowTitle, status); } } catch { } } } } I moved the variable img to the top of the form. The problem is i see in each row this: DataGridViewImageColumn { Name=img, Index=-1 } And i don't see the icon it self. Why ?

    Read the article

  • ajax form handling an array

    - by moata_u
    am trying to handle an array comes from php file after submitting the form data , the value of data after submitting the form is = ARRAY but i cant use this array in any way , any idea how can i handle this array !!!! Javascript : $('#file').live('change',function(){ $('#preview').html(''); $('#preview').html('<img src="loader.gif" />'); $('#data').ajaxForm(function(data){ $(data['toshow']).insertBefore('.pic_content').hide().fadeIn(1000); }).submit(); }); PHP : .... ....etc echo json_encode(array('toshow'=>somedata,'data'=>somedata)); data come from php file {"toshow":"\r\n\t\t\t\t\r\n\t\t<table class=\"out\">\r\n\t\t\t<tr ><td class=\"img\"><a title=\"2012-06-02 01-22-09\" rel=\"prettyPhoto\" href=\"img\/2012-06-02 01-22-09.284.jpg\"><img src=\"img\/thumb\/2012-06-02 01-22-09.284.jpg\"\/><\/a><\/td><\/tr>\r\n\t\t\t\r\n\t\t\t<td>\r\n\t\t\t\t<table cellSpacing=\"1\" cellPadding=\"0\">\r\n\t\t\t\t\t<tr><td class=\"data\"><span class=\"click\">2012-06-02 01-22-09<\/span><\/td><\/tr>\r\n\t\t\t\t\t<tr><td class=\"data\"><span class=\"click\">Download<\/span><\/td><\/tr>\r\n\t\t\t\t\t<tr><td class=\"data\"><a href=\"img\/2012-06-02 01-22-09.284.jpg\"><span class=\"click\">View<\/span><\/a><\/td><\/tr>\r\n\t\t\t\t<\/table>\r\n\t\t\t<\/td>\r\n\t\t\t<\/tr>\r\n\t\t<\/table>","span":"<span class='text'><img src='greencheck.png'\/>2012-06-02 01-22-09 Uploaded ,File Size =152Kb <\/span>"}

    Read the article

  • mod_rewrite changes case even if not matching RewriteCond?

    - by kirdie
    I have a really strange problem with my MediaWiki which I want to have articles of the form mywiki.org/MyArticle. Now I got most of it to work using the following code but it mysteriously cannot display the logo anymore. RewriteEngine On # don't rewrite valid requests to files and directories RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d # mywiki.org/MyArticle gets rewritten to mywiki.org/index.php/MyArticle RewriteRule ^/(.*)$ /index.php/$1 [L,QSA] Now when I type in mywiki.org/img/logo.jpg in my browser the adress changes to http://wiki.geoknow.eu/Img/logo.jpg (capital I) and I get to the empty article page but the image is definitely there (in my document root under the img folder): /var/www/mywiki.org$ ls img logo.jpg So far so bad. But now it gets really crazy: When I add RewriteCond %{REQUEST_URI} !^/.*\.jpg my adress still gets rewritten and my access log says - - [05/Dec/2012:16:30:21 +0100] "GET /Img/geoknow_logo.jpg HTTP/1.1" 404 509 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Firefox/17.0" Where does that capital I in Img come from? The rule is not even executed because at least one condition is definitely not met now and I also don't have any to lowercase-transformation defined anywhere. What is happening there and how can I repair this? P.S.: Now all of the sudden the problem went away (the image is displayed as it should and there is no capital replacement anymore. What can cause this and why does it spontanously appear and disappear?

    Read the article

  • How to get base64 encoded contents for an ImageReader?

    - by htf
    Hi. How do I read an image into a base64 encoded string by its ImageReader? Here's example source code using HtmlUnit. I want to get the base64 String of img: WebClient wc = new WebClient(); wc.setThrowExceptionOnFailingStatusCode(false); wc.setThrowExceptionOnScriptError(false); HtmlPage p = wc.getPage("http://flickr.com"); HtmlImage img = (HtmlImage) p.getByXPath("//img").get(3); System.out.println(img.getImageReader().getFormatName());

    Read the article

  • how can i tell ruby to use the html string

    - by Matt
    i have this "<img src='#{picture.url(:tiny)}'>" which prints to this &lt;img src='/system/pictures/2/tiny/Womacdsf.jpg?1294942797'&gt;, &lt;img src='/system/pictures/3/tiny/Womacdsf_3017.jpg?1294942797'&gt;, &lt;img src='/system/pictures/4/tiny/Womacdsf_8012.jpg?1294942797'&gt;, … (8) as you can see this is doing the &lt; and &gt; instead of the < and how can i tell ruby this is not what i want

    Read the article

  • Detect if visitor is on index page with client side scripting

    - by sterling
    Is it possible to detect if a visitor is on the index page or domain root with client side scripting? I figure javascript would be the best method as I would like to append a value to an image file based on wether a visitor is on the home page or not. Non-index page: <img src="/img/logo.png" /> Index page: <img src="/img/logo-home.png" />

    Read the article

  • jQuery: .toggle() doesnt work properly on two different elements.

    - by Marius
    Hello there, This is my markup: <table class="col1table" cellspacing="0" cellpadding="0"> <tr> <td><a class="tips_trigger" href="#"><img src="/img/design/icon_tips_venn.png" /></a></td> <td><a class="facebook_trigger" href="#"><img src="/img/design/icon_facebook.png" /></a></td> <td><a class="twitter_trigger" href="#"><img src="/img/design/icon_twitter.png" /></a></td> <td><a class="myspace_trigger" href="#"><img src="/img/design/icon_myspace.png" /></a></td> </tr> <tr> <td><a class="tips_trigger" href="#">TIPS EN VENN</a></td> <td><a class="facebook_trigger" href="#">FACEBOOK</a></td> <td><a class="twitter_trigger" href="#">TWITTER</a></td> <td><a class="myspace_trigger" href="#">MYSPACE</a></td> </tr> </table> This is the mark-up for a tool-tip: <div id="message_tips" class="toolTip">Lorem ipsum dolor sit amet.<br /><br /><br /><br /><br /><br />Lorem ipsum dolor sit amet.</div> This is my code to hide/unhide tooltip for .tips_trigger (the tooltip has id: "#message_tips"). Notice that there is one .tips_trigger on each row in the table. And there will be one tooltip per "..._trigger-class". $('.tips_trigger').toggle(function(event){ event.preventDefault(); $('#message_tips').css('display', 'block'); }, function(event){ $('#message_tips').css('display', 'none'); }); I have two problems: 1. Each of the tips_trigger-classes seems to work the script independatly. What I mean by that is if I click tips_trigger in the first row, it displays the tool-tip. If i click tips_trigger in the second row straight after, it displays the tool-tip again. I have to click the exact same tips_trigger-class istance twice for it to hide it. How can I overcome this problem? 2. Each of the "..._trigger"-classes will have a tool-tip, not just ".tips_trigger". Is there a way to alter my current script so that it works for multiple unhides/hides instead of writing one script per class? Kind regards, Marius

    Read the article

  • I wanna run an android emulator with disk images

    - by Kyungmin
    hi i'd like to run an android emulator with disk image. so I tried this ./emulator -kernel kernel-qemu -system system.img -ramdisk ramdisk.img -initdata userdata.img -partition-size 512 then error massage is : if you really want to NOT run an AVD, consider using '-data ' to specify a data partition image file (I hope you know what you're doing). so I found userdata-qemu.img from /out/ but i can't find that file. someone help me

    Read the article

  • jQuery unbind does not work

    - by aximili
    My unbind does not work. $("img.hoverable").hover(ChangeImage, ChangeBack); $("a img.hoverable").unbind('hover'); The HTML could be something like this <img class="hoverable" src="something.jpg"/> <a href="#"><img class="hoverable" src="something.jpg"/></a> When I hover over the second HTML, ChangeImage is still fired. I am not sure if I am using it correctly, can anyone please advise?

    Read the article

  • Ajax doesn't trigger a change-event on a webkit based browser

    - by user319464
    I have adapted a Jquery plugin to for-fill my needs to send GET requests to servers as a way of "pinging" them. I've also added some javascript code to add some fancy features like: depending on the changed value in a that the Jquery plugin changes, it changes the Icon accordingly. To make it all work essentially, I made so that when Ajax gets a "complete" event, it forces a "onChange" event to the span, triggering the javascript validation function to change the status icons. Here is the code of my slightly modified jQuery Plugin: /** * ping for jQuery * * Adapted by Carroarmato0 (to actually work instead of randomly "pinging" nowhere instead of faking * * @auth Jessica * @link http://www.skiyo.cn/demo/jquery.ping/ * */ (function($) { $.fn.ping = function(options) { var opts = $.extend({}, $.fn.ping.defaults, options); return this.each(function() { var ping, requestTime, responseTime ; var target = $(this); var server = target.html(); target.html('<img src="img/loading.gif" alt="loading" />'); function ping() { $.ajax({url: 'http://' + server, type: 'GET', dataType: 'html', timeout: 30000, beforeSend : function() { requestTime = new Date().getTime(); }, complete : function() { responseTime = new Date().getTime(); ping = Math.abs(requestTime - responseTime); if (ping > 2000) { target.text('niet bereikbaar'); } else { target.text(ping + opts.unit); } target.change(); } }); } ping(); opts.interval != 0 && setInterval(ping,opts.interval * 1000); }); }; $.fn.ping.defaults = { interval: 3, unit: 'ms' }; })(jQuery); target.change(); is the code that triggers the "onchange" event in the span: echo " <td class=\"center\"><span id=\"ping$pingNb\" onChange=\"checkServerIcon(this)\" >" .$server['IP'] . "</span></td>"; In Firefox this works, checkServerIcon(this) gets executed and passes the span object to the function. function checkServerIcon(object) { var delayText = object.innerHTML; var delay = delayText.substring(0, delayText.length - 2); if ( isInteger(delay) ) { object.parentNode.previousSibling.parentNode.getElementsByTagName('img')[0].src = 'img/servers/enable_server.png'; } else { if (delay == "bezig.") { object.parentNode.previousSibling.parentNode.getElementsByTagName('img')[0].src = 'img/servers/search_server.png'; } else { object.parentNode.previousSibling.parentNode.getElementsByTagName('img')[0].src = 'img/servers/desable_server.png'; } } } My guess would be that there's something different in WebKit browsers in the way object.parentNode.previousSibling.parentNode. .... works...

    Read the article

  • Croping images with no loss using .NET

    - by zaladane
    I am trying to understand why after croping an image in .NET i end up with an image 3 times the size of the original image. Listed below is the code i am using to crop the image Private Shared Function CropImage(ByVal img As Image, ByVal cropArea As Rectangle) As Image Dim bmpImage As Bitmap = New Bitmap(img) Dim bmpCrop As Bitmap = bmpImage.Clone(cropArea, img.PixelFormat) Return CType(bmpCrop, Image) End Function where img is the original image loaded from file into an image object. How can i achieve a loss less cropping of my image?

    Read the article

  • jquery if statement animate back

    - by user295292
    how do i add a if statement when the right image is at +400px then animate back to -400px... when hovering the right image? $('#left img').mouseenter(function() { $('#right img').animate({ left: '+=400px' }, 700); }); $('#right img').mouseenter(function() { $('#left img').animate({ left: '-=400px' }, 700); }); something similar to this - http://www.hyundaiusa.com/ (the two main images on the site)

    Read the article

  • Jquery stop load function after too many clicks

    - by Sergio
    How can I stop loading function after user is clicked too many times on link? Jquery code looks like: $(document).ready(function(){ $(".menu_rfr").click(function() { $("#main").html('<img src="img/spin.gif" class="spin">'); location.replace($(this).attr('rel')); }); $(".menu_clickable").click(function() { $("#main").html('<img src="img/spin.gif" class="spin">'); $("#main").load($(this).attr('rel')); }); });

    Read the article

  • Stuck with jQuery thumbnail gallery behavior

    - by Vitor
    Hi everyone, I'm trying to create a simple thumbnail viewer with jQuery. Here goes the code: $(function(){ $("ul.thumbnails li").click(function(e){ var imgAlt = $(this).find('img').attr("alt"); //Get Alt Tag of Image var imgTitle = $(this).find('a').attr("href"); //Get Main Image URL $("img.featured").attr({ src: imgTitle , alt: imgAlt}); //Switch the main image (URL + alt tag) }); <div class="image-gallery"> <img class="featured" src="big.jpg"> <ul class="thumbnails"> <li id="thumb01"> <a href="big.jpg"><img src="small.jpg"></a> </li> <li id="thumb02"> <a href="big.jpg"><img src="small.jpg"></a> </li> <li id="thumb03"> <a href="big.jpg"><img src="small.jpg"></a> </li> </ul> .thumbnails li { margin: 0; padding: 5px 5px 0 5px; list-style: none; float: left; overflow: hidden; } thumbnails li img { width: 50px; height: 50px; margin: 0; padding: 0; float: left; } If i click the thumbnail, the browser goes straight to the full image instead of just changing the img src with jQuery. But I if i click somewhere inside the <li> it works. I know this must be simple, but I don't know where I'm going wrong. I've tried studying other galleries, like http://www.sohtanaka.com/web-design/examples/image-rotator/ , but couldn't find what I'm missing. I could really use some help from you guys :)

    Read the article

  • javascript DOM how to know what node is?

    - by Fernando SBS
    here is the source code: <table id="movements" cellpadding="1" cellspacing="1"><thead><tr><th colspan="3">Movimentações de tropas:</th></tr></thead><tbody><tr> <td class="typ"><a href="build.php?gid=16"><img src="img/x.gif" class="att1" alt="Tropas atacantes chegando" title="Tropas atacantes chegando" /></a><span class="a1">&raquo;</span></td> <td><div class="mov"><span class="a1">1&nbsp;Ataque</span></div><div class="dur_r">em&nbsp;<span id="timer1">13:21:06</span>&nbsp;hrs.</div></div></td></tr><tr> <td class="typ"><a href="build.php?gid=16"><img src="img/x.gif" class="def1" alt="Tropas de reforço chegando" title="Tropas de reforço chegando" /></a><span class="d1">&raquo;</span></td> <td><div class="mov"><span class="d1">1&nbsp;Reforço</span></div><div class="dur_r">em&nbsp;<span id="timer2">0:14:55</span>&nbsp;hrs.</div></div></td></tr><tr> <td class="typ"><a href="build.php?gid=16"><img src="img/x.gif" class="att2" alt="Próprias tropas atacando" title="Próprias tropas atacando" /></a><span class="a2">&laquo;</span></td> <td><div class="mov"><span class="a2">1&nbsp;Ataque</span></div><div class="dur_r">em&nbsp;<span id="timer3">0:08:50</span>&nbsp;hrs.</div></div></td></tr><tr> <td class="typ"><a href="build.php?gid=16"><img src="img/x.gif" class="def2" alt="Próprias tropas reforçando" title="Próprias tropas reforçando" /></a><span class="d2">&laquo;</span></td> <td><div class="mov"><span class="d2">1&nbsp;Reforço</span></div><div class="dur_r">em&nbsp;<span id="timer4">2:50:45</span>&nbsp;hrs.</div></div></td></tr></tbody></table> and this is the View Source Chart of the document html (for easy DOM working): I would like to get to the 0:14:55 value coming from <span class="d1">, how to do it? EDIT Marcel Korpel: The value is always in the span in a div coming directly after a div containing a span with class d1, like: <div class="mov"><span class="d1">1&nbsp;Reforço</span></div><div class="dur_r">em&nbsp;<span id="timer2">0:14:55</span>&nbsp;hrs.</div>

    Read the article

  • Web development - relative URLs without duplicating files

    - by eshriek
    I have a site with index.php in the root folder, images in /img , and overview.php in /content . I have a sidebar.php file that is included in both index.php and overview.php . How should I refer to /img/image.gif if I include a link in each file? The location of image.gif changes relative to the location of the file that references it. Using /img/image.gif in sidebar.php will work in index.php, but it fails for the file located at /content/overview.php. The only solution that I can see is to either include a seperate sidebar.php in each subdirectory, or include an /img directory in every sub-directory. The best suggestion that I can find is to use the <base html tag as suggested here: Change relative link paths for included content in PHP However, in the same link, SamGoody suggests that the <base tag "is no longer properly supported in Internet Explorer, since version 7." I'd like some insight on the matter before committing to a course of action. Thanks. EDIT: I am using the wrong approach below with "../" Example- root/index.php: ... <link rel="stylesheet" type="text/css" href="style.css" /> <title>title</title> </head> <body> <?php include('include/header.php'); ?> <?php include('include/menu.php'); ?> ... root/include/header.php: ... <div id="header"> <span class="fl"><img src="img/dun1.png"/></span><span class="fr"><img src="img/dun2.png"/></span> ... root/content/overview.php: ... <link rel="stylesheet" type="text/css" href="../style.css" media="screen" /> <title>Overview</title> </head> <body> <?php include('../include/header.php'); ?> <?php include('../include/menu.php'); ?> ...

    Read the article

  • problem with JsonStore and JsonReader

    - by kalan
    Hello, In my ExtJS application I use EditorGridPanel to show data from server. var applicationsGrid = new Ext.grid.EditorGridPanel({ region: 'west', layout: 'fit', title: '<img src="../../Content/img/app.png" /> ??????????', collapsible: true, margins: '0 0 5 5', split: true, width: '30%', listeners: { 'viewready': { fn: function() { applicationsGridStatusBar.setText('??????????: ' + applicationsStore.getTotalCount()); } } }, store: applicationsStore, loadMask: { msg: '????????...' }, sm: new Ext.grid.RowSelectionModel({ singleSelect: true, listeners: { 'rowselect': { fn: applicationsGrid_onRowSelect} } }), viewConfig: { forceFit: true }, tbar: [{ icon: '../../Content/img/add.gif', text: '????????' }, '-', { icon: '../../Content/img/delete.gif', text: '???????' }, '-'], bbar: applicationsGridStatusBar, columns: [{ header: '??????????', dataIndex: 'ApplicationName', tooltip: '???????????? ??????????', sortable: true, editor: { xtype: 'textfield', allowBlank: false } }, { header: '<img src="../../Content/img/user.png" />', dataIndex: 'UsersCount', align: 'center', fixed: true, width: 50, tooltip: '?????????? ????????????? ??????????', sortable: true }, { header: '<img src="../../Content/img/role.gif" />', dataIndex: 'RolesCount', align: 'center', fixed: true, width: 50, tooltip: '?????????? ????? ??????????', sortable: true}] }); When I use JsonStore without reader it works, but when I try to update any field it uses my 'create' url instead of 'update'. var applicationsStore = new Ext.data.JsonStore({ root: 'applications', totalProperty: 'total', idProperty: 'ApplicationId', messageProperty: 'message', fields: [{ name: 'ApplicationId' }, { name: 'ApplicationName', allowBlank: false }, { name: 'UsersCount', allowBlank: false }, { name: 'RolesCount', allowBlank: false}], id: 'app1234', proxy: new Ext.data.HttpProxy({ api: { create: '/api/applications/getapplicationslist1', read: '/api/applications/getapplicationslist', update: '/api/applications/getapplicationslist2', destroy: '/api/applications/getapplicationslist3' } }), autoSave: true, autoLoad: true, writer: new Ext.data.JsonWriter({ encode: false, listful: false, writeAllFields: false }) }); I believe that the problem is that I don't use reader, but when I use JsonReader grid stops showing any data at all. var applicationReader = new Ext.data.JsonReader({ root: 'applications', totalProperty: 'total', idProperty: 'ApplicationId', messageProperty: 'message', fields: [{ name: 'ApplicationId' }, { name: 'ApplicationName', allowBlank: false }, { name: 'UsersCount', allowBlank: false }, { name: 'RolesCount', allowBlank: false}] }); var applicationsStore = new Ext.data.JsonStore({ id: 'app1234', proxy: new Ext.data.HttpProxy({ api: { create: '/api/applications/getapplicationslist1', read: '/api/applications/getapplicationslist', update: '/api/applications/getapplicationslist2', destroy: '/api/applications/getapplicationslist3' } }), reader: applicationReader, autoSave: true, autoLoad: true, writer: new Ext.data.JsonWriter({ encode: false, listful: false, writeAllFields: false }) }); So, does anyone know what the problem might be and how to solve it. The data returned from my server is Json-formated and seams to be ok {"message":"test","total":2,"applications":[{"ApplicationId":"f82dc920-17e7-45b5-98ab-03416fdf52b2","ApplicationName":"Archivist","UsersCount":6,"RolesCount":3},{"ApplicationId":"054e2e78-e15f-4609-a9b2-81c04aa570c8","ApplicationName":"Test","UsersCount":1,"RolesCount":0}]}

    Read the article

  • JavaScript functions broke my page jumps?

    - by Mark
    Hi everybody, I'm trying to develop a personal website and running into some issues. At the top of my page I had a horizontal table that contained 6 different images (buttons) that linked to different sections of the page. I wanted to spice up the buttons with JavaScript and make the image of the button change onMouseOver and onMouseOut so I found a way to do so online with some JavaScript but the problem now is that the buttons no longer jump to the appropriate section of the page when using Google Chrome or Safari, but in IE 9 they still do work correctly... Here is my old code that worked properly: <html> ... <body> <center> <table border="1" style="color:#D80000;text-align:center"> <tr> <td> <a href="#about"><img src="images/aboutMe.png" alt="About Me"></a> </td> <td> <a href="#courses"><img src="images/courseList.png" alt="Courses"></a> </td> <td> <a href="#work"><img src="images/workHistory.png" alt="Work History"></a> </td> <td> <a href="#places"><img src="images/placesBeen.png" alt="Places I've Been"></a> </td> <td> <a href="#games"><img src="images/gamesPlay.png" alt="Games I Play"></a> </td> <td> <a href="#contact"><img src="images/contactMe.png" alt="Contact"></a> </td> </tr> </table> </center> ... </body> </html> Here is my new code that is now broken: <html> <head> ... <script type="text/javascript"> <!-- if (document.images) { <!-- Preload original Images --> var about_init= new Image(); about_init.src="images/aboutMe.png"; var courses_init= new Image(); courses_init.src="images/courseList.png"; var work_init= new Image(); work_init.src="images/workHistory.png"; var places_init= new Image(); places_init.src="images/placesBeen.png"; var games_init= new Image(); games_init.src="images/gamesPlay.png"; var contact_init= new Image(); contact_init.src="images/contactMe.png"; <!--Preload images for mouseover --> var about_new= new Image(); about_new.src="images/aboutAlt.png"; var courses_new= new Image(); courses_new.src="images/courseAlt.png"; var work_new= new Image(); work_new.src="images/workAlt.png"; var places_new= new Image(); places_new.src="images/placesAlt.png"; var games_new= new Image(); games_new.src="images/gamesAlt.png"; var contact_new= new Image(); contact_new.src="images/contactAlt.png"; } function change_it(the_name) { if (document.images) { document.images[the_name].src= eval(the_name+"_new.src"); } } function change_back(the_name) { if (document.images) { document.images[the_name].src= eval(the_name+"_init.src"); } } //--> </script> </head> <body> ... <center> <table border="1" style="color:#D80000;text-align:center"> <tr> <td> <a href="#about" onMouseOver="change_it('about')" onMouseOut="change_back('about')"><img src="images/aboutMe.png" name="about" id="about" border="0" alt="About Me"></a> </td> <td> <a href="#courses" onMouseOver="change_it('courses')" onMouseOut="change_back('courses')"><img src="images/courseList.png" name="courses" id="courses" border="0" alt="Courses"></a> </td> <td> <a href="#work" onMouseOver="change_it('work')" onMouseOut="change_back('work')"><img src="images/workHistory.png" name="work" id="work" border="0" alt="Work History"></a> </td> <td> <a href="#places" onMouseOver="change_it('places')" onMouseOut="change_back('places')"><img src="images/placesBeen.png" name="places" id="places" border="0" alt="Places I've Been"></a> </td> <td> <a href="#games" onMouseOver="change_it('games')" onMouseOut="change_back('games')"><img src="images/gamesPlay.png" name="games" id="games" border="0" alt="Games I Play"></a> </td> <td> <a href="#contact" onMouseOver="change_it('contact')" onMouseOut="change_back('contact')"><img src="images/contactMe.png" name="contact" id="contact" border="0" alt="Contact"></a> </td> </tr> </table> </center> ... </body> </html> The images properly switch when the mouse is moved over/off them, but the jump to the corresponding page sections seems to be broken, it seems like they're all jumping to the #about section now. Once again, the weirder thing is that this is only the case when I'm using Google Chrome on my laptop running Windows 7 or Safari using my iPhone 4 but when I use the new Internet Explorer 9 on my laptop running Windows 7 all the buttons still link correctly. Any idea what's breaking the links?

    Read the article

  • jQuery carousel click updates selected item in a select list?

    - by Scott B
    I'm trying to hook up the click event on a jQuery image carousel's images so that it updates a select list in the same document and sets the "selected" option to match the item that was clicked in the carousel. The "title" attribute on each of the carousel images matches at least one option in the select list (title is always unique). For example: 1) carousel image titles are: image1, image2, image3 <div id="carousel"> <ul> <li><img src='folder1/screenshot.jpg' title=image1 /></li> <li><img src='folder2/screenshot.jpg' title=image2 /></li> <li><img src='folder3/screenshot.jpg' title=image3 /></li> </ul> </div> 2) select list options are... <select id="myThumbs"> <option>image1</option> <option selected="selected">image2</option> <option>image3</option> </select> My existing code is below, which already binds the hover event to a preview div outside the carousel. I want to keep this behavior, and also add the click behavior to update the selected item in the options list so that it matches the title of the carousel image that was clicked. $(function() { $("#carousel").jCarouselLite({ btnNext: ".next", btnPrev: ".prev", visible: 6, mouseWheel: true, speed: 700 }); $('#carousel').show(); $('#myThumbs').change(function() { var myImage = $('#myThumbs :selected').text(); $('.selectedImage img').attr('src','../wp-content/themes/mytheme/styles/'+myImage+'/screenshot.jpg'); }); $('#carousel ul li').click(function(e) { var myOption = $(this).children('img').attr('title'); $('#myThumbs').addOption('Text', myOption); }); $('#carousel ul li').hover(function(e) { var img_src = $(this).children('img').attr('src'); $('.selectedImage img').attr('src',img_src); } ,function() { $('.selectedImage img').attr('src', '<?php echo $selectedThumb; ?>');}); });

    Read the article

< Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >