Jump to content

gethinw

Members
  • Posts

    24
  • Joined

  • Last visited

    Never

Contact Methods

  • Website URL
    http://atcuk.blogspot.com

Profile Information

  • Gender
    Not Telling

gethinw's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I think you've answered your own question there. Lets agree to disagree...
  2. Only when you don't do it properly - 2 * apple != apple's Sorry, I couldn't help myself...
  3. <input type="submit" name="button" id="button" value="Decision Maker Conversion" onclick="replaceText();return false;"/> When you click the button it is reloading the page (ie the form is submitting itself, and as you haven't declared an action it uses the current page as a default action). By adding "return false" to the onclick it means that the submit action isn't carried out, just the onclick action.
  4. gethinw

    Print

    You could try onLoad='window.print();window.close();' but for that to work the window would have to have been opened by a script in the first place (in firefox at least, not sure about ie), so you'd have to use something like <a onclick='window.open(your url)'> rather than <a href=...> I'd find that behaviour fairly annoying if I was using it though...
  5. Use php (or whatever you're using to get the data from the DB) to automatically insert a break if a word is over a certain number of characters long? Using divs - it'll mean you have to redesign your site using <div> tags instead of tables. It's hard to say much more without knowing what you're trying to do! re haku: have you checked that? all the examples I've tried seem to expand the table cell to fit the content, no matter how you define the width.
  6. I'm not 100% sure on exactly how different browsers handle this, but in firefox at least table cells seem to expand if text can't be split, whereas div's stay the specified size. That said, it still won't split the word across lines, and instead will either show it outside the div, or hide the extra bit, or show a scroll bar on the div, depending on what your 'overflow' attribute is set to. That's probably not much help i'm afraid - I think your best bet is going to be to manually split the words.
  7. Ugh, the thought of that still makes me shiver, from back when I hadn't discovered frameworks and thought that it would be a good way to work. Do yourself a favour and learn a framework, I use Zend Framework, which is very nice to use once you get your head around it.
  8. First, if the php file is creating an html page (which it seems to be) get rid of the Header("Content-type: image/jpeg"); - what you're doing at the moment is telling the browser that you're giving it an image, but then actually sending it html code with an embedded image, which are two different things. Also, you don't need </img>, you just need the <img...> tag, possibly self closing (ie ends with />) depending on what html/xhtml doctype you're using.
  9. To get the text values from the database you'll need to either use php (or another server-side solution) to get the values and output the relevant html, and then hide the text, then use javascript to show and hide the text when you click on the checkboxes. Or, you could use ajax to load the text from the database on the fly when the checkboxes are clicked. If you just want someone to write the code for you try over in the freelancing board...
  10. I suspect it's probably done with css, and the link isn't actually a link as in an 'a' tag, but a 'span' or similar element with style="cursor:pointer" attribute (or similar in a separate stylesheet) to give a 'hand' cursor when hovering over it, and an onclick event triggering some javascript so it does something when you click it. Nothing to do with php at all really I'm afraid!
  11. I'd be quite interested to see what people say in reply to this. I'm quite new to MVC style programming, and this in particular is something I've struggled with getting my head around. FWIW I haven't actually ended up using Zend_Db_Table much recently, but what I've generally ended up doing is having a Model class for each source of data, which might be one table, or could be a combination of tables (using JOIN or whatever), and extending the built in classes, keeping as much of them as possible, but altering any bits which are necessary, to keep the controllers as small as possible - one of the key ideas behind ZF is that you should aim for a 'skinny controller' (ie as little code as possible in the controller - it should basically just get data from the model and pass it to the view (and vice versa if appropriate), but do as little data manipulation as possible). That probably doesn't help much really... If you give us a better idea of what you're trying to do we might be able to provide more direct guidance!
  12. Hi all, I'm adding borders around links using: padding:2px 10px; border:solid black 1px; This works fine in most browsers (IE, Safari, Firefox on PC), but on Firefox (3.0.1) on OSX the border is drawn in a slightly different place - it uses the full height of the text (ie from the top of capitals, to the bottom of 'y's and 'g's) as the reference, whereas the other browsers seem to just use the height of capital letters as a reference. This means that in Firefox on OSX the border appears to be too near to the top of letters - see attached images to see the differences. Does anyone know a way to fix this? I've got a basic reset stylesheet (just resetting border, margin, and padding to 0), do I need more than this? Thanks for your help! [attachment deleted by admin]
  13. Why not just use <p><a href='...'><script type='text/javascript'>document.write(document.title)</script></a></p> Seems a lot simpler to me.
  14. Sorted, in case anyone is interested: abstract class ATCController extends Zend_Controller_Action { abstract protected function _getName(); //to get table name from child classes public function indexAction() { $this->view->headTitle(ucfirst($this->_getName())); $model = $this->_getModel(); $this->view->content = $model->fetchRow()->Text; } protected function _getModel() { if (null === $this->_model) { // autoload only handles "library" compoennts. Since this is an // application model, we need to require it from its application // path location. require_once APPLICATION_PATH . '/models/ATCTable.php'; $this->_model = new ATCTable(array('name' => strtolower($this->_getName()))); } return $this->_model; } } ------------------ class BiographyController extends ATCController { protected function _getName() { return 'biography'; } }
  15. Or, in javascript: <script type='text/javascript'> document.write(document.title); </script>
×
×
  • 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.