Jump to content

OM2

Members
  • Posts

    255
  • Joined

  • Last visited

Everything posted by OM2

  1. i made a psot 2 min beofr u sent ur reply their bulletin board does not work properly: i can't get with 2 previously created logins i had to create a new one to make a post thanks
  2. hmm... interesting not being lazy or anything but surely there must be a better way?
  3. yes, you're right im using fckeditor: and would like to stick with it! but do you know if we can get rid of the return key problem? AND: how about when a user get's text elswhere that is formatted? (i'm sure i have the flag on to paste all text as plain text, but it's not working well, since formatting still get's copied) thanks
  4. Cansomeone recommend an online text editor. OK, I've used FCKEditor and Tiny MCE. Both are excellent. Problem: they give toooo much power to the user, who ends up messing it all up! Is there an editor that is very simple, but allows making text bigger, change colours, change fonts - but not much else (like upload images!). I know there are looooads - but i just wanted a recommended one. ALSO, is there an editor that behaves properly when the return key is pressed? It's really annoying in FCKEditor: the problem is end users are harder to educate on how to use properly. Thanks. OM
  5. I want to have a page automatically redirect to another page with no delay. I've googled and have found that I can do the following in the HTML: <META HTTP-EQUIV="Refresh" CONTENT="5; URL=autoforward_target.html"> I assume I can just change the 5 above to 0 and will have instant redirection? Or I can use PHP by using: <?php //Redirect Browser header("Location: http://www.YourSite.com/"); ?> Which is better? Thanks. OM
  6. thank u thank u thank u! u really are a master coder. works exactly how i wanted.
  7. I want to have text or an image have a double outline. I'm not sure how to do this. I need to make sure that the outline is a certain distance away. I would assume I would have a div with an outline that is inside another div that has an outline? But how do I specify the distance? Thanks. OM
  8. That should be tons of code. The guy here is not talking about a modular, templatable (is that a word?), unbreakable and where OO is unreachable system. He's talking about a simple shopping cart where u can add products by filling some fields and let the user buy them. I recently finished a simple shopping cart (togather with a not so simple cms) for a client. It involved an admin panel where he can add/edit/delete products, each product has title, price, photos, etc, and is categorized in categories and styles (like lodge, baroque, whatever). In the front end i put up some nice features like ajax cart update and sorting from categories, styles, prices, etc. That is a quite simple system, but which does the job greatly. Appart from testing bugs and security, i didnt take me more then a couple of days to build it. So what are u guys talking about? We aren't discussing about builing a drupal clone, but a rather simple shopping cart which does what its meant to do. hey: at last someone on the same wavelenght as me! look at the paypal shopping cart: amazingly simple. ok: not as sophisticated as most other shopping cart software: but does the job. i'm still sticking to my guns: i can't see what all the fuss is about shopping carts! as far as oo: yes, sure, spend a little more time and make the code robust. but my point still stands.
  9. hey, how about being construtive and telling me what i'm missing. if the above is a bad idea, then paypal shopping cart is equally bad?
  10. guys thanks for the replies. i still don't see what i'm missing here! (i dont want to waste my time either chasing a fruitless task!) here's my spec: add item to shopping basket code: display shopping basket: function displayBasket() { // write code to display the $_SESSION['shoppingBasket'] array } add customer details: just write a form to collect the customer data. shipping: can't be that hard to add? pass details onto payment gateway: easy to do as well? and erm, not much else. what got me thinking about all of this: the paypal shopping basket. it's soooo simple! then i thought, hold on, it can't be that hard to code something similar?
  11. I've been thinking, what's all the fuss about shopping cart code? Maybe I'm missing something but it seems to be very easy and we don't need and code connecting pages. Shopping cart code: - add session code to keep track of what's in the basket - on any page where you want to have a product, add code that simply adds the item on the page to the basket - add code to show the basket page - add code to transfer all of the details to a payment gateway All of the above seems very simple to me! Something that could be handled by any CMS: just have something to add a buy it now button with code behind it to add an item to the basket whenever you want to add something. What am I missing? It seems very very simple to me! As far as I can see, maybe I'm missing the need to have tax calculations or something, but everything else is straight forward? Or maybe the need to specify sizes, coloours or something else - but surely it can't be that hard to add this with a a little javascript? Another thing: how hard can it be to have a shopping cart that is SEO friendly? With the above approach, surely it must be easy? I haven't found any credible opensoruce HTML shopping cart software. (There was one that looks promising that is well known, that I can't remember the name of, but that has problems with working in the UK!) It seems so simple that I'm contemplating coding a shopping cart myself! (Erm... I'm a newbie to PHP!) Any feedback to the above would be great! Thanks. OM
  12. thanks for the reply. but: i still have to escape the *'s?
  13. hmmm... i'm stuck on this one. javascript: is there a non javascript way? thanks for the reply. i've looked into it and thought i had a solution (using javascript): first page: <a href="secondpage.html" target="_blank">Edit</a> second page: 1. Annoyingly, I get a warning box popup that says: "Hey, this button is trying to close this window, do you want to allow it?". How can I stop this? 2. It doesn't actually go back to the parent calling window at all and refresh.
  14. I have the following preg_replace code: $cleanPageCode = preg_replace("/\/\*\s*Admin Code Start\s*\*\/.*?\/\*\s*Admin Code End\s*\*\//is", "", $oldCode); In my code I have: /* Admin Code Start */ body { margin: 0; padding: 0; } /* Admin Code End */ I'm using the preg replace to get rid of the above code. Just wanted to check it was correct! (It seems to work OK... but I thought I'd ask anyway.) Thanks. OM
  15. doing further investigating, i found out that there is nothing wrong with the code i gave above. BUT, i still have the problem. i have put html comments in my css: this is causing problems. see below for a cut down version of my code: ok... i seemed to have found out my problem. but i cant explain why the problem is there! my full code is as follows: <!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=iso-8859-1" /> <title>CSS Problems</title> <style type="text/css"> <!-- Comment Start --> body { margin: 0; padding: 0; } <!-- Comment End --> .topbar { width:100%; height: 40px; background-color:#cccccc; margin-top: 0; margin-right: auto; margin-left: auto; } .topbar2 { width:100%; height: 40px; margin-bottom:3px; background-color:#999999; border-bottom:4px solid #cccccc; margin-top: 0; margin-right: auto; margin-left: auto; } </style> <!-- Comment Start --> </head> <!-- Comment End --> <!-- Comment Start --> <body> <!-- Comment End --> <!-- Comment Start --> <div class="topbar2"> </div> <!-- Comment End --> <!-- Comment Start --> </body> </html> <!-- Comment End --> In my code above, I have to have <!-- Comment Start --> and <!-- Comment End -->. Once I remove both of these: everything works OK. Why is there a problem having comments in my CSS? Thanks.
  16. thanks for the replies. i'll make sure i comment well so i dont get lost in future.
  17. I've started off witha big HTML file. I've split off different chunks into seperate PHP files and have included these. Doing this is brilliant and allows me to make changes independentaly of the rest of the page. But: as my page gets bigger, I can see things getting more complex. One future problem I can see is trying to figure out how everything happens. For example, in one file, variables are declared and then used in another file. When I come back to the code several months after not looking: I know I'll be confused and will have to trace back! Not sure if any of the above makes sense! Am I doing the right thing splittng up the file in the first place? Any advice would be great. Thanks. OM
  18. How do I make a horizontal bar that stretches across the screen? I thought I had the right answer: body { margin: 0; padding: 0; } .top-bar { width:100%; height: 40px; background-color:#cccccc; margin-top: 0; margin-right: auto; margin-left: auto; } In my HTML: <div class="top-bar"> </div> Works fine in IE, but not Firefox. What am I missing? Thanks. OM
  19. How do I open a new window, close the new window and refresh the parent window? OK, let me clarify: 1. I have a page: page1.html. This has a link to page2.html. 2. The link is clicked and page2.html pops up in a new window. 3. page2.html has a button that closes the window and gives the focus back to page1.html (while refreshing page1.html). Hope that explains it properly! How do I do this? I wasn't sure if this involved Javascript? So, I thought I'd try asking here. Thanks. OM
  20. nightslyr i think ur ones looks good. i'll use that one. thanks.
  21. so would u say ur answer is a better one? if it is: i'll use that instead. for what i'm using, it's not that much of a concern. the button is part of an admin system for the backend and it's upto the user to make sure they have a good enough browser with all updates to be able to use the admin. what he user sees does not have the button. BUT: i'd still rather have the more correct solution. let me know what u think. thanks.
  22. thanks for the reply. wow... that looks complex! i've managed to find a solution: function goBack() { window.location = ('http://google.com'] ?>'); } and: <input type="button" value="Return" onclick="goBack()"> is ur answer better than what i've got above? let me know. thanks.
  23. well... it has to fit in wit what's already there. in the application i have programmed, there are 2 buttons without forms and both have javascript functions associated that control their actions. i can do, but it would look odd to have a link next to 2 buttons. better to have a button.
  24. I've got a button. When the button is clicked, I want to go to a specific page. So far I have: function goBack() { window.open('http://www.google.com'); } And: <input type="button" class="clickexecute" value="Return" onclick="goBack()"> Works OK: apart from the fact it opens in a new window! How do I create a link on a button as described above and make it stay in the same window. NOTE: I don't want to use a form. I know how to do it using a form. Thanks. OM
  25. Is it OK to have 2 declerations of the same CSS file? I have PHP code that gives the location of the CSS file on my server online. That gives me a problem: when I'm editing on my PC, I have no idea what I'm doing because I can't see the CSS. So, I came up with the bright idea of declaring the CSS file twice: <link href="myStyles.css" rel="stylesheet" type="text/css" /> <link href="<?php echo $myStyles ?>" rel="stylesheet" type="text/css" /> Erm: it seems to be working fine. When viewing on the server, both lines above are valid. I assume that the second decleration over writes the first. AND, before anyone says: no, it's not good enough for me to just have the first line. Yes, it will work fine when viewed on my server. But, for what I'm doing, I *have* to have the PHP! Thanks. OM
×
×
  • 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.