Jump to content

ToonMariner

Members
  • Posts

    3,342
  • Joined

  • Last visited

Everything posted by ToonMariner

  1. html support in email clients is by no means uniform. Stick to the most basic tags - no proprietary tags. Css is not that well supported either - probably best sticking to (it hurts to say it) in-line styles/formatting - eeeeeeuuuuuuuuuuuuuuggggggggghhhhhhhhh.
  2. you have created the site in strict xhtml so why not just use the css to do this. JS should only be used for document effects, not page design.
  3. [url=http://www.w3schools.com/media/media_browsersounds.asp]http://www.w3schools.com/media/media_browsersounds.asp[/url] the <object> tag is the recommended route...
  4. Its OK! I forgot to use session start in the script the ajax request calls.
  5. Its OK! I was having a spaz moment - didn't put session_start in my script running the ajax!!!! Silly me
  6. Hi all - posted this in the ajax section but just wondered if any one in here could help pretty please. [url=http://www.phpfreaks.com/forums/index.php/topic,116027.0.html]http://www.phpfreaks.com/forums/index.php/topic,116027.0.html[/url]
  7. OK this driving me crazy. I have a shopping cart that I am adding ajax functionality to. The cart functions brillinatly without javascript but I want to improve the clients experience. Anyway I have built a cart class and a page that constructs the html for the div that shows its contents - these are the same scripts called if js in on or not (ajax just removes all teh rest of the processing for the whole page.) Now the ajax request reports that a session variable 'cart' has been constructed and serialized. Unfortunately any subsequent request sees the sessions revert to one created before the ajax request (if it was present) or simply disappears. Could anyone please let me know what they think is going on; and if you need to see some code let me know - there is a fair bit so I don't want to drown your eyes just yet.
  8. Hi there, posted something similar on webdeveloper.com but to no avail.... What I want to do is add javascript to enhance the users experience.  I have a site that is created in xhtml 1.1 and the whole thing works very well at the moment without any client side scripting so in terms of accessibility on that front I am happy. Now the target attribute for an achor tag is not valid markup (even though browsers still seem to support it) so I had a few associate links that with JS off open in the current window but open in a new window if it its on using: <a href="http://www.nr-foundation.org.uk/" title="Northern Rock Foundation" onclick="window.open(this.href); return false;" onkeypress="window.open(this.href); return false;"><span>Northern Rock Foundation</span></a> now this works beatutifully.  What I would like to achieve is somethig similar for the shopping cart I have built but calling a JS function instead off window.open.  Something like this: <a href="/index.php?action=additem&amp;id=34&amp;num=3" title="Add Item" onclick="cartAdd(this.href); return false;" onkeypress="cartAdd(this.href); return false;"><span>Add Item</span></a> My intention was to use JS to split the url so I could grab the action, id and num and use those parameters in an ajax request to update the shopping cart without having to 're-fresh' the whole page.
  9. But that can make the image pixelate or distort - which is awful. Setting the attributes has always been a way to control the size of the image but if you want quality with it then you shoudl adopt a more robust strategy - like properly re-creating the images.
  10. are the extra <td></td> inside the holder you have created? if so just remove your <TD></TD> tags in your function...
  11. there are indeed downfalls... what if the original is not a square image? you will need to look at the image_create_from_gif/jpeg etc etc functions. pretty straight forward. I have an upload class that can handle such resizing of images etc. with the bility to take non- square images for re-sizing too (this could be adapted if you were of the inclination!) my email is available on the left there (mainly use my hotmail acc.)
  12. well if you make the sub categories links just like you did the news one then the same will happen again...
  13. check your php.ini file for SMTP setting, read the manual stuff here [url=http://uk2.php.net/manual/en/ref.mail.php]http://uk2.php.net/manual/en/ref.mail.php[/url] see if that helps u any.
  14. perhaps you might be better using the switch - it will be mreo efficient. [code] switch (true) { case preg_match('/about/', $url):   break; case preg_match('/search/', $url):   break; ... ad nausea ... } [/code]
  15. [code] $qry = "SELECT * FROM `urtable` WHERE p_id = " . $_GET['c_id'] . " ORDER BY `name` ASC"; $qry = mysql_query($qry); while($row = mysql_fetch_assoc($qry)) { echo $row['name']; }[/code] Obviously you will have to put your own html in there to make it look right!!!
  16. you will need to use the array_walk function and creata your own function that uses str_replace or similar.. so something like... [code]function stripStuff (&$element, $key) { if (preg_match('/season/', $element))   $element = preg_replace('/ \((.)*+season(s)?', $element); else   unset($element); } array_walk($data,'stripStuff');[/code]
  17. *Solved* But don't know why!!!! I copied the generated query and had it hard coded into my query - which was successful. When replaceing the hard coded string with its generated variable that also worked!!!!
  18. well the script is assigning a new class to the body tag on each page so you need to check that; the blue page has <body class="blue f-"... and the red page <body class="red f-"... You should also check the names given to classes and id's some have a space in there which is not valid for css.  Check your site against some validation tools - google w3c validation...
  19. its not fading at all - simply that the text colour is very close to the color of the background image at the top.
  20. Fenway... Do you even NOT use tables? Tables are evil!!!! To centre a page 'properly' using divs for layout - as god intended - simply specify a width of 100% to your html and then use margin: auto; in your css so basic html... [code]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link rel="stylesheet" type="text/css" href="/global/style/screen.css" media="screen" /> <title>title</title> </head> <body> <div id="header"></div> <div id="wrapper"> <div id="nav"></div> <div id="info"></div> <div id="content"></div> </div> <div id="footer"></div> </body> </html>[/code] and css [code] html {width: 100%;} body {margin: 10px auto; width 765px;} ..... [/code] obviously thats for a fixed width site, so alter as needed but that will give you a basic centered page....
  21. I have a registration/profile editing page. Now if I run a query on this page, the number of rows affected is always '-1'. Without posting code I have echoed out the query string and run it independantly and its fine - no errors. I did think some issue may have arisen from the secure socket layer but that was just clutching at straws. If anyone can think of anything or need to see the code or settings just ask I'll be very greatful for any ideas as I am fresh out!
  22. an iframe is an element within a html page. it is basically another browser window embedded within the page. A frame is similar in the fact that it is essentialy another window BUT it is (normally) used with one or more frames within a page that is a frame set. There are other aspects in their difference - like how js interacts with them but that is another chapter. Perhaps if you were able to give a more specific questions alluding to what you wish to achieve then we could direct you better.
  23. Many stand alone apps have what they call a resource file. In this (amongst other things) is like a table of strings - one column for each language. Now you could replecate this with a database table. So you would only ever have to translate the strings you actually use on your site - they all have their own unique id and hence you can simply switch language by switching which field in teh database to search on. The other side to this is geoip project (just google geoip or maxmind) where you can actually detect (reasonably accurately) which country your visitor is from and use that in you queries! Always remeber to put a link somewhere to change the language if they need to though!
  24. JS works client side php works server side. JS can only send infomation to the server for php to pick up. There is really only one way it can do this. JS can manipulate fields in a html document and the results are sent via post or get methods to the server for the php engine to pick up. But JS can also send an xml request - which again is sending info via a url or post but the client 'does not' see this happening. this is how ajax works.... They are essentially the same thing but you can achive very different effects with each.
  25. I don't think so... Only time I have seen backgounds do anythink like what I didn't expect of them was when I gave a child element margins to place it within the parent div.  The parent div had no border and (in FF) took top left of the parent as the top left of the child element.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.