
longtone
Members-
Posts
75 -
Joined
-
Last visited
Never
Everything posted by longtone
-
Why is array element undefined when I have defined it?
longtone replied to longtone's topic in Javascript Help
So you spotted my deliberate mistake... I'll book my brain transplant now -
aaa = 'boo a'; bbb = new Array(); bbb['av'] == 'boo b'; alert(aaa); alert(bbb['av']); displays: alert('boo a') then alert('undefined') I know this is something really basic, but why is it undefined when I've declared the array and given the element a value? see it in action: http://www.phpplaypen.co.uk/jso.php
-
How do I get rid of ears on rounded corners in IE? - jquery.corner
longtone replied to longtone's topic in Javascript Help
How do I do it without using javasript? -
How do I get rid of ears on rounded corners in IE? - jquery.corner
longtone replied to longtone's topic in Javascript Help
Thanks I had trouble before getting curvycorners to work on dynamically generated boxes, and still am, but I've got a simple version working, so I'll get there. Definitely solves the problem though. -
On this page: http://www.vagabondipuppets.com/shows The back and forward arrows on the slideshow work as they should, and if you click on the slideshow, the back and forward arrows work OK on the pop up too. But if you click on a link on the right hand side to one of the shows, which reloads the slideshow, it starts to go wrong. Now clicking on a forward or back arrow will move forward or back twice. Clicking on the slideshow brings up the popup, then loads it twice. If you click on a link to a show again, after that it will do these actions three times, and so on. I thought it was to do with having the javascript function php2js in the slideshow, but removing that made no difference. Any ideas how to prevent this?
-
Thanks, I'll try that I'm not sure that's the problem though, because I get the width error on the first image, which is loaded with the page, not the subsequent images loaded with JS And surely the first image should be fully loaded before $(document).ready calls any functions? I've got round it for now by making all the images the same size, but that does increase bandwidth and causes me unnecessary work...
-
I have a div #rotator, containing a number of images. I am using this jQuery code to get the dimensions of the div and the first image: //get size of div this.div_width = $("#rotator ").width(); this.div_height = $("#rotator ").height(); //get size of image this.img_width = $("#rotator img:eq(0)").width(); this.img_height = $("#rotator img:eq(0)").height(); sometimes it works, sometimes the image dimensions come back completely wrong eg: 14 instead of 200 Any ideas why, and how to fix it?
-
I've found an answer: setInterval does not work, it's already running before the AJAX so it carries on I used a callback after the AJAX function to run the same functions that run when the page is loaded seems to solve the problem
-
Using jQuery and AJAX, I am filling a div ' #pic_frame ', by calling a js function 'picShow()' picShow first resizes and hides some images, then it calls a function 'append()' which appends some divs with overlay images, then it sets an Interval on a function 'slideshow()' On first loading the page this all works, but on reloading '#pic_frame' with AJAX, everything works except 'append()' I know .live is probably the answer, I just can't see how to use it I've tried: $("#pic_frame").live('load', function(){ append(); }); but no joy does anyone know how I get this to work? the thing that confuses me is why setInterval works, but not simply calling a function
-
Understanding MX entries and deleting mail folder contents
longtone replied to longtone's topic in Other Web Server Software
OK it's sorted now The email account I was using for notifications of cron jobs was getting full, and had started rejecting messages. The rejections were sent back to the server and stored in /mail/new/ Deleted old emails, deleted contents of /mail/new/, everyone's happy again -
Understanding MX entries and deleting mail folder contents
longtone replied to longtone's topic in Other Web Server Software
I've more or less figured this out now The files are messages to ( and possibly from) the server relating to cron jobs. I think they may be all mail undelivered reports, but at the moment I'm still going through the oldest files, backing up and deleting them. When I get up to date I'll have more idea what's going on -
Understanding MX entries and deleting mail folder contents
longtone replied to longtone's topic in Other Web Server Software
The domain and web hosting are with different companies, neither is Google. The domain nameserver entry points to the webhosting nameserver and all the DNS settings are on the webhosting server. The MX records point to aspmx.l.google.com, and I just checked that with mxtoolbox, a good tip. So what is 'Always Accept' for? And can I delete some of the older files if I back them up first? -
Hopefully this is the right to post this, sorry if I've put it in the wrong forum I am using google mail, so I thought I wouldn't have to worry about emails using up space. Now I've found the folder: /mail/new/ is taking up a lot of disk space. Also, looking at the MX entry in cPanel (version: 11.24.5-STABLE) the column 'Always accept' says 'yes' Am I right in assuming this means I am keeping a back up? And that it's safe to change this entry to 'no' And can I safely delete the contents of /mail/new/ ?
-
I've sorted it: I moved position: relative from #sidebar_main p a to #sidebar_main p
-
I've got the same problem, and I was going to solve it by adding a link to the top layer with javascript, but adding a third layer is a much better way to do it IMHO
-
Good point about the closing div, don't know how that got in It doesn't make any difference though You're not seeing the shift in FF? Strange. I'm running FF 3.6 I'll try it on another machine
-
oops, I should have said which browser to check it in In FF and IE8 the span background image is about 10 px below the div background image In Chrome it is about 5px below In IE7, IE6, Safari and Opera it lines up perfectly which is what I want The question is, how to get the span background to line up with the div background in all browsers?
-
This seems like a fairly simple menu with image replacement. The background image on the div should show through when there is no link, ie we're on that page. But it won't line up. I wouldn't mind but it's different on every browser. - btw, that's not the final version of the sign! http://www.phpplaypen.co.uk/test.php
-
That makes sense Thanx
-
I'm pretty new to unobtrusive js, and I don't know if this should work or not This is a simplified version: <div class="videoindexbox" id="sbb"> <form class="short_form" id="searchbigbox" action="/" method="get" > <input class="submit_button" type="submit" id="searchbigbox_submit_btn" name="btn_videos" value="Go" /> </form> </div> And I've set an event listener: function searchBigBoxListener() { if(!document.getElementById || !document.getElementById('searchbigbox_submit_btn') || !document.createElement) return; var btn = document.getElementById('searchbigbox_submit_btn'); btn.onclick = function(){ searchBigBox(); hide(document.getElementById('hidden_search')); return false}; } When I load the page, it works fine. But if I then repopulate #sbb using ajax, the event listener doesn't work I am using innerHTML for this, so maybe that's the problem?
-
How to redirect entire directory to one page
longtone replied to longtone's topic in Apache HTTP Server
You're right, I was confusing the two Actually what I ended up doing was both: Redirect /folder/ http://www.example/anotherpage/ RewriteRule ^anotherpage/([a-zA-Z0-9]+)?$ anotherpage.php?sv=$1 which gives the new url in the address bar but without the query string Thanks -
I want to redirect all pages a directory to one page outside that directory eg: /folder/somepage.php to /anotherpage.php and ideally add a query string: /folder/somepage.php to /anotherpage.php?sv=somepage I thought this would do it: Redirect /folder/([a-zA-Z0-9]+)$ http://www.example.com/anotherpage.php?sv=$1 but it doesn't... Can anyone see what I'm doing wrong?
-
Thanks, that's nice and simple
-
I have an associative array eg: array('a' => 'A', 'b' => 'B', 'c' => 'C', 'd' => 'D') I want to be able to move one element to the start, leaving the order of the others unchanged so if I put: $start = 'c'; I would get: array( 'c' => 'C', 'a' => 'A', 'b' => 'B','d' => 'D') Is there a simple way to do this? ( PHP version: 5.2.10 )